org.objectweb.medor.query.api

Interface NestQueryNode

All Superinterfaces:
Cloneable, FilteredQueryTree, QueryNode, QueryTree
Known Implementing Classes:
AggregateRdbQueryNode, Nest

public interface NestQueryNode
extends QueryNode

All nesting fields (group by) are projected. As an example, it is NOT possible to do select a from r group by a, b. This operation must be decomposed into select a, b from r group by a, b followed by select a from result.

Author:
Sebastien Chassande-Barrioz

Method Summary

NestedField
getNestedField()
Gives the new NestedField
PropagatedField[]
getNestingFields()
Gives the the fields which will be used to define groups.
NestedField
replaceNestedField(String name, Field[] anc)
Creates and adds a NestedField to the TupleStructure of the QueryNode.

Methods inherited from interface org.objectweb.medor.query.api.FilteredQueryTree

getQueryFilter, setQueryFilter

Methods inherited from interface org.objectweb.medor.query.api.QueryNode

addCalculatedField, addPropagatedField, getChildren, getTupleLoader, getType, isOuter, removeField, replace, setOuter, setTupleLoader, updateCalculatedField, updatePropagatedField

Methods inherited from interface org.objectweb.medor.query.api.QueryTree

getDistinct, getName, getOrderBy, getTupleStructure, setDistinct, setOrderBy

Method Details

getNestedField

public NestedField getNestedField()
Gives the new NestedField


getNestingFields

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.

Returns:
an array of field giving the grouping fields.


replaceNestedField

public NestedField replaceNestedField(String name,
                                      Field[] anc)
            throws MedorException
Creates and adds a NestedField to the TupleStructure of the QueryNode.

Parameters:
name - is the name of the Field to be added.
anc - 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.