Package javax.jcr.query.qom

Examples of javax.jcr.query.qom.JoinCondition


        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_RIGHT_OUTER, c);
        checkQOM(qom, new Node[][]{{n2, n1}, {null, n2}});
    }

    public void testLeftOuterJoin() throws RepositoryException {
        JoinCondition c = qf.childNodeJoinCondition(LEFT, RIGHT);
        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_LEFT_OUTER, c);
        List<Node[]> result = new ArrayList<Node[]>();
        result.add(new Node[]{n2, n1});
        if (testRootNode.isNodeType(testNodeType)) {
            result.add(new Node[]{n1, testRootNode});
View Full Code Here


            }
            read("JOIN");
            selector = parseSelector();
            selectors.add(selector);
            read("ON");
            JoinCondition on = parseJoinCondition();
            source = type.join(factory, source, selector, on);
        }
        return source;
    }
View Full Code Here

    }

    private JoinCondition parseJoinCondition() throws RepositoryException {
        boolean identifier = currentTokenType == IDENTIFIER;
        String name = readName();
        JoinCondition c;
        if (identifier && readIf("(")) {
            if ("ISSAMENODE".equalsIgnoreCase(name)) {
                String selector1 = readName();
                read(",");
                String selector2 = readName();
View Full Code Here

            }
            read("JOIN");
            selector = parseSelector();
            selectors.add(selector);
            read("ON");
            JoinCondition on = parseJoinCondition();
            source = type.join(factory, source, selector, on);
        }
        return source;
    }
View Full Code Here

    }

    private JoinCondition parseJoinCondition() throws RepositoryException {
        boolean identifier = currentTokenType == IDENTIFIER;
        String name = readName();
        JoinCondition c;
        if (identifier && readIf("(")) {
            if ("ISSAMENODE".equalsIgnoreCase(name)) {
                String selector1 = readName();
                read(",");
                String selector2 = readName();
View Full Code Here

     */
    public static JoinMerger getJoinMerger(
            Join join, Map<String, PropertyValue> columns,
            OperandEvaluator evaluator, QueryObjectModelFactory factory)
            throws RepositoryException {
        JoinCondition condition = join.getJoinCondition();
        if (condition instanceof EquiJoinCondition) {
            return new EquiJoinMerger(
                    join, columns, evaluator, factory,
                    (EquiJoinCondition) condition);
        } else if (condition instanceof SameNodeJoinCondition) {
View Full Code Here

        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_RIGHT_OUTER, c);
        checkQOM(qom, new Node[][]{{n1, n2}, {n2, n2}});
    }

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

        QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_RIGHT_OUTER, c);
        checkQOM(qom, new Node[][]{{n2, n1}, {n2, n2}});
    }

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

        checkQOM(qom, new Node[][]{{n1, n2}, {n2, n2}});
    }


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

            }
            read("JOIN");
            selector = parseSelector();
            selectors.add(selector);
            read("ON");
            JoinCondition on = parseJoinCondition();
            source = type.join(factory, source, selector, on);
        }
        return source;
    }
View Full Code Here

TOP

Related Classes of javax.jcr.query.qom.JoinCondition

Copyright © 2018 www.massapicom. 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.