Top Description Fields Constructors Methods
org.hibernate.hql.ast.tree

public Class SelectClause

extends SelectExpressionList
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .Iterator, .List, org.hibernate.hql.antlr.SqlTokenTypes, org.hibernate.hql.ast.util.ASTAppender, .ASTIterator, .ASTPrinter, org.hibernate.type.Type, org.hibernate.QueryException, antlr.SemanticException, antlr.collections.AST

Represents the list of expressions in a SELECT clause.
Author
josh

Field Summary

Modifier and TypeField and Description
private AggregatedSelectExpression
private String[]
private List<E>
private String[][]
private int[]
private List<E>
private boolean
private Type[]
private boolean
public static boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
addCollectionFromElement(FromElement fromElement)

Deprecated as a consequence of FromElement being deprecated.
private void
finishInitialization(ArrayList<E> queryReturnTypeList)

public AggregatedSelectExpression
public List<E>
public String[][]

Returns:

The SQL column aliases.
getColumnNames
()

The column alias names being used in the generated SQL.

public int
protected AST
getFirstSelectExpression()

Implements abstract org.hibernate.hql.ast.tree.SelectExpressionList.getFirstSelectExpression.

Returns the first select expression node that should be considered when building the array of select expressions.
public List<E>

Returns:

List of appropriate FromElements.
getFromElementsForLoad
()

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

public String[]

Returns:

the aliases
getQueryReturnAliases
()

The HQL aliases, or generated aliases

public Type[]

Returns:

The query return types.
getQueryReturnTypes
()

The types actually being returned from this query at the "object level".

private void
initAliases(SelectExpression[] selectExpressions)

private void
public void
initializeDerivedSelectClause(FromClause
The from clause to which this select clause is linked.
fromClause
)

Prepares a derived (i.e., not explicitly defined in the query) select clause.

public void
initializeExplicitSelectClause(FromClause
The from clause linked to this select clause.
fromClause
)

Prepares an explicitly defined select clause.

public boolean
private boolean
public boolean

Returns:

True if this is a scalara select clause; false otherwise.
isScalarSelect
()

Does this SelectClause represent a scalar query

private void
renderNonScalarIdentifiers(FromElement fromElement, int nonscalarSize, int j, SelectExpression expr, ASTAppender appender)

Deprecated as a consequence of FromElement being deprecated.
private void
renderNonScalarProperties(ASTAppender appender, FromElement fromElement, int nonscalarSize, int k)

Deprecated as a consequence of FromElement being deprecated.
private void
renderNonScalarSelects(SelectExpression[] selectExpressions, FromClause currentFromClause)

private void
Inherited from org.hibernate.hql.ast.tree.SelectExpressionList:
collectSelectExpressions

Field Detail

aggregatedSelectExpressionback to summary
private AggregatedSelectExpression aggregatedSelectExpression
aliasesback to summary
private String[] aliases
collectionFromElementsback to summary
private List<E> collectionFromElements
columnNamesback to summary
private String[][] columnNames
columnNamesStartPositionsback to summary
private int[] columnNamesStartPositions
fromElementsForLoadback to summary
private List<E> fromElementsForLoad
preparedback to summary
private boolean prepared
queryReturnTypesback to summary
private Type[] queryReturnTypes
scalarSelectback to summary
private boolean scalarSelect
VERSION2_SQLback to summary
public static boolean VERSION2_SQL

Constructor Detail

SelectClauseback to summary
public SelectClause()

Method Detail

addCollectionFromElementback to summary
private void addCollectionFromElement(FromElement fromElement)

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

finishInitializationback to summary
private void finishInitialization(ArrayList<E> queryReturnTypeList)
getAggregatedSelectExpressionback to summary
public AggregatedSelectExpression getAggregatedSelectExpression()
getCollectionFromElementsback to summary
public List<E> getCollectionFromElements()
getColumnNamesback to summary
public String[][] getColumnNames()

The column alias names being used in the generated SQL.

Returns:String[][]

The SQL column aliases.

getColumnNamesStartPositionback to summary
public int getColumnNamesStartPosition(int i)
getFirstSelectExpressionback to summary
protected AST getFirstSelectExpression()

Implements abstract org.hibernate.hql.ast.tree.SelectExpressionList.getFirstSelectExpression.

Doc from org.hibernate.hql.ast.tree.SelectExpressionList.getFirstSelectExpression.

Returns the first select expression node that should be considered when building the array of select expressions.

Returns:AST

the first select expression node that should be considered when building the array of select expressions

getFromElementsForLoadback to summary
public List<E> getFromElementsForLoad()

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

Returns:List<E>

List of appropriate FromElements.

getQueryReturnAliasesback to summary
public String[] getQueryReturnAliases()

The HQL aliases, or generated aliases

Returns:String[]

the aliases

getQueryReturnTypesback to summary
public Type[] getQueryReturnTypes()

The types actually being returned from this query at the "object level".

Returns:Type[]

The query return types.

initAliasesback to summary
private void initAliases(SelectExpression[] selectExpressions)
initializeColumnNamesback to summary
private void initializeColumnNames()
initializeDerivedSelectClauseback to summary
public void initializeDerivedSelectClause(FromClause fromClause) throws SemanticException

Prepares a derived (i.e., not explicitly defined in the query) select clause.

Parameters
fromClause:FromClause

The from clause to which this select clause is linked.

initializeExplicitSelectClauseback to summary
public void initializeExplicitSelectClause(FromClause fromClause) throws SemanticException

Prepares an explicitly defined select clause.

Parameters
fromClause:FromClause

The from clause linked to this select clause.

Exceptions
SemanticException:
indicates a semntic issue with the explicit select clause.
isDistinctback to summary
public boolean isDistinct()
isReturnableEntityback to summary
private boolean isReturnableEntity(SelectExpression selectExpression) throws SemanticException
isScalarSelectback to summary
public boolean isScalarSelect()

Does this SelectClause represent a scalar query

Returns:boolean

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

renderNonScalarIdentifiersback to summary
private void renderNonScalarIdentifiers(FromElement fromElement, int nonscalarSize, int j, SelectExpression expr, ASTAppender appender)

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

renderNonScalarPropertiesback to summary
private void renderNonScalarProperties(ASTAppender appender, FromElement fromElement, int nonscalarSize, int k)

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

renderNonScalarSelectsback to summary
private void renderNonScalarSelects(SelectExpression[] selectExpressions, FromClause currentFromClause) throws SemanticException
renderScalarSelectsback to summary
private void renderScalarSelects(SelectExpression[] se, FromClause currentFromClause) throws SemanticException