org.hibernate.hql.ast.tree

Class SelectClause

Implemented Interfaces:
InitializeableNode

public class SelectClause
extends SelectExpressionList

Represents the list of expressions in a SELECT clause.
Author:
josh Sep 21, 2004 7:53:55 AM

Field Summary

static boolean
VERSION2_SQL

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 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, getFirstSelectExpression

Methods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode

getASTFactory, getAliasGenerator, 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

Field Details

VERSION2_SQL

public static boolean VERSION2_SQL

Method Details

getCollectionFromElements

public List getCollectionFromElements()

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.

getFirstSelectExpression

protected AST getFirstSelectExpression()
Returns the first select expression node that should be considered when building the array of select expressions.
Overrides:
getFirstSelectExpression in interface SelectExpressionList
Returns:
the first select expression node that should be considered when building the array of select expressions

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.

getQueryReturnAliases

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

getQueryReturnTypes

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

initializeDerivedSelectClause

public void initializeDerivedSelectClause(FromClause fromClause)
            throws 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.

initializeExplicitSelectClause

public void initializeExplicitSelectClause(FromClause fromClause)
            throws SemanticException
Prepares an explicitly defined select clause.
Parameters:
fromClause - The from clause linked to this select clause.

isDistinct

public boolean isDistinct()

isList

public boolean isList()

isMap

public boolean isMap()

isScalarSelect

public boolean isScalarSelect()
Does this SelectClause represent a scalar query
Returns:
True if this is a scalara select clause; false otherwise.