org.objectweb.medor.query.lib

Class Unnest

Implemented Interfaces:
Cloneable, Cloneable, FilteredQueryTree, QueryNode, QueryTree, TupleStructure, UnnestQueryNode

public class Unnest
extends BasicQueryNode
implements UnnestQueryNode

MEDOR: Middleware Enabling Distributed Object Requests Copyright (C) 2001-2004 France Telecom R&D Contact: alexandre.lefebvre@rd.francetelecom.com This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Initial developers: M. Alia, S. Chassande-Barrioz, A. Lefebvre

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

distinct, indexes, name, orderfields

Fields inherited from class org.objectweb.medor.lib.BasicTupleStructure

fields, logger, name2field

Constructor Summary

Unnest()
Unnest(QueryTreeField[] queryTreeFields, Field field, String nodeName)

Method Summary

Object
clone(Object clone, Map obj2clone)
PropagatedField[]
getProjectedFields()
short
getType()
NestedField
getUnnestedField()
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, clone, getChildren, getFieldName, getQueryFilter, getTupleLoader, getType, isOuter, removeField, replace, setOuter, setQueryFilter, setTupleLoader, updateCalculatedField, updateChildren, updatePropagatedField

Methods inherited from class org.objectweb.medor.query.lib.BasicQueryTree

clone, getDistinct, getName, getOrderBy, getTupleStructure, setDistinct, setOrderBy

Methods inherited from class org.objectweb.medor.lib.BasicTupleStructure

clone, contains, contains, getField, getField, getFieldRank, getFields, getSize

Field Details

projectedFields

protected PropagatedField[] projectedFields


unnestedField

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

Constructor Details

Unnest

public Unnest()


Unnest

public Unnest(QueryTreeField[] queryTreeFields,
              Field field,
              String nodeName)
            throws MedorException

Method Details

clone

public Object clone(Object clone,
                    Map obj2clone)
            throws CloneNotSupportedException
Overrides:
clone in interface BasicQueryNode


getProjectedFields

public PropagatedField[] getProjectedFields()
Specified by:
getProjectedFields in interface UnnestQueryNode


getType

public short getType()
Specified by:
getType in interface QueryNode
Overrides:
getType in interface BasicQueryNode


getUnnestedField

public NestedField getUnnestedField()
Specified by:
getUnnestedField in interface UnnestQueryNode


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.

Specified by:
setQueryFilter in interface FilteredQueryTree
Overrides:
setQueryFilter in interface BasicQueryNode

Parameters:
e - is the Expression representing the query filter of the current QueryNode.

See Also:
Expression