Package javax.jcr.query.qom

Examples of javax.jcr.query.qom.QueryObjectModel.execute()


    }

    public void testRightOuterJoin() throws RepositoryException {
        JoinCondition c = qomFactory.descendantNodeJoinCondition(LEFT, RIGHT);
        QueryObjectModel qom = createQuery(AbstractJoinTest.JCR_JOIN_TYPE_RIGHT_OUTER, c);
        checkResult(qom.execute(), new Node[][]{{n2, n1}, {null, n2}});
    }

    public void testLeftOuterJoin() throws RepositoryException {
        JoinCondition c = qomFactory.descendantNodeJoinCondition(LEFT, RIGHT);
        QueryObjectModel qom = createQuery(AbstractJoinTest.JCR_JOIN_TYPE_LEFT_OUTER, c);
View Full Code Here


        }
        if (result.size() == 1) {
            // n1 not yet covered
            result.add(new Node[]{n1, null});
        }
        checkResult(qom.execute(), (Node[][]) result.toArray(new Node[result.size()][]));
    }
}
View Full Code Here

                                operator,
                                qf.literal(length))

                ), null, null);
        QueryResult[] results = new QueryResult[2];
        results[0] = qom.execute();
        results[1] = qm.createQuery(qom.getStatement(), Query.JCR_SQL2).execute();
        return results;
    }
}
View Full Code Here

        QueryObjectModel qom = qf.createQuery(
                qf.selector(testNodeType, SELECTOR_NAME),
                qf.descendantNode(SELECTOR_NAME, testRoot),
                null,
                new Column[]{qf.column(SELECTOR_NAME, propertyName1, propertyName1)});
        RowIterator rows = qom.execute().getRows();
        assertTrue("empty result", rows.hasNext());
        Row r = rows.nextRow();
        assertFalse("result must not contain more than one row", rows.hasNext());
        return r;
    }
View Full Code Here

        Source source1 = qomf.selector(NodeType.NT_BASE, "selector");
        Column[] columns = new Column[] { qomf.column("selector", null, null) };
        Constraint constraint2 = qomf.childNode("selector", n1.getPath());
        QueryObjectModel qom = qomf.createQuery(source1, constraint2, null,
                columns);
        checkResult(qom.execute(), 2);
    }

    /**
     * the statement behind the api should be consistent, and return a similar
     * query. in our case it should escape the paths that have spaces in them by
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.