public class

SelectClause

extends SelectExpressionList
java.lang.Object
   ↳ antlr.CommonAST
     ↳ org.hibernate.hql.ast.tree.Node
       ↳ org.hibernate.hql.ast.tree.SqlNode
         ↳ org.hibernate.hql.ast.tree.HqlSqlWalkerNode
           ↳ org.hibernate.hql.ast.tree.SelectExpressionList
             ↳ org.hibernate.hql.ast.tree.SelectClause

Class Overview

Represents the list of expressions in a SELECT clause.

Summary

Fields
public static boolean VERSION2_SQL
Public Constructors
SelectClause()
Public Methods
AggregatedSelectExpression getAggregatedSelectExpression()
List getCollectionFromElements()
String[][] getColumnNames()
The column alias names being used in the generated SQL.
int getColumnNamesStartPosition(int i)
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 isScalarSelect()
Does this SelectClause represent a scalar query
Protected Methods
AST getFirstSelectExpression()
Returns the first select expression node that should be considered when building the array of select expressions.
[Expand]
Inherited Methods
From class org.hibernate.hql.ast.tree.SelectExpressionList
From class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
From class org.hibernate.hql.ast.tree.SqlNode
From class org.hibernate.hql.ast.tree.Node
From class java.lang.Object
From interface org.hibernate.hql.ast.tree.InitializeableNode

Fields

public static boolean VERSION2_SQL

Public Constructors

public SelectClause ()

Public Methods

public AggregatedSelectExpression getAggregatedSelectExpression ()

public List getCollectionFromElements ()

public String[][] getColumnNames ()

The column alias names being used in the generated SQL.

Returns
  • The SQL column aliases.

public int getColumnNamesStartPosition (int i)

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.

public String[] getQueryReturnAliases ()

The HQL aliases, or generated aliases

Returns
  • the aliases

public Type[] getQueryReturnTypes ()

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

Returns
  • The query return types.

public void initializeDerivedSelectClause (FromClause fromClause)

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
SemanticException

public void initializeExplicitSelectClause (FromClause fromClause)

Prepares an explicitly defined select clause.

Parameters
fromClause The from clause linked to this select clause.
Throws
indicates a semntic issue with the explicit select clause.
SemanticException

public boolean isDistinct ()

public boolean isScalarSelect ()

Does this SelectClause represent a scalar query

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

Protected Methods

protected AST getFirstSelectExpression ()

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

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