org.objectweb.medor.query.api
Interface FilteredQueryTree

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

public interface FilteredQueryTree
extends QueryTree

This interface is implemented by all QueryTree which have a QueryFilter associated (QueryNode, RdbExpLeaf, ...).

Author:
S.Chassande-Barrioz

Method Summary
 Expression getQueryFilter()
          Retrieves the filter associated to the QueryTree.
 void setQueryFilter(Expression e)
          Sets the filter associated to the FilteredQueryTree.
 
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

getQueryFilter

public Expression getQueryFilter()
Retrieves the filter associated to the QueryTree. This filter is represented by an Expression.

Returns:
the query filter Expression associated to the QueryNode.
See Also:
Expression

setQueryFilter

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.

Parameters:
e - is the Expression representing the query filter of the current QueryNode.
Throws:
java.lang.UnsupportedOperationException - when it is not supported (for Union, Intersection, Cartesian, Projection).
See Also:
Expression