org.objectweb.medor.optim.lib
Class DropUnusedProjFieldsRule

java.lang.Object
  |
  +--org.objectweb.medor.optim.lib.BasicRule
        |
        +--org.objectweb.medor.optim.lib.DropUnusedProjFieldsRule
All Implemented Interfaces:
RewriteRule

public class DropUnusedProjFieldsRule
extends BasicRule

This class represents the rule to drop projected fields which are not used. This rule is to be called on the root of the tree to be optimized. The projected fields of the root node will not be deleted (they are requested by the user). As a remark, the user should be careful and not request unnecessary fields!


Nested Class Summary
 
Nested classes inherited from class org.objectweb.medor.optim.lib.BasicRule
BasicRule.ModifiedExpression
 
Field Summary
 
Fields inherited from class org.objectweb.medor.optim.lib.BasicRule
debug, log
 
Constructor Summary
DropUnusedProjFieldsRule()
           
 
Method Summary
 QueryTree rewrite(QueryTree qt)
          Relies on a Map which associates to each child the list of required Fields for that child.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropUnusedProjFieldsRule

public DropUnusedProjFieldsRule()
Method Detail

rewrite

public QueryTree rewrite(QueryTree qt)
                  throws MedorException
Relies on a Map which associates to each child the list of required Fields for that child.

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