KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > medor > query > api > FilteredQueryTree


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

23 package org.objectweb.medor.query.api;
24
25 import org.objectweb.medor.expression.api.Expression;
26
27
28 /**
29  * This interface is implemented by all QueryTree which have a QueryFilter
30  * associated (QueryNode, RdbExpLeaf, ...).
31  *
32  * @author S.Chassande-Barrioz
33  */

34 public interface FilteredQueryTree extends QueryTree {
35
36     /**
37      * Retrieves the filter associated to the QueryTree. This filter is
38      * represented by an Expression.
39      * @return the query filter Expression associated to the QueryNode.
40      * @see Expression
41      */

42     Expression getQueryFilter();
43
44     /**
45      * Sets the filter associated to the FilteredQueryTree. This filter is
46      * represented by an Expression.
47      * <p>
48      * For a QueryNode:
49      * <p>
50      * This method also updates the list of QueryTree children of the current
51      * QueryNode according to the FieldOperands present in the Expression.
52      * <p>
53      * <b>Usage constraint:</b> if the QueryNode already has an associated
54      * Expression, and if this Expression has been modified, the user is
55      * requested to call the setQueryFilter method after the modification.
56      * <p>
57      * For a RbdQueryLeaf:
58      * <p>
59      * It sets the filter associated to the RbdQueryLeaf. This filter is
60      * represented by an Expression. Unlike the filter of a QueryNode, is
61      * applies to its own Fields, instead of the Fields of its children.
62      * @param e is the Expression representing the query filter of the current
63      * QueryNode.
64      * @throws UnsupportedOperationException when it is not supported
65      * (for Union, Intersection, Cartesian, Projection).
66      * @see Expression
67      */

68     void setQueryFilter(Expression e);
69 }
70
Popular Tags