org.objectweb.medor.optim.lib
Class BasicRule

java.lang.Object
  |
  +--org.objectweb.medor.optim.lib.BasicRule
All Implemented Interfaces:
RewriteRule
Direct Known Subclasses:
DropUnusedProjFieldsRule, DropUselessNodeRule, FlattenQueryTreeRule, JormAssignMapperRule, JormGoUpDecodeRule, JormLeafRewriteRule, JormRule, PushNotInExpressionRule, PushSelectionRule, RdbAssignRdbAdapterRule

public abstract class BasicRule
extends java.lang.Object
implements RewriteRule

Author:
S.Chassande-Barrioz

Nested Class Summary
 class BasicRule.ModifiedExpression
          A ModifiedExpression is a structure containing an Expression and a boolean indicating whether the Expression has been modified or not.
 
Field Summary
protected  boolean debug
           
protected  Logger log
           
 
Constructor Summary
BasicRule()
           
BasicRule(java.lang.String suffix)
           
 
Method Summary
 QueryTree rewrite(QueryTree qt)
          This method applies a single rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected Logger log

debug

protected boolean debug
Constructor Detail

BasicRule

public BasicRule()

BasicRule

public BasicRule(java.lang.String suffix)
Method Detail

rewrite

public QueryTree rewrite(QueryTree qt)
                  throws MedorException
Description copied from interface: RewriteRule
This method applies a single rule. It is typically called by the QueryRewriter for applying the entire rewriting process.

Specified by:
rewrite in interface RewriteRule
Parameters:
qt - the QueryTree to be rewritten
Returns:
the rewritten QueryTree
Throws:
MedorException