org.objectweb.medor.query.jorm.lib
Class BasicJormExtent
- Cloneable, Cloneable, JormExtent, QueryLeaf, QueryTree, TupleStructure
public abstract class BasicJormExtent
This class is the common implementation of the jorm leaves (ClassExtent,
GenClassExtent).
- S.Chassande-Barrioz
includeSubclasses
protected boolean includeSubclasses
Are objects of subclasses included.
mapper
protected PMapper mapper
The mapper of the extent.
myStore
protected DataStore myStore
The datastore of the extent
name
protected String name
Node name
pnFieldName
protected String pnFieldName
Name of the field which is the PName of the extent
projectName
protected String projectName
BasicJormExtent
public BasicJormExtent()
BasicJormExtent
public BasicJormExtent(String _name,
String pnFieldName)
clone
public Object clone(Object clone,
Map obj2clone)
throws CloneNotSupportedException
- clone in interface BasicTupleStructure
getDistinct
public boolean getDistinct()
Tests whether the results should be distinct or not.
- getDistinct in interface QueryTree
- true if there results should be distinct, false otherwise.
getFieldName
public String getFieldName(String nodeName,
String fieldName)
getName
public String getName()
It returns the name of the query tree.
- getName in interface QueryTree
getOrderBy
public OrderField[] getOrderBy()
Returns the array of OrderFields indicating how the result should be
ordered.
- getOrderBy in interface QueryTree
- the array of OrderFields.
iterateFields
public Iterator iterateFields()
setDistinct
public void setDistinct(boolean d)
throws MedorException
Indicates whether evaluating the QueryTree should return unique results
(duplicate elimination) or not.
The default should be that duplicates are not eliminated (distinct
is false).
- setDistinct in interface QueryTree
MedorException
- if the distinct operation is not supported.
setOrderBy
public void setOrderBy(OrderField[] orderfields)
throws MedorException
Sets the OrderBy array of OrderFields.
This array indicates the fields by which the results should be
ordered.
Like for filters assigned to QueryNodes, the Fields used for ordering
must belong to children of the current QueryTree.
A noticeable exception is the case of RdbExpQueryLeaves, where
ordering fields are fields of the QueryLeaf itself.
- setOrderBy in interface QueryTree
MedorException
- if ordering is not supported.
setWithSubClasses
public void setWithSubClasses(boolean incSubClasses)
Indicates whether the current Extent should also contain objects from the
subclasses.
The default is that only objects strictly in the current class are
included, and not objects of the subclasses.
- setWithSubClasses in interface JormExtent
withSubClasses
public boolean withSubClasses()
Tells whether the current Extent should also contain objects from the
subclasses.
The default is that only objects strictly in the current class are
included, and not objects of the subclasses.
- withSubClasses in interface JormExtent
- true if objects from subclasses are to be included, false if
only strict instances of the corresponding class should be included.