org.modeshape.jcr.query.optimize
Class CopyCriteria
java.lang.Object
org.modeshape.jcr.query.optimize.CopyCriteria
- All Implemented Interfaces:
- OptimizerRule
@Immutable
public class CopyCriteria
- extends Object
- implements OptimizerRule
An optimizer rule
that copies SELECT nodes that apply to one side of a equi-join condition so that they
also apply to the other side fo the equi-join condition.
Method Summary |
protected PlanNode |
copySelectNode(QueryContext context,
PlanNode selectNode,
SelectorName selectorName,
String propertyName,
SelectorName copySelectorName,
String copyPropertyName)
|
protected void |
copySelectNodes(QueryContext context,
PlanNode fromJoined,
PlanNode toJoined)
|
PlanNode |
execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack)
Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules. |
static Set<Column> |
getColumnsReferencedBy(Visitable visitable)
Get the set of Column objects that represent those columns referenced by the visitable object. |
String |
toString()
|
INSTANCE
public static final CopyCriteria INSTANCE
CopyCriteria
public CopyCriteria()
execute
public PlanNode execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack)
- Description copied from interface:
OptimizerRule
- Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules.
- Specified by:
execute
in interface OptimizerRule
- Parameters:
context
- the context in which the query is being optimized; never nullplan
- the plan to be optimized; never nullruleStack
- the stack of rules that will be run after this rule; never null
- Returns:
- the optimized plan; never null
copySelectNodes
protected void copySelectNodes(QueryContext context,
PlanNode fromJoined,
PlanNode toJoined)
copySelectNode
protected PlanNode copySelectNode(QueryContext context,
PlanNode selectNode,
SelectorName selectorName,
String propertyName,
SelectorName copySelectorName,
String copyPropertyName)
toString
public String toString()
- Overrides:
toString
in class Object
getColumnsReferencedBy
public static Set<Column> getColumnsReferencedBy(Visitable visitable)
- Get the set of Column objects that represent those columns referenced by the visitable object.
- Parameters:
visitable
- the object to be visited
- Returns:
- the set of Column objects, with column names that always are the string-form of the
property name
; never null
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.