|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.medor.lib.BasicTupleStructure | +--org.objectweb.medor.query.lib.BasicQueryTree | +--org.objectweb.medor.query.lib.BasicQueryNode | +--org.objectweb.medor.query.lib.Nest
Field Summary | |
protected PropagatedField[] |
groupByField
It lists the fields which have been grouped. |
protected NestedField |
nestedField
|
Fields inherited from class org.objectweb.medor.query.lib.BasicQueryNode |
children, filter, indexes, tupleLoader |
Fields inherited from class org.objectweb.medor.query.lib.BasicQueryTree |
distinct, name, orderfields |
Fields inherited from class org.objectweb.medor.lib.BasicTupleStructure |
fields, name2field |
Constructor Summary | |
Nest(QueryTreeField[] groupedFields,
java.lang.String groupedFieldName,
QueryTreeField[] groupByField,
java.lang.String nodeName,
OptimizationMetaData optimizationMD)
Creates a QueryNode corresponding to a nest operation (group by). |
Method Summary | |
NestedField |
addNestedField(java.lang.String name,
QueryTreeField[] grouped)
Creates and adds a NestedField to the TupleStructure of the QueryNode. |
NestedField |
getNestedField()
Gives the new NestedField |
PropagatedField[] |
getNestingFields()
Gives the the fields which will be used to define groups. |
short |
getType()
It retrieves the operation type of the current QueryNode. |
void |
setQueryFilter(Expression e)
Sets the filter associated to the FilteredQueryTree. |
Methods inherited from class org.objectweb.medor.query.lib.BasicQueryNode |
addCalculatedField, addChild, addField, addPropagatedField, clone, getChildren, getDistinct, getFieldName, getName, getOptimizationMetaData, getQueryFilter, getTupleLoader, getTupleStructure, removeField, replace, setDistinct, setTupleLoader, updateCalculatedField, updateChildren, updatePropagatedField |
Methods inherited from class org.objectweb.medor.query.lib.BasicQueryTree |
getOrderBy, setOrderBy |
Methods inherited from class org.objectweb.medor.lib.BasicTupleStructure |
contains, contains, getField, getField, getFieldRank, getFields, getSize |
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.api.QueryNode |
addCalculatedField, addPropagatedField, getChildren, getOptimizationMetaData, getTupleLoader, removeField, replace, setTupleLoader, updateCalculatedField, updatePropagatedField |
Methods inherited from interface org.objectweb.medor.query.api.FilteredQueryTree |
getQueryFilter |
Methods inherited from interface org.objectweb.medor.query.api.QueryTree |
getDistinct, getName, getOrderBy, getTupleStructure, setDistinct, setOrderBy |
Field Detail |
protected PropagatedField[] groupByField
protected NestedField nestedField
Constructor Detail |
public Nest(QueryTreeField[] groupedFields, java.lang.String groupedFieldName, QueryTreeField[] groupByField, java.lang.String nodeName, OptimizationMetaData optimizationMD) throws MedorException
groupedFields
- is the array of Fields which are nested by the
operator. These are Fields of the child QueryTree.groupedFieldName
- is the name of the Field corresponding to the
nesting.groupByField
- is the array of Fields which are used for defining
the group to be nested (equivalent to SQL GROUP BY). These are Fields of
the child QueryTree. They are also called NestingFields.optimizationMD
- are meta data for optimization.Method Detail |
public NestedField addNestedField(java.lang.String name, QueryTreeField[] grouped) throws MedorException
addNestedField
in interface NestQueryNode
name
- is the name of the Field to be added.grouped
- are the grouped Fields for the NestedField to be created.
MedorException
- when a Field with the same name already exists.public void setQueryFilter(Expression e)
FilteredQueryTree
For a QueryNode:
This method also updates the list of QueryTree children of the current QueryNode according to the FieldOperands present in the Expression.
Usage constraint: if the QueryNode already has an associated Expression, and if this Expression has been modified, the user is requested to call the setQueryFilter method after the modification.
For a RbdQueryLeaf:
It sets the filter associated to the RbdQueryLeaf. This filter is represented by an Expression. Unlike the filter of a QueryNode, is applies to its own Fields, instead of the Fields of its children.
setQueryFilter
in interface FilteredQueryTree
setQueryFilter
in class BasicQueryNode
e
- is the Expression representing the query filter of the current
QueryNode.Expression
public PropagatedField[] getNestingFields()
NestQueryNode
getNestingFields
in interface NestQueryNode
public NestedField getNestedField()
NestQueryNode
getNestedField
in interface NestQueryNode
public short getType()
QueryNode
getType
in interface QueryNode
getType
in class BasicQueryNode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |