|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.medor.optim.lib.BasicQueryRewriter
This class implements the QueryRewriter interface AND also the RuleConfiguration interface (the aim is to optimize the number of object). The addDefaultRiles permits to assign the default rules in the right order.
Field Summary | |
protected boolean |
debug
|
protected Logger |
log
|
protected java.util.List |
rules
|
Constructor Summary | |
BasicQueryRewriter()
It builds a BasicQueryRewriter with no rule |
|
BasicQueryRewriter(java.util.ArrayList rules)
It builds a BasicQueryRewriter with a ArrayList of rules specified in parameter. |
|
BasicQueryRewriter(java.util.Collection rules)
It builds a BasicQueryRewriter with a Collection of rules specified in parameter. |
Method Summary | |
void |
addRule(RewriteRule rule)
Adds a rule to a configuration, together with parameters such as the number of times the rules is applied (once, saturation) |
java.util.List |
getDefaultRules()
It adds the default Medor rules in this following order PushNotInExpressionRule PushSelectionRule DropUnusedProjFieldsRule DropUselessNodeRule GroupSameStoreRule |
java.util.List |
getRules()
Gives the List of rules in the configuration |
void |
removeRule(RewriteRule rule)
Deletes a rule from the configuration. |
void |
setRuleConfiguration(RuleConfiguration config)
This method configures the QueryRewriter using a RuleConfiguration. |
QueryTree |
transform(QueryTree qt)
This methods transforms a QueryTree into another QueryTree. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List rules
protected Logger log
protected boolean debug
Constructor Detail |
public BasicQueryRewriter()
public BasicQueryRewriter(java.util.ArrayList rules)
rules
- is the list of rules for this configurationpublic BasicQueryRewriter(java.util.Collection rules)
rules
- is the list of rules for this configurationMethod Detail |
public java.util.List getDefaultRules()
public void setRuleConfiguration(RuleConfiguration config)
QueryRewriter
setRuleConfiguration
in interface QueryRewriter
public QueryTree transform(QueryTree qt) throws MedorException
QueryTransformer
transform
in interface QueryTransformer
MedorException
public void addRule(RewriteRule rule)
RuleConfiguration
addRule
in interface RuleConfiguration
rule
- the rule to be added.public void removeRule(RewriteRule rule)
RuleConfiguration
removeRule
in interface RuleConfiguration
rule
- the rule to be removedpublic java.util.List getRules()
RuleConfiguration
getRules
in interface RuleConfiguration
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |