org.hibernate.hql.ast.tree
Class SelectClause

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by org.hibernate.hql.ast.tree.Node
              extended by org.hibernate.hql.ast.tree.SqlNode
                  extended by org.hibernate.hql.ast.tree.HqlSqlWalkerNode
                      extended by org.hibernate.hql.ast.tree.SelectExpressionList
                          extended by org.hibernate.hql.ast.tree.SelectClause
All Implemented Interfaces:
antlr.collections.AST, Serializable, InitializeableNode

public class SelectClause
extends SelectExpressionList

Represents the list of expressions in a SELECT clause.

Author:
josh Sep 21, 2004 7:53:55 AM
See Also:
Serialized Form

Field Summary
static boolean VERSION2_SQL
           
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
SelectClause()
           
 
Method Summary
 List getCollectionFromElements()
           
 String[][] getColumnNames()
          The column alias names being used in the generated SQL.
 Constructor getConstructor()
          The constructor to use for dynamic instantiation queries.
protected  antlr.collections.AST getFirstSelectExpression()
          Returns the first select expression node that should be considered when building the array of select expressions.
 List getFromElementsForLoad()
          FromElements which need to be accounted for in the load phase (either for return or for fetch).
 String[] getQueryReturnAliases()
          The HQL aliases, or generated aliases
 Type[] getQueryReturnTypes()
          The types actually being returned from this query at the "object level".
 void initializeDerivedSelectClause(FromClause fromClause)
          Prepares a derived (i.e., not explicitly defined in the query) select clause.
 void initializeExplicitSelectClause(FromClause fromClause)
          Prepares an explicitly defined select clause.
 boolean isDistinct()
           
 boolean isList()
           
 boolean isMap()
           
 boolean isScalarSelect()
          Does this SelectClause represent a scalar query
 
Methods inherited from class org.hibernate.hql.ast.tree.SelectExpressionList
collectSelectExpressions
 
Methods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
getAliasGenerator, getASTFactory, getSessionFactoryHelper, getWalker, initialize
 
Methods inherited from class org.hibernate.hql.ast.tree.SqlNode
getDataType, getOriginalText, setDataType, setText
 
Methods inherited from class org.hibernate.hql.ast.tree.Node
getColumn, getFilename, getLine, getRenderText, getTextLength, initialize, initialize
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION2_SQL

public static boolean VERSION2_SQL
Constructor Detail

SelectClause

public SelectClause()
Method Detail

isScalarSelect

public boolean isScalarSelect()
Does this SelectClause represent a scalar query

Returns:
True if this is a scalara select clause; false otherwise.

isDistinct

public boolean isDistinct()

getFromElementsForLoad

public List getFromElementsForLoad()
FromElements which need to be accounted for in the load phase (either for return or for fetch).

Returns:
List of appropriate FromElements.

getQueryReturnTypes

public Type[] getQueryReturnTypes()
The types actually being returned from this query at the "object level".

Returns:
The query return types.

getQueryReturnAliases

public String[] getQueryReturnAliases()
The HQL aliases, or generated aliases


getColumnNames

public String[][] getColumnNames()
The column alias names being used in the generated SQL.

Returns:
The SQL column aliases.

getConstructor

public Constructor getConstructor()
The constructor to use for dynamic instantiation queries.

Returns:
The appropriate Constructor reference, or null if not a dynamic instantiation query.

isMap

public boolean isMap()

isList

public boolean isList()

initializeExplicitSelectClause

public void initializeExplicitSelectClause(FromClause fromClause)
                                    throws antlr.SemanticException
Prepares an explicitly defined select clause.

Parameters:
fromClause - The from clause linked to this select clause.
Throws:
antlr.SemanticException

initializeDerivedSelectClause

public void initializeDerivedSelectClause(FromClause fromClause)
                                   throws antlr.SemanticException
Prepares a derived (i.e., not explicitly defined in the query) select clause.

Parameters:
fromClause - The from clause to which this select clause is linked.
Throws:
antlr.SemanticException

getFirstSelectExpression

protected antlr.collections.AST getFirstSelectExpression()
Description copied from class: SelectExpressionList
Returns the first select expression node that should be considered when building the array of select expressions.

Specified by:
getFirstSelectExpression in class SelectExpressionList
Returns:
the first select expression node that should be considered when building the array of select expressions

getCollectionFromElements

public List getCollectionFromElements()