|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.medor.optim.lib.BasicRule | +--org.objectweb.medor.optim.jorm.JormRule | +--org.objectweb.medor.optim.jorm.JormFlatten2Rdb
Nested Class Summary | |
class |
JormFlatten2Rdb.Join
A join linking two relational tables. |
class |
JormFlatten2Rdb.JoinColumn
It describes the join between two columns |
class |
JormFlatten2Rdb.RdbJormExtentMapping
Represents the mapping of a JormExtent over relational tables. |
Nested classes inherited from class org.objectweb.medor.optim.lib.BasicRule |
BasicRule.ModifiedExpression |
Field Summary |
Fields inherited from class org.objectweb.medor.optim.lib.BasicRule |
debug, log |
Constructor Summary | |
JormFlatten2Rdb()
|
Method Summary | |
Expression |
getDecode(PNameField pnf,
BasicRdbExpQueryLeaf leaf,
boolean add)
Create an expression to decode a PName. |
QueryTreeField |
getField(Field old,
BasicRdbExpQueryLeaf leaf,
boolean add)
Is a shorcut to the getField(String, PType, JormExtent, BasicRdbExpQueryLeaf) method. |
QueryTreeField |
getField(java.lang.String fieldname,
JormExtent extent,
BasicRdbExpQueryLeaf leaf,
boolean add)
Is a shorcut to the getField(String, PType, JormExtent, BasicRdbExpQueryLeaf) method. |
QueryTreeField |
getField(java.lang.String fieldname,
PType type,
JormExtent extent,
BasicRdbExpQueryLeaf leaf,
boolean add)
Adds a field in a leaf if it is not already present. |
JormFlatten2Rdb.RdbJormExtentMapping |
getMapping(int i)
Retrieves the RdbJormExtentMapping at the position i the packet. |
JormFlatten2Rdb.RdbJormExtentMapping |
getMapping(JormExtent je)
Retrieves the RdbJormExtentMapping at the position i the packet. |
QueryTree |
rewrite(QueryTree qt)
This method applies a single rule. |
Expression |
updateFieldOfExpression(Expression e,
BasicRdbExpQueryLeaf leaf,
boolean add)
Replaces the uses of the old fields of extents by fields of a leaf. |
Methods inherited from class org.objectweb.medor.optim.jorm.JormRule |
getClassMapping, getGenClassMapping, getJORMFieldName, getPEM, getPNCOperand, getPrimitiveElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JormFlatten2Rdb()
Method Detail |
public QueryTree rewrite(QueryTree qt) throws MedorException
RewriteRule
rewrite
in interface RewriteRule
rewrite
in class BasicRule
qt
- the QueryTree to be rewritten
MedorException
public JormFlatten2Rdb.RdbJormExtentMapping getMapping(int i)
i
- is position of the expected RdbJormExtentMapping
public JormFlatten2Rdb.RdbJormExtentMapping getMapping(JormExtent je)
je
- is the jorm extent which the mapping is expected
public Expression updateFieldOfExpression(Expression e, BasicRdbExpQueryLeaf leaf, boolean add) throws MedorException
e
- the expression to updateleaf
- is the field containing the new field.add
- indicates whether the Field should be added (it is projected)
or not (it is only in the Filter).
MedorException
- if it is not possible to fetch a new field in the
leaf or if the PName equality are malformedpublic Expression getDecode(PNameField pnf, BasicRdbExpQueryLeaf leaf, boolean add) throws MedorException
pnf
- is the PNameField linked to JormExtent which is the old
representation of the PName.leaf
- is the leaf which contains the field of the NameDef. It the
fields do not exist then they are created.
MedorException
- if the NameDef is not supported or if the a field
can not be created in the leaf.public QueryTreeField getField(Field old, BasicRdbExpQueryLeaf leaf, boolean add) throws MedorException
old
- is the old field
MedorException
- if an error occurs during the real getField call.public QueryTreeField getField(java.lang.String fieldname, JormExtent extent, BasicRdbExpQueryLeaf leaf, boolean add) throws MedorException
MedorException
- if the field is not found in the JORM meta
information or if an error occurs during the real getField call.public QueryTreeField getField(java.lang.String fieldname, PType type, JormExtent extent, BasicRdbExpQueryLeaf leaf, boolean add) throws MedorException
fieldname
- is the field name of the expected field.type
- is the jorm type of expected field.extent
- is the extent containing the old version of the expected
field.leaf
- is the leaf which must contain the expected field after the
the method call
MedorException
- if no old field is not availlable on the extent
or if no mapping is availlable for the field.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |