org.objectweb.medor.query.api
Interface QueryNode

All Superinterfaces:
AnnotationsHolder, java.lang.Cloneable, FilteredQueryTree, QueryTree, java.io.Serializable
All Known Subinterfaces:
NestQueryNode, UnnestQueryNode
All Known Implementing Classes:
AggregateRdbQueryNode, BasicQueryNode, Nest, Unnest

public interface QueryNode
extends FilteredQueryTree

Author:
Sebastien Chassande-Barrioz

Method Summary
 CalculatedField addCalculatedField(java.lang.String name, PType type, Expression exp)
          Creates and adds a CalculatedField to the TupleStructure of the QueryNode.
 PropagatedField addPropagatedField(java.lang.String name, PType type, QueryTreeField[] anc)
          Creates and adds a PropagatedField to the TupleStructure of the QueryNode.
 QueryTree[] getChildren()
          It retreives the array of the QueryTree used by this QueryNode.
 TupleLoader getTupleLoader()
          Returns the TupleLoader currently associated with this QueryNode.
 short getType()
          It retrieves the operation type of the current QueryNode.
 boolean isOuter(QueryTree child)
          Indicates whether a row of nulls should be inserted for the given child if the filter condition fails for all rows in that child.
 QueryTreeField removeField(java.lang.String name)
          Removes a Field.
 QueryTreeField replace(QueryTreeField old, QueryTreeField neo)
           
 void setOuter(QueryTree child, boolean outer)
           
 void setTupleLoader(TupleLoader loader)
          Associates a TupleLoader with this QueryNode.
 void updateCalculatedField(java.lang.String name, Expression e)
           
 void updatePropagatedField(java.lang.String name, QueryTreeField[] previous)
           
 
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

addPropagatedField

public PropagatedField addPropagatedField(java.lang.String name,
                                          PType type,
                                          QueryTreeField[] anc)
                                   throws MedorException
Creates and adds a PropagatedField to the TupleStructure of the QueryNode.

Parameters:
name - is the name of the Field to be added. If null, the name is computed from the origin Fields (parameter anc).
type - is the PType of the Field to be added. If null, the type is computed from the origin Fields (parameter anc).
anc - are the origin Fields for the PropagatedField to be created.
Returns:
the newly created PropagatedField
Throws:
MedorException - when a Field with the same name already exists.

addCalculatedField

public CalculatedField addCalculatedField(java.lang.String name,
                                          PType type,
                                          Expression exp)
                                   throws MedorException
Creates and adds a CalculatedField to the TupleStructure of the QueryNode.

Parameters:
name - is the name of the Field to be added.
type - is the PType of the Field to be added.
exp - is the Expression for calculating the new Field.
Returns:
the newly created CalculatedField
Throws:
MedorException - when a Field with the same name already exists.

removeField

public QueryTreeField removeField(java.lang.String name)
                           throws MedorException
Removes a Field.

Parameters:
name - is the name of the Field to be removed.
Returns:
the Field which has been removed, or null if no such Field could be removed.
Throws:
MedorException - when no Field with such name exist.

getChildren

public QueryTree[] getChildren()
It retreives the array of the QueryTree used by this QueryNode.


isOuter

public boolean isOuter(QueryTree child)
Indicates whether a row of nulls should be inserted for the given child if the filter condition fails for all rows in that child.


setOuter

public void setOuter(QueryTree child,
                     boolean outer)

getType

public short getType()
It retrieves the operation type of the current QueryNode.


getTupleLoader

public TupleLoader getTupleLoader()
Returns the TupleLoader currently associated with this QueryNode. Note that TupleLoaders are only used at evaluation time.


setTupleLoader

public void setTupleLoader(TupleLoader loader)
Associates a TupleLoader with this QueryNode.


updatePropagatedField

public void updatePropagatedField(java.lang.String name,
                                  QueryTreeField[] previous)
                           throws MedorException
Throws:
MedorException

updateCalculatedField

public void updateCalculatedField(java.lang.String name,
                                  Expression e)
                           throws MedorException
Throws:
MedorException

replace

public QueryTreeField replace(QueryTreeField old,
                              QueryTreeField neo)