Package org.jboss.dna.graph.query.plan

Examples of org.jboss.dna.graph.query.plan.PlanNode.removeFromParent()


    protected void rewriteJoinNode( QueryContext context,
                                    PlanNode joinNode,
                                    Map<SelectorName, SelectorName> rewrittenSelectors ) {
        // Remove the right source node from the join node ...
        PlanNode rightChild = joinNode.getLastChild();
        rightChild.removeFromParent();
        PlanNode rightSource = rightChild.findAtOrBelow(Type.SOURCE);

        // Replace the join node with the left source node ...
        PlanNode leftChild = joinNode.getFirstChild();
        joinNode.extractFromParent();
View Full Code Here


        // For each of the JOIN nodes ...
        for (PlanNode joinNode : plan.findAllAtOrBelow(Type.JOIN)) {
            if (JoinType.RIGHT_OUTER == joinNode.getProperty(Property.JOIN_TYPE, JoinType.class)) {
                // Swap the information ...
                PlanNode left = joinNode.getFirstChild();
                left.removeFromParent(); // right is now the first child ...
                left.setParent(joinNode);
                joinNode.setProperty(Property.JOIN_TYPE, JoinType.LEFT_OUTER);
                // The JoinCondition and Constraints don't need to be changed
            }
        }
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.