org.modeshape.graph.query.process
Class MergeJoinComponent

java.lang.Object
  extended by org.modeshape.graph.query.process.ProcessingComponent
      extended by org.modeshape.graph.query.process.JoinComponent
          extended by org.modeshape.graph.query.process.MergeJoinComponent

@Immutable
public class MergeJoinComponent
extends JoinComponent

Create a processing component that performs a merge-join algorithm. This algorithm only makes sense for equi-joins, child-node joins, and same-node joins.

Note that it is required that the left and right processing components (where this component gets its results) must already be properly sorted and have had duplicates removed.


Constructor Summary
MergeJoinComponent(QueryContext context, ProcessingComponent left, ProcessingComponent right, ChildNodeJoinCondition condition, JoinType joinType)
           
MergeJoinComponent(QueryContext context, ProcessingComponent left, ProcessingComponent right, EquiJoinCondition condition, JoinType joinType)
           
MergeJoinComponent(QueryContext context, ProcessingComponent left, ProcessingComponent right, SameNodeJoinCondition condition, JoinType joinType)
           
 
Method Summary
 List<Object[]> execute()
          Execute this stage of processing and return the resulting tuples that each conform to the columns.
 
Methods inherited from class org.modeshape.graph.query.process.JoinComponent
getJoinCondition, getJoinType
 
Methods inherited from class org.modeshape.graph.query.process.ProcessingComponent
close, getColumns, getContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeJoinComponent

public MergeJoinComponent(QueryContext context,
                          ProcessingComponent left,
                          ProcessingComponent right,
                          EquiJoinCondition condition,
                          JoinType joinType)

MergeJoinComponent

public MergeJoinComponent(QueryContext context,
                          ProcessingComponent left,
                          ProcessingComponent right,
                          ChildNodeJoinCondition condition,
                          JoinType joinType)

MergeJoinComponent

public MergeJoinComponent(QueryContext context,
                          ProcessingComponent left,
                          ProcessingComponent right,
                          SameNodeJoinCondition condition,
                          JoinType joinType)
Method Detail

execute

public List<Object[]> execute()
Execute this stage of processing and return the resulting tuples that each conform to the columns.

Specified by:
execute in class ProcessingComponent
Returns:
the list of tuples, where each tuple corresonds to the columns; never null
See Also:
ProcessingComponent.execute()


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.