org.objectweb.medor.query.lib
Class Unnest

java.lang.Object
  extended byBasicCloneable
      extended byorg.objectweb.medor.lib.BasicTupleStructure
          extended byorg.objectweb.medor.query.lib.BasicQueryTree
              extended byorg.objectweb.medor.query.lib.BasicQueryNode
                  extended byorg.objectweb.medor.query.lib.Unnest
All Implemented Interfaces:
AnnotationsHolder, Cloneable, java.lang.Cloneable, FilteredQueryTree, QueryNode, QueryTree, java.io.Serializable, TupleStructure, UnnestQueryNode

public class Unnest
extends BasicQueryNode
implements UnnestQueryNode

See Also:
Serialized Form

Field Summary
protected  PropagatedField[] projectedFields
           
protected  NestedField unnestedField
          It lists the fields which have been grouped.
 
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
annotations, distinct, name, orderfields
 
Fields inherited from class org.objectweb.medor.lib.BasicTupleStructure
fields, logger, name2field
 
Constructor Summary
Unnest()
           
Unnest(QueryTreeField[] queryTreeFields, Field field, java.lang.String nodeName)
           
 
Method Summary
 java.lang.Object clone(java.lang.Object clone, java.util.Map obj2clone)
           
 PropagatedField[] getProjectedFields()
          It give the fields wich will be projected with the fields of the nestedField
 short getType()
          It retrieves the operation type of the current QueryNode.
 NestedField getUnnestedField()
          It give the field wich will be de-grouped.
 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, getChildren, getFieldName, getQueryFilter, getTupleLoader, isOuter, removeField, replace, setOuter, setTupleLoader, updateCalculatedField, updateChildren, updatePropagatedField
 
Methods inherited from class org.objectweb.medor.query.lib.BasicQueryTree
getAnnotations, getDistinct, getName, getOrderBy, getTupleStructure, setDistinct, setOrderBy
 
Methods inherited from class org.objectweb.medor.lib.BasicTupleStructure
contains, contains, getField, getField, getFieldRank, getFields, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.medor.query.api.QueryNode
addCalculatedField, addPropagatedField, getChildren, getTupleLoader, isOuter, removeField, replace, setOuter, 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
 
Methods inherited from interface org.objectweb.medor.query.api.AnnotationsHolder
getAnnotations
 
Methods inherited from interface org.objectweb.medor.api.Cloneable
clone
 

Field Detail

unnestedField

protected NestedField unnestedField
It lists the fields which have been grouped.


projectedFields

protected PropagatedField[] projectedFields
Constructor Detail

Unnest

public Unnest()

Unnest

public Unnest(QueryTreeField[] queryTreeFields,
              Field field,
              java.lang.String nodeName)
       throws MedorException
Method Detail

clone

public java.lang.Object clone(java.lang.Object clone,
                              java.util.Map obj2clone)
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class BasicQueryNode
Throws:
java.lang.CloneNotSupportedException

getUnnestedField

public NestedField getUnnestedField()
Description copied from interface: UnnestQueryNode
It give the field wich will be de-grouped. The field is the old field.

Specified by:
getUnnestedField in interface UnnestQueryNode
Returns:
a field

getProjectedFields

public PropagatedField[] getProjectedFields()
Description copied from interface: UnnestQueryNode
It give the fields wich will be projected with the fields of the nestedField

Specified by:
getProjectedFields in interface UnnestQueryNode
Returns:
a field[]

getType

public short getType()
Description copied from interface: QueryNode
It retrieves the operation type of the current QueryNode.

Specified by:
getType in interface QueryNode
Specified by:
getType in class BasicQueryNode

setQueryFilter

public void setQueryFilter(Expression e)
Description copied from interface: FilteredQueryTree
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 class BasicQueryNode