org.objectweb.medor.optim.jorm

Class JormQueryRewriter

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(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(Map jormName2Mapper, Map jormName2Project, 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).

Method Summary

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

addRule, getDefaultRules, getRules, removeRule, setRuleConfiguration, transform

Constructor Details

JormQueryRewriter

public JormQueryRewriter(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


JormQueryRewriter

public JormQueryRewriter(Map jormName2Mapper,
                         Map jormName2Project,
                         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