org.objectweb.medor.api
Interface TupleStructure
- Cloneable
- MultivaluedField, NestedField
- AggregateRdbQueryNode, BasicJormExtent, BasicMultivaluedField, BasicNestedField, BasicQueryNode, BasicQueryTree, BasicRdbExpQueryLeaf, BasicRdbQueryLeaf, BasicRdbStringQueryLeaf, BasicTupleStructure, Cartesian, ClassExtent, GenClassExtent, Intersection, JoinProject, MedorTCQueryLeaf, Nest, Project, SelectProject, Union, Unnest
public interface TupleStructure
A TupleStructure is the basic data structure manipulated when expressing,
optimizing and evaluating MEDOR queries.
A TupleStructure is composed of typed, named fields.
Field names are unique within a given TupleStructure.
- Sebastien Chassande-Barrioz
Field
boolean | contains(String fieldName)- Checks whether the current TupleStructure has a field of a given name.
|
boolean | contains(Field f)- Checks whether a given input Field is present in the current
TupleStructure.
|
Field | getField(String fieldname)- Returns a Field object present in this TupleStructure given its name.
|
Field | getField(int fieldrank)- Returns the Field of a given rank in the current TupleStructure.
|
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.
|
int | getSize()- Returns the size of the current TupleStructure, ie the number of
Fields.
|
contains
public boolean contains(String fieldName)
Checks whether the current TupleStructure has a field of a given name.
fieldName - the Field name for which to check whether the current
TupleStructure contains a Field.
- true if the current TupleStructure contains a Field of the input
name, false otherwise.
contains
public boolean contains(Field f)
Checks whether a given input Field is present in the current
TupleStructure.
f - the Field for which to check whether it is present in the
current TupleStructure.
- true if the Field is part of the current TupleStructure, false
otherwise.
getField
public Field getField(String fieldname)
throws MedorException Returns a Field object present in this TupleStructure given its name.
fieldname - the name of the searched Field
- the Field in the current TupleStructure which has the input name.
MedorException - if no Field corresponds to the input name.
getField
public Field getField(int fieldrank)
throws MedorException Returns the Field of a given rank in the current TupleStructure.
fieldrank - the rank of the searched Field in the current
TupleStructure
- the Field in the current TupleStructure corresponding to the
input rank.
MedorException - if the input rank is too large.
getFieldRank
public int getFieldRank(Field f)
throws MedorException Returns the rank of a given Field in the current TupleStructure.
f - the Field for which the rank is searched.
- the rank of the input Field in the current TupleStructure.
MedorException - if there is no such Field in the current
TupleStructure.
getFields
public Field[] getFields()
Returns the array of Fields in the current TupleStructure.
- the array of Fields in the current TupleStructure.
getSize
public int getSize()
Returns the size of the current TupleStructure, ie the number of
Fields.
- the number of Fields in the current TupleStructure.