org.objectweb.medor.query.jorm.lib
Class ClassExtent
java.lang.Object
|
+--org.objectweb.medor.query.jorm.lib.BasicJormExtent
|
+--org.objectweb.medor.query.jorm.lib.ClassExtent
- All Implemented Interfaces:
- java.lang.Cloneable, Cloneable, JormExtent, QueryLeaf, QueryTree, TupleStructure
- public class ClassExtent
- extends BasicJormExtent
This class represents the extent of a JORM class.
It contains and implements its associated TupleStructure.
Constructor Summary |
ClassExtent(java.lang.Class jormClass,
java.lang.String _name,
java.lang.String[] fieldNames,
boolean addPName,
java.lang.String pnameFieldName)
Constructs an extent for the JORM class, in the form of a QueryLeaf. |
ClassExtent(java.lang.Class jormClass,
java.lang.String _name,
java.lang.String pnameFieldName,
boolean classPNameOnly)
Constructs an extent for the JORM class, in the form of a QueryLeaf. |
Methods inherited from class org.objectweb.medor.query.jorm.lib.BasicJormExtent |
clone, contains, contains, getDataStore, getDistinct, getField, getField, getFieldName, getFieldRank, getFields, getIdentifierField, getName, getOrderBy, getPMapper, getPNameFieldName, getProjectName, getSize, getTupleStructure, iterateFields, setDataStore, setDistinct, setOrderBy, setPMapper, setProjectName |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassExtent
public ClassExtent(java.lang.Class jormClass,
java.lang.String _name,
java.lang.String pnameFieldName,
boolean classPNameOnly)
throws MedorException
- Constructs an extent for the JORM class, in the form of a QueryLeaf.
Two options are possible, depending on the value of the classPNameOnly
parameter:
- either all attributes of the JORM class are present in the
QueryLeaf
- or only the PName attribute is present in the QueryLeaf
- Parameters:
jormClass
- is the JORM full class name._name
- is the name of the node (null value => empty string)classPNameOnly
- indicates whether the extent should contain only
the PName for the class (if true) or all attributes for that class
(if false).
ClassExtent
public ClassExtent(java.lang.Class jormClass,
java.lang.String _name,
java.lang.String[] fieldNames,
boolean addPName,
java.lang.String pnameFieldName)
throws MedorException
- Constructs an extent for the JORM class, in the form of a QueryLeaf.
The field names for those fields which are part of the extent are
passed as a parameter. The fact that the PName is part of the extent
is optional.
- Parameters:
jormClass
- is the JORM full class name._name
- is the name of the node (null value => empty string)fieldNames
- is an array of JORM field names which should be present
in the extentaddPName
- is a boolean which is true if the PName should be part
of the extent, false otherwise.
- Throws:
MedorException
- if one of the requested fieldNames does not
correspond to a field of the JORM class.
addField
public QueryTreeField addField(TypedElement te)
throws MedorException
- It adds a new Field into the tuple structure.
- Parameters:
te
- is the jorm Meta object TypedElement which is the source of
the field
pname or the gen class pname.
MedorException
getMetaObject
public MetaObject getMetaObject()
getJormName
public java.lang.String getJormName()
- Specified by:
getJormName
in interface JormExtent
- Specified by:
getJormName
in class BasicJormExtent