org.objectweb.medor.optim.jorm
Class Jorm2Rdb

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

public class Jorm2Rdb
extends JormRule

This rules transforms a QueryTree built on top of JORM Extents into a QueryTree built on top of RdbExpQueryLeaves.

It handles cases where there are Nest QueryNodes, and relies on the JormFlatten2Rdb rule for the rest of the QueryTree.

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
Jorm2Rdb()
           
 
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

Jorm2Rdb

public Jorm2Rdb()
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