org.objectweb.medor.optim.jorm
Class JormRule
- RewriteRule
public abstract class JormRule
This class is a tool for the management of the JormExtent.
It is used for the
replacement of JormExtent instances into specific QueryLeaf instances.
- S.Chassande-Barrioz
protected ClassMapping | getClassMapping(JormExtent extent) - Retrieves the jorm meta object describing the mapping of the persistent
object representing by its extent.
|
protected GenClassMapping | getGenClassMapping(JormExtent extent) - Retrieves the jorm meta object describing the mapping of the persistent
object representing by its extent.
|
protected String | getJORMFieldName(String fullName, JormExtent ext) - Returns the field name without the extent name
|
protected PrimitiveElementMapping | getPEM(JormExtent extent, String fieldName) - Retrieves the RdbPrimitiveElementMapping of a field
|
protected Operand | getPNCOperand(JormExtent extent, PNameField pnf) - Retrieves the Operand representing the PNameCoder needed to decode a
pname.
|
protected PrimitiveElement | getPrimitiveElement(JormExtent extent, String fieldname) - Retrieves the primitive element corresponding to a field name of
a jorm object (class or generic class).
|
JormRule
public JormRule(String suffix)
getClassMapping
protected ClassMapping getClassMapping(JormExtent extent)
throws MedorException
Retrieves the jorm meta object describing the mapping of the persistent
object representing by its extent. This method must be call with a
ClassExtent instance. It retrieves a RdbClassMultiMapping instance.
The JormExtent instance must contain the project name and the mapper
instance.
extent
- must be a ClassExtent instance.
- a RdbClassMultiMapping instance
MedorException
- if no class mapping has been found for the project
name and the mapper specified by the JormExtent.
getGenClassMapping
protected GenClassMapping getGenClassMapping(JormExtent extent)
throws MedorException
Retrieves the jorm meta object describing the mapping of the persistent
object representing by its extent. This method must be call with a
GenClassExtent instance. It retrieves a RdbGenClassMapping instance.
The JormExtent instance must contain the project name and the mapper
instance.
extent
- must be a ClassExtent instance.
- a RdbGenClassMapping instance
MedorException
- if no class mapping has been found for the project
name and the mapper specified by the JormExtent.
getJORMFieldName
protected String getJORMFieldName(String fullName,
JormExtent ext)
Returns the field name without the extent name
fullName
- the full field name containing the extent nameext
- the extent
- the abridged field name
getPEM
protected PrimitiveElementMapping getPEM(JormExtent extent,
String fieldName)
throws MedorException
Retrieves the RdbPrimitiveElementMapping of a field
extent
- the extent of a persistent class (ClassExtent
or GenClassExtent)fieldName
- is the name of the field which the mapping is expected
MedorException
- if the extent is not managed or if the field does
not have a mapping.
getPNCOperand
protected Operand getPNCOperand(JormExtent extent,
PNameField pnf)
Retrieves the Operand representing the PNameCoder needed to decode a
pname. If the mapper is assigned to the extent and the persistent class
is initialized then a constant operand is returned. Otherwise a
ParameterOperand is returned.
extent
- can contain the mapperpnf
- is the field representing the PName to be decoded
- a Operand instance.
getPrimitiveElement
protected PrimitiveElement getPrimitiveElement(JormExtent extent,
String fieldname)
throws MedorException
Retrieves the primitive element corresponding to a field name of
a jorm object (class or generic class).
extent
- represents the Jorm persistent class and references the
Jorm meta object containing the expected jorm meta object.fieldname
- is the name of the
MedorException
- if the field does not exist.