org.objectweb.medor.query.api
Interface NestQueryNode

All Superinterfaces:
AnnotationsHolder, java.lang.Cloneable, FilteredQueryTree, QueryNode, QueryTree, java.io.Serializable
All 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
 QueryTreeField getNestingField(java.lang.String fieldName)
           
 QueryTreeField[] getNestingFields()
          Gives the the fields which will be used to define groups.
 NestedField replaceNestedField(java.lang.String name, Field[] anc)
          Creates and adds a NestedField to the TupleStructure of the QueryNode.
 QueryTreeField replaceNestingField(QueryTreeField old, QueryTreeField neo)
           
 
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.FilteredQueryTree
getQueryFilter, setQueryFilter
 
Methods inherited from interface org.objectweb.medor.query.api.QueryTree
getDistinct, getName, getOrderBy, getTupleStructure, setDistinct, setOrderBy
 
Methods inherited from interface org.objectweb.medor.query.api.AnnotationsHolder
getAnnotations
 

Method Detail

replaceNestedField

public NestedField replaceNestedField(java.lang.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.

getNestingFields

public QueryTreeField[] 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.

getNestingField

public QueryTreeField getNestingField(java.lang.String fieldName)

replaceNestingField

public QueryTreeField replaceNestingField(QueryTreeField old,
                                          QueryTreeField neo)

getNestedField

public NestedField getNestedField()
Gives the new NestedField