ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.query.optimize
Class RewritePathAndNameCriteria

java.lang.Object
  extended by org.modeshape.jcr.query.optimize.RewritePathAndNameCriteria
All Implemented Interfaces:
OptimizerRule

@Immutable
public class RewritePathAndNameCriteria
extends Object
implements OptimizerRule

An optimizer rule that rewrites Constraint trees, moving path-, name-, or depth-oriented criteria to the left-most parts of the constraint tree.


Field Summary
static RewritePathAndNameCriteria INSTANCE
           
 
Constructor Summary
RewritePathAndNameCriteria()
           
 
Method Summary
 PlanNode execute(QueryContext context, PlanNode plan, LinkedList<OptimizerRule> ruleStack)
          Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules.
protected  boolean isPathOriented(DynamicOperand op)
           
protected  Constraint rewriteCriteria(QueryContext context, Constraint constraint)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final RewritePathAndNameCriteria INSTANCE
Constructor Detail

RewritePathAndNameCriteria

public RewritePathAndNameCriteria()
Method Detail

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 null
plan - the plan to be optimized; never null
ruleStack - the stack of rules that will be run after this rule; never null
Returns:
the optimized plan; never null

rewriteCriteria

protected Constraint rewriteCriteria(QueryContext context,
                                     Constraint constraint)

isPathOriented

protected boolean isPathOriented(DynamicOperand op)

toString

public String toString()
Overrides:
toString in class Object

ModeShape Distribution 3.0.0.Beta4

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