org.objectweb.medor.optim.jorm
Class JormQueryRewriter

java.lang.Object
  extended byorg.objectweb.medor.optim.lib.BasicQueryRewriter
      extended byorg.objectweb.medor.optim.jorm.JormQueryRewriter
All Implemented Interfaces:
QueryRewriter, QueryTransformer, RuleConfiguration

public class JormQueryRewriter
extends BasicQueryRewriter

This QueryRewriter is able to rewrite a query tree which contains JORM leaves.

Author:
S.Chassande-Barrioz

Field Summary
 
Fields inherited from class org.objectweb.medor.optim.lib.BasicQueryRewriter
debug, log, rules
 
Constructor Summary
JormQueryRewriter(java.util.Collection leafRewriters)
          It builds a QueryRewriter which the configuration is composed by the rule needed to rewrite a query tree containing jorm leaves (ClassExtent or GenClassExtent).
JormQueryRewriter(java.util.Map jormName2Mapper, java.util.Map jormName2Project, java.util.Collection leafRewriters)
          It builds a QueryRewriter which the configuration is composed by the rule needed to rewrite a query tree containing jorm leaves (ClassExtent or GenClassExtent).
 
Methods inherited from class org.objectweb.medor.optim.lib.BasicQueryRewriter
addRule, getDefaultRules, getRules, removeRule, setRuleConfiguration, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JormQueryRewriter

public JormQueryRewriter(java.util.Map jormName2Mapper,
                         java.util.Map jormName2Project,
                         java.util.Collection leafRewriters)
It builds a QueryRewriter which the configuration is composed by the rule needed to rewrite a query tree containing jorm leaves (ClassExtent or GenClassExtent).

Parameters:
jormName2Mapper - is map which associated the jorm leaves to their mapper instance.
jormName2Project - is map which associated the jorm leaves to their project name.
leafRewriters - is a collection of LeafRewriter which knows how to rewrite the JORM leaves. These LeafRewriter depend on the mapping used by the Jorm leaves

JormQueryRewriter

public JormQueryRewriter(java.util.Collection leafRewriters)
It builds a QueryRewriter which the configuration is composed by the rule needed to rewrite a query tree containing jorm leaves (ClassExtent or GenClassExtent).

Parameters:
leafRewriters - is a collection of LeafRewriter which knows how to rewrite the JORM leaves. These LeafRewriter depend on the mapping used by the Jorm leaves