org.objectweb.medor.optim.jorm
Class JormAssignMapperRule

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

public class JormAssignMapperRule
extends BasicRule

It permits to assign the mappers to the JORM leaves.

This rule must be executed before the rewriting of the JORM leaves. Two maps are assigned to this rule.

The first map has the following caracteristics:

The second map has the following caracteristics:

Currently this rule does not take in account the possibility to map the same class several times into several mapper. deprecated Should now use the JormQueryTreeHelper methods instead.

Author:
S. Chassande-Barrioz
See Also:
JormQueryTreeHelper

Nested Class Summary
 
Nested classes inherited from class org.objectweb.medor.optim.lib.BasicRule
BasicRule.ModifiedExpression
 
Field Summary
protected  java.util.Map jormName2Mapper
           
protected  java.util.Map jormName2Project
           
 
Fields inherited from class org.objectweb.medor.optim.lib.BasicRule
debug, log
 
Constructor Summary
JormAssignMapperRule()
           
 
Method Summary
protected  void assignMapper(QueryTree qt)
           
 java.util.Map getJormName2Mapper()
           
 QueryTree rewrite(QueryTree qt, QueryNode _parent)
          This method applies a single rule.
 void setJormName2Mapper(java.util.Map jormName2Mapper, java.util.Map jormName2Project)
          It assigns the map used in this rule.
 
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
 

Field Detail

jormName2Mapper

protected java.util.Map jormName2Mapper

jormName2Project

protected java.util.Map jormName2Project
Constructor Detail

JormAssignMapperRule

public JormAssignMapperRule()
Method Detail

getJormName2Mapper

public java.util.Map getJormName2Mapper()

setJormName2Mapper

public void setJormName2Mapper(java.util.Map jormName2Mapper,
                               java.util.Map jormName2Project)
It assigns the map used in this rule. (Read the class description for more details).

Parameters:
jormName2Mapper - is the map

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

assignMapper

protected void assignMapper(QueryTree qt)
                     throws MedorException
Throws:
MedorException