org.objectweb.medor.optim.jorm
Class JormFilteredInheritance

java.lang.Object
  extended byorg.objectweb.medor.optim.lib.BasicRule
      extended byorg.objectweb.medor.optim.jorm.JormRule
          extended byorg.objectweb.medor.optim.jorm.JormFilteredInheritance
All Implemented Interfaces:
RewriteRule

public class JormFilteredInheritance
extends JormRule

In the case of filtered inheritance, this rule replaces a QueryTree built on top of JormExtents with inheritance by a QueryTree with JormExtents without inheritance, on top of which are inserted new SelectProjects containing the filter corresponding to the inheritance filter.

MEDOR constructs its filter using the ones in RdbClassMapping, either accessible through getRdbFilter(), if it has been provided by the user, or computed from the NameDef filter otherwise (method to be provided in JORM).

Author:
A. Lefebvre

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
JormFilteredInheritance()
           
 
Method Summary
 QueryTree rewrite(QueryTree qt, QueryNode parent)
          This method applies a single rule.
 
Methods inherited from class org.objectweb.medor.optim.jorm.JormRule
getClassMapping, getGenClassMapping, getJORMFieldName, getPEM, getPNCOperand, getPrimitiveElement
 
Methods inherited from class org.objectweb.medor.optim.lib.BasicRule
replaceUsage, rewrite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JormFilteredInheritance

public JormFilteredInheritance()
Method Detail

rewrite

public QueryTree rewrite(QueryTree qt,
                         QueryNode parent)
                  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.

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