KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > hql > ast > tree > RestrictableStatement


1 // $Id: RestrictableStatement.java,v 1.1 2005/07/12 20:27:16 steveebersole Exp $
2
package org.hibernate.hql.ast.tree;
3
4 import antlr.collections.AST;
5
6 /**
7  * Type definition for Statements which are restrictable via a where-clause (and
8  * thus also having a from-clause).
9  *
10  * @author Steve Ebersole
11  */

12 public interface RestrictableStatement extends Statement {
13     /**
14      * Retreives the from-clause in effect for this statement.
15      *
16      * @return The from-clause for this statement; could be null if the from-clause
17      * has not yet been parsed/generated.
18      */

19     public FromClause getFromClause();
20
21     /**
22      * Does this statement tree currently contain a where clause?
23      *
24      * @return True if a where-clause is found in the statement tree and
25      * that where clause actually defines restrictions; false otherwise.
26      */

27     public boolean hasWhereClause();
28
29     /**
30      * Retreives the where-clause defining the restriction(s) in effect for
31      * this statement.
32      * <p/>
33      * Note that this will generate a where-clause if one was not found, so caution
34      * needs to taken prior to calling this that restrictions will actually exist
35      * in the resulting statement tree (otherwise "unexpected end of subtree" errors
36      * might occur during rendering).
37      *
38      * @return The where clause.
39      */

40     public AST getWhereClause();
41 }
42
Popular Tags