org.objectweb.medor.optim.api
Interface RewriteRule
- LeafRewriteRule
- BasicRule, DropUnusedProjFieldsRule, DropUselessNodeRule, FlattenQueryTreeRule, GroupSameDBRule, Jorm2Rdb, JormAssignMapperRule, JormFilteredInheritance, JormFlatten2Rdb, JormGoUpDecodeRule, JormLeafRewriter, JormLeafRewriteRule, JormRule, PushNotInExpressionRule, PushSelectionRule, RdbAssignRdbAdapterRule
public interface RewriteRule
This interface describes a rule used by the QueryTransformer.
It typically pushes selections, replaces a JORM scan with the corresp.
RdbQueryLeaf, groups operations on the same data source if possible
(depending on the evaluation capacity of the data source) into
a single QueryLeaf, etc.
rewrite
public QueryTree rewrite(QueryTree qt)
throws MedorException
This method applies a single rule. It is typically called by the
QueryRewriter for applying the entire rewriting process.
It is the same method, but the QueryTree to be rewritten is the
top QueryTree (no parent).
qt
- the QueryTree to be rewritten
- the rewritten QueryTree
MedorException
-
rewrite
public QueryTree rewrite(QueryTree qt,
QueryNode parent)
throws MedorException
This method applies a single rule.
It is typically called by the
QueryRewriter for applying the entire rewriting process.
qt
- the QueryTree to be rewrittenparent
- the parent QueryNode for which modification of propagated
field, if they are replaced in the qt, should be done.
- the rewritten QueryTree
MedorException
-