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!
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DropUnusedProjFieldsRule
public DropUnusedProjFieldsRule()
rewrite
public QueryTree rewrite(QueryTree qt,
QueryNode _parent)
throws MedorException
- Relies on a Map which associates to each child the list of required
Fields for that child.
- Parameters:
qt
- the QueryTree to be rewritten_parent
- the parent QueryNode for which modification of propagated
field, if they are replaced in the qt, should be done.
- Returns:
- the rewritten QueryTree
- Throws:
MedorException