org.objectweb.medor.optim.jorm
Class JormAssignMapperRule
java.lang.Object
org.objectweb.medor.optim.lib.BasicRule
org.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:
- key = JORM class name
- value = the mapper instance which maps the jorm class.
The second map has the following caracteristics:
- key = JORM class name
- value = the project name for this JORM class.
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jormName2Mapper
protected java.util.Map jormName2Mapper
jormName2Project
protected java.util.Map jormName2Project
JormAssignMapperRule
public JormAssignMapperRule()
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