KickJava   Java API By Example, From Geeks To Geeks.

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


1 // $Id: SelectExpression.java,v 1.1 2005/07/12 20:27:16 steveebersole Exp $
2
package org.hibernate.hql.ast.tree;
3
4 import org.hibernate.type.Type;
5
6 import antlr.SemanticException;
7
8 /**
9  * Represents an element of a projection list, i.e. a select expression.
10  *
11  * @author josh Sep 21, 2004 9:00:13 PM
12  */

13 public interface SelectExpression {
14     /**
15      * Returns the data type of the select expression.
16      *
17      * @return The data type of the select expression.
18      */

19     Type getDataType();
20
21     /**
22      * Appends AST nodes that represent the columns after the current AST node.
23      * (e.g. 'as col0_O_')
24      *
25      * @param i The index of the select expression in the projection list.
26      */

27     void setScalarColumnText(int i) throws SemanticException;
28
29     /**
30      * Returns the FROM element that this expression refers to.
31      *
32      * @return The FROM element.
33      */

34     FromElement getFromElement();
35
36     /**
37      * Returns true if the element is a constructor (e.g. new Foo).
38      *
39      * @return true if the element is a constructor (e.g. new Foo).
40      */

41     boolean isConstructor();
42
43     /**
44      * Returns true if this select expression represents an entity that can be returned.
45      *
46      * @return true if this select expression represents an entity that can be returned.
47      */

48     boolean isReturnableEntity() throws SemanticException;
49
50     /**
51      * Sets the text of the node.
52      *
53      * @param text the new node text.
54      */

55     void setText(String JavaDoc text);
56
57     boolean isScalar() throws SemanticException;
58     
59     void setAlias(String JavaDoc alias);
60     String JavaDoc getAlias();
61 }
62
Popular Tags