Examples of QueryObjectModel


Examples of javax.jcr.query.qom.QueryObjectModel

    }

    public void testInnerJoin1() throws RepositoryException {
        JoinCondition c = qf.equiJoinCondition(
                LEFT, propertyName1, RIGHT, propertyName2);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, c);
        checkResult(qom.execute(), new Node[][]{{n1, n2}, {n2, n2}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

    }

    public void testInnerJoin2() throws RepositoryException {
        JoinCondition c = qf.equiJoinCondition(
                LEFT, propertyName2, RIGHT, propertyName1);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, c);
        checkResult(qom.execute(), new Node[][]{{n2, n1}, {n2, n2}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

    }

    public void testRightOuterJoin1() throws RepositoryException {
        JoinCondition c = qf.equiJoinCondition(
                LEFT, propertyName1, RIGHT, propertyName2);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_RIGHT_OUTER, c);
        checkResult(qom.execute(), new Node[][]{{null, n1}, {n1, n2}, {n2, n2}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

    }

    public void testRightOuterJoin2() throws RepositoryException {
        JoinCondition c = qf.equiJoinCondition(
                LEFT, propertyName2, RIGHT, propertyName1);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_RIGHT_OUTER, c);
        checkResult(qom.execute(), new Node[][]{{n2, n1}, {n2, n2}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

    }

    public void testLeftOuterJoin1() throws RepositoryException {
        JoinCondition c = qf.equiJoinCondition(
                LEFT, propertyName1, RIGHT, propertyName2);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_LEFT_OUTER, c);
        checkResult(qom.execute(), new Node[][]{{n1, n2}, {n2, n2}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel


    public void testLeftOuterJoin2() throws RepositoryException {
        JoinCondition c = qf.equiJoinCondition(
                LEFT, propertyName2, RIGHT, propertyName1);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_LEFT_OUTER, c);
        checkResult(qom.execute(), new Node[][]{{n1, null}, {n2, n1}, {n2, n2}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

    public void testMultipleSelectors() throws RepositoryException {
        // ascending
        Ordering[] orderings = new Ordering[]{
                qf.ascending(qf.propertyValue(RIGHT, propertyName2))
        };
        QueryObjectModel qom = createQuery(orderings);
        checkResultOrder(qom.execute(), SELECTOR_NAMES, new Node[][]{{n2, n2}, {n1, n2}});

        // descending
        orderings[0] = qf.descending(qf.propertyValue(RIGHT, propertyName2));
        qom = createQuery(orderings);
        checkResultOrder(qom.execute(), SELECTOR_NAMES, new Node[][]{{n1, n2}, {n2, n2}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

    protected QueryObjectModel createQuery(Ordering[] orderings)
            throws RepositoryException {
        JoinCondition c = qf.equiJoinCondition(
                LEFT, propertyName1, RIGHT, propertyName2);
        QueryObjectModel qom = createQuery(
                QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, c);
        return qf.createQuery(qom.getSource(), qom.getConstraint(),
                orderings, qom.getColumns());
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

        testRootNode.save();
    }

    public void testInnerJoin() throws RepositoryException {
        JoinCondition c = qf.childNodeJoinCondition(LEFT, RIGHT);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, c);
        checkResult(qom.execute(), new Node[][]{{n2, n1}});
    }
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel

        checkResult(qom.execute(), new Node[][]{{n2, n1}});
    }

    public void testRightOuterJoin() throws RepositoryException {
        JoinCondition c = qf.childNodeJoinCondition(LEFT, RIGHT);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_RIGHT_OUTER, c);
        checkResult(qom.execute(), new Node[][]{{n2, n1}, {null, n2}});
    }
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.