|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.medor.query.jorm.lib.BasicJormExtent
This class is the common implementation of the jorm leaves (ClassExtent, GenClassExtent).
Field Summary | |
protected java.util.ArrayList |
fields
List of fields |
protected PNameField |
identifier
|
protected boolean |
includeSubclasses
Are objects of subclasses included. |
protected PMapper |
mapper
The mapper of the extent. |
protected DataStore |
myStore
The datastore of the extent |
protected java.lang.String |
name
Node name |
protected java.util.HashMap |
name2field
List of fields indexed by their name |
protected java.lang.String |
pnFieldName
Name of the field which is the PName of the extent |
protected java.lang.String |
projectName
|
Constructor Summary | |
BasicJormExtent(java.lang.String _name,
java.lang.String pnFieldName)
|
Method Summary | |
java.lang.Object |
clone()
|
boolean |
contains(Field f)
Checks whether a given input Field is present in the current TupleStructure. |
boolean |
contains(java.lang.String fieldName)
Checks whether the current TupleStructure has a field of a given name. |
DataStore |
getDataStore()
Methods inherited from QueryLeaf |
boolean |
getDistinct()
Tests whether the results should be distinct or not. |
Field |
getField(int fieldrank)
Returns the Field of a given rank in the current TupleStructure. |
Field |
getField(java.lang.String fieldname)
Returns a Field object present in this TupleStructure given its name. |
java.lang.String |
getFieldName(java.lang.String nodeName,
java.lang.String fieldName)
|
int |
getFieldRank(Field f)
Returns the rank of a given Field in the current TupleStructure. |
Field[] |
getFields()
Returns the array of Fields in the current TupleStructure. |
JormField |
getIdentifierField()
|
abstract java.lang.String |
getJormName()
|
java.lang.String |
getName()
It returns the name of the query tree. |
OrderField[] |
getOrderBy()
Returns the array of OrderFields indicating how the result should be ordered. |
PMapper |
getPMapper()
|
java.lang.String |
getPNameFieldName()
|
java.lang.String |
getProjectName()
|
int |
getSize()
Returns the size of the current TupleStructure, ie the number of Fields. |
TupleStructure |
getTupleStructure()
Methods inherited from QueryTree |
java.util.Iterator |
iterateFields()
|
void |
setDataStore(DataStore ds)
|
void |
setDistinct(boolean d)
Indicates whether evaluating the QueryTree should return unique results (duplicate elimination) or not. |
void |
setOrderBy(OrderField[] orderfields)
Sets the OrderBy array of OrderFields. |
void |
setPMapper(PMapper m,
java.lang.String projectName)
|
void |
setProjectName(java.lang.String projectName)
|
void |
setWithSubClasses(boolean incSubClasses)
Indicates whether the current Extent should also contain objects from the subclasses. |
boolean |
withSubClasses()
Tells whether the current Extent should also contain objects from the subclasses. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.medor.query.jorm.api.JormExtent |
getMetaObject |
Field Detail |
protected java.lang.String name
protected java.lang.String pnFieldName
protected PNameField identifier
protected java.util.ArrayList fields
protected java.util.HashMap name2field
protected DataStore myStore
protected PMapper mapper
protected java.lang.String projectName
protected boolean includeSubclasses
Constructor Detail |
public BasicJormExtent(java.lang.String _name, java.lang.String pnFieldName)
Method Detail |
public java.util.Iterator iterateFields()
public java.lang.String getFieldName(java.lang.String nodeName, java.lang.String fieldName)
public PMapper getPMapper()
getPMapper
in interface JormExtent
public void setPMapper(PMapper m, java.lang.String projectName)
setPMapper
in interface JormExtent
public java.lang.String getProjectName()
getProjectName
in interface JormExtent
public void setProjectName(java.lang.String projectName)
setProjectName
in interface JormExtent
public void setDataStore(DataStore ds)
setDataStore
in interface JormExtent
public java.lang.String getPNameFieldName()
getPNameFieldName
in interface JormExtent
public abstract java.lang.String getJormName()
getJormName
in interface JormExtent
public JormField getIdentifierField()
getIdentifierField
in interface JormExtent
public boolean withSubClasses()
JormExtent
The default is that only objects strictly in the current class are included, and not objects of the subclasses.
withSubClasses
in interface JormExtent
public void setWithSubClasses(boolean incSubClasses)
JormExtent
The default is that only objects strictly in the current class are included, and not objects of the subclasses.
setWithSubClasses
in interface JormExtent
incSubClasses
- is true if objects from subclasses are to be
included, false if only strict instances of the corresponding class
should be included.public java.lang.String getName()
QueryTree
getName
in interface QueryTree
public TupleStructure getTupleStructure()
getTupleStructure
in interface QueryTree
public DataStore getDataStore()
getDataStore
in interface QueryLeaf
public java.lang.Object clone()
clone
in interface Cloneable
public Field[] getFields()
TupleStructure
getFields
in interface TupleStructure
public Field getField(java.lang.String fieldname) throws MedorException
TupleStructure
getField
in interface TupleStructure
fieldname
- the name of the searched Field
MedorException
- if no Field corresponds to the input name.public Field getField(int fieldrank) throws MedorException
TupleStructure
getField
in interface TupleStructure
fieldrank
- the rank of the searched Field in the current
TupleStructure
MedorException
- if the input rank is too large.public int getFieldRank(Field f) throws MedorException
TupleStructure
getFieldRank
in interface TupleStructure
f
- the Field for which the rank is searched.
MedorException
- if there is no such Field in the current
TupleStructure.public int getSize()
TupleStructure
getSize
in interface TupleStructure
public boolean contains(Field f)
TupleStructure
contains
in interface TupleStructure
f
- the Field for which to check whether it is present in the
current TupleStructure.
public boolean contains(java.lang.String fieldName)
TupleStructure
contains
in interface TupleStructure
fieldName
- the Field name for which to check whether the current
TupleStructure contains a Field.
public void setDistinct(boolean d) throws MedorException
QueryTree
The default should be that duplicates are not eliminated (distinct is false).
setDistinct
in interface QueryTree
d
- is true if duplicates should be eliminated, false
otherwise.
MedorException
- if the distinct operation is not supported.public boolean getDistinct()
QueryTree
getDistinct
in interface QueryTree
public void setOrderBy(OrderField[] orderfields) throws MedorException
QueryTree
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
orderfields
- the array of OrderFields indicating the ordering in which
the result should be returned.
MedorException
- if ordering is not supported.public OrderField[] getOrderBy()
QueryTree
getOrderBy
in interface QueryTree
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |