Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
BasicCloneable
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[] |
|
protected NestedField |
Fields inherited from class org.objectweb.medor.query.lib.BasicQueryNode | |
children , filter , indexes , inner , tupleLoader |
Fields inherited from class org.objectweb.medor.query.lib.BasicQueryTree | |
distinct , indexes , name , orderfields |
Fields inherited from class org.objectweb.medor.lib.BasicTupleStructure | |
fields , logger , name2field |
Constructor Summary | |
| |
|
Method Summary | |
Object |
|
NestedField |
|
PropagatedField[] |
|
short |
|
NestedField |
|
void |
|
Methods inherited from class org.objectweb.medor.query.lib.BasicQueryNode | |
addCalculatedField , addChild , addField , addPropagatedField , clone , getChildren , getFieldName , getQueryFilter , getTupleLoader , getType , isOuter , removeField , replace , setOuter , setQueryFilter , setTupleLoader , updateCalculatedField , updateChildren , updatePropagatedField |
Methods inherited from class org.objectweb.medor.query.lib.BasicQueryTree | |
clone , getDistinct , getName , getOrderBy , getTupleStructure , setDistinct , setOrderBy |
Methods inherited from class org.objectweb.medor.lib.BasicTupleStructure | |
clone , contains , contains , getField , getField , getFieldRank , getFields , getSize |
protected PropagatedField[] myGroupByFields
It lists the fields which have been grouped.
public Nest()
public Nest(QueryTreeField[] groupedFields, String groupedFieldName, QueryTreeField[] groupByFields, String nodeName) throws MedorException
Creates a QueryNode corresponding to a nest operation (group by). The Fields that are grouped and those that are used for the grouping must come from one single (child) QueryTree.
- Parameters:
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.groupByFields
- 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.
public Object clone(Object clone, Map obj2clone) throws CloneNotSupportedException
- Overrides:
- clone in interface BasicQueryNode
public NestedField getNestedField()
Gives the new NestedField
- Specified by:
- getNestedField in interface NestQueryNode
public PropagatedField[] getNestingFields()
Gives the the fields which will be used to define groups. Typically, this corresponds to the "group by" clause of SQL. Other fields can be used to construct a TupleCollection, containing all values of such fields for a given group.
- Specified by:
- getNestingFields in interface NestQueryNode
- Returns:
- an array of field giving the grouping fields.
public short getType()
It retrieves the operation type of the current QueryNode.
- Overrides:
- getType in interface BasicQueryNode
public NestedField replaceNestedField(String name, Field[] grouped) throws MedorException
Creates and adds a NestedField to the TupleStructure of the QueryNode.
- Specified by:
- replaceNestedField in interface NestQueryNode
- Parameters:
name
- is the name of the Field to be added.grouped
- are the grouped Fields for the NestedField to be created.
- Returns:
- the newly created NestedField
- Throws:
MedorException
- when a Field with the same name already exists.
public void setQueryFilter(Expression e)
Sets the filter associated to the FilteredQueryTree. This filter is represented by an Expression. 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.
- Specified by:
- setQueryFilter in interface FilteredQueryTree
- Overrides:
- setQueryFilter in interface BasicQueryNode
- Parameters:
e
- is the Expression representing the query filter of the current QueryNode.
- See Also:
Expression