org.objectweb.medor.optim.jorm

Class JormAssignMapperRule

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/interfaces inherited from class org.objectweb.medor.optim.lib.BasicRule

BasicRule.ModifiedExpression

Field Summary

protected Map
jormName2Mapper
protected Map
jormName2Project

Fields inherited from class org.objectweb.medor.optim.lib.BasicRule

debug, log

Constructor Summary

JormAssignMapperRule()

Method Summary

protected void
assignMapper(QueryTree qt)
Map
getJormName2Mapper()
QueryTree
rewrite(QueryTree qt, QueryNode _parent)
void
setJormName2Mapper(Map jormName2Mapper, Map jormName2Project)
It assigns the map used in this rule.

Methods inherited from class org.objectweb.medor.optim.lib.BasicRule

replaceUsage, rewrite

Field Details

jormName2Mapper

protected Map jormName2Mapper


jormName2Project

protected Map jormName2Project

Constructor Details

JormAssignMapperRule

public JormAssignMapperRule()

Method Details

assignMapper

protected void assignMapper(QueryTree qt)
            throws MedorException


getJormName2Mapper

public Map getJormName2Mapper()


rewrite

public QueryTree rewrite(QueryTree qt,
                         QueryNode _parent)
            throws MedorException
Specified by:
rewrite in interface RewriteRule


setJormName2Mapper

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

Parameters:
jormName2Mapper - is the map