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

public Class ConstructorNode

extends SelectExpressionList
implements AggregatedSelectExpression
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.ast.tree.AggregatedSelectExpression, org.hibernate.hql.ast.tree.SelectExpression
Imports
java.lang.reflect.Constructor, java.util.Arrays, .List, .Map, antlr.SemanticException, antlr.collections.AST, org.hibernate.PropertyNotFoundException, .QueryException, org.hibernate.transform.ResultTransformer, .AliasToBeanConstructorResultTransformer, .Transformers, org.hibernate.hql.ast.DetailedSemanticException, org.hibernate.type.Type, org.hibernate.util.ReflectHelper, .StringHelper

Represents a constructor (new) in a SELECT.
Author
josh

Field Summary

Modifier and TypeField and Description
private String[]
private Constructor<T>
private Type[]
private boolean
private boolean
private Class<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String[]
public String[]
getAggregatedAliases()

Implements org.hibernate.hql.ast.tree.AggregatedSelectExpression.getAggregatedAliases.

Retrieve the aliases for the columns aggregated here.
public List<E>
public Class<T>
public String
public Constructor<T>
public List<E>
public Type
getDataType()

Overrides org.hibernate.hql.ast.tree.SqlNode.getDataType.

Implements org.hibernate.hql.ast.tree.SelectExpression.getDataType.

Deprecated (tell clover to ignore this method)
Returns the data type of the select expression.
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 FromElement
getFromElement()

Implements org.hibernate.hql.ast.tree.SelectExpression.getFromElement.

Deprecated as a consequence of FromElement being deprecated.
Returns the FROM element that this expression refers to.
public ResultTransformer
getResultTransformer()

Implements org.hibernate.hql.ast.tree.AggregatedSelectExpression.getResultTransformer.

Retrieve the ResultTransformer responsible for building aggregated select expression results into their aggregated form.
public int
getScalarColumnIndex()

Implements org.hibernate.hql.ast.tree.SelectExpression.getScalarColumnIndex.

Gets index of the select expression in the projection list.
public boolean
isConstructor()

Implements org.hibernate.hql.ast.tree.SelectExpression.isConstructor.

Returns true if the element is a constructor (e.g. new Foo).
public boolean
isReturnableEntity()

Implements org.hibernate.hql.ast.tree.SelectExpression.isReturnableEntity.

Returns true if this select expression represents an entity that can be returned.
public boolean
public void
private Constructor<T>
private Type[]
public void
public void
setScalarColumn(int
The index of the select expression in the projection list.
i
)

Implements org.hibernate.hql.ast.tree.SelectExpression.setScalarColumn.

Sets the index and text for select expression in the projection list.
public void
setScalarColumnText(int
The index of the select expression in the projection list.
i
)

Implements org.hibernate.hql.ast.tree.SelectExpression.setScalarColumnText.

Appends AST nodes that represent the columns after the current AST node.
Inherited from org.hibernate.hql.ast.tree.SelectExpressionList:
collectSelectExpressions

Field Detail

aggregatedAliasesback to summary
private String[] aggregatedAliases
constructorback to summary
private Constructor<T> constructor
constructorArgumentTypesback to summary
private Type[] constructorArgumentTypes
isListback to summary
private boolean isList
isMapback to summary
private boolean isMap
resultTypeback to summary
private Class<T> resultType

Constructor Detail

ConstructorNodeback to summary
public ConstructorNode()

Method Detail

buildAggregatedAliasesback to summary
private String[] buildAggregatedAliases()
getAggregatedAliasesback to summary
public String[] getAggregatedAliases()

Implements org.hibernate.hql.ast.tree.AggregatedSelectExpression.getAggregatedAliases.

Doc from org.hibernate.hql.ast.tree.AggregatedSelectExpression.getAggregatedAliases.

Retrieve the aliases for the columns aggregated here.

Returns:String[]

The column aliases.

getAggregatedSelectionTypeListback to summary
public List<E> getAggregatedSelectionTypeList()

Implements org.hibernate.hql.ast.tree.AggregatedSelectExpression.getAggregatedSelectionTypeList.

Doc from org.hibernate.hql.ast.tree.AggregatedSelectExpression.getAggregatedSelectionTypeList.

Retrieves a list of the selection types being aggregated

Returns:List<E>

The list of types.

getAggregationResultTypeback to summary
public Class<T> getAggregationResultType()

Implements org.hibernate.hql.ast.tree.AggregatedSelectExpression.getAggregationResultType.

Doc from org.hibernate.hql.ast.tree.AggregatedSelectExpression.getAggregationResultType.

Obtain the java type of the aggregation

Returns:Class<T>

The java type.

getAliasback to summary
public String getAlias()

Implements org.hibernate.hql.ast.tree.SelectExpression.getAlias.

getConstructorback to summary
public Constructor<T> getConstructor()
getConstructorArgumentTypeListback to summary
public List<E> getConstructorArgumentTypeList()
getDataTypeback to summary
public Type getDataType()

Overrides org.hibernate.hql.ast.tree.SqlNode.getDataType.

Implements org.hibernate.hql.ast.tree.SelectExpression.getDataType.

Doc from org.hibernate.hql.ast.tree.SelectExpression.getDataType.

Deprecated

(tell clover to ignore this method)

Returns the data type of the select expression.

Returns:Type

The data type of the select expression.

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

getFromElementback to summary
public FromElement getFromElement()

Implements org.hibernate.hql.ast.tree.SelectExpression.getFromElement.

Doc from org.hibernate.hql.ast.tree.SelectExpression.getFromElement.

Deprecated

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

Returns the FROM element that this expression refers to.

Returns:FromElement

The FROM element.

getResultTransformerback to summary
public ResultTransformer getResultTransformer()

Implements org.hibernate.hql.ast.tree.AggregatedSelectExpression.getResultTransformer.

Doc from org.hibernate.hql.ast.tree.AggregatedSelectExpression.getResultTransformer.

Retrieve the ResultTransformer responsible for building aggregated select expression results into their aggregated form.

Returns:ResultTransformer

The appropriate transformer

getScalarColumnIndexback to summary
public int getScalarColumnIndex()

Implements org.hibernate.hql.ast.tree.SelectExpression.getScalarColumnIndex.

Doc from org.hibernate.hql.ast.tree.SelectExpression.getScalarColumnIndex.

Gets index of the select expression in the projection list.

Returns:int

The index of the select expression in the projection list.

isConstructorback to summary
public boolean isConstructor()

Implements org.hibernate.hql.ast.tree.SelectExpression.isConstructor.

Doc from org.hibernate.hql.ast.tree.SelectExpression.isConstructor.

Returns true if the element is a constructor (e.g. new Foo).

Returns:boolean

true if the element is a constructor (e.g. new Foo).

isReturnableEntityback to summary
public boolean isReturnableEntity() throws SemanticException

Implements org.hibernate.hql.ast.tree.SelectExpression.isReturnableEntity.

Doc from org.hibernate.hql.ast.tree.SelectExpression.isReturnableEntity.

Returns true if this select expression represents an entity that can be returned.

Returns:boolean

true if this select expression represents an entity that can be returned.

isScalarback to summary
public boolean isScalar()

Implements org.hibernate.hql.ast.tree.SelectExpression.isScalar.

prepareback to summary
public void prepare() throws SemanticException
resolveConstructorback to summary
private Constructor<T> resolveConstructor(String path) throws SemanticException
resolveConstructorArgumentTypesback to summary
private Type[] resolveConstructorArgumentTypes() throws SemanticException
setAliasback to summary
public void setAlias(String alias)

Implements org.hibernate.hql.ast.tree.SelectExpression.setAlias.

setScalarColumnback to summary
public void setScalarColumn(int i) throws SemanticException

Implements org.hibernate.hql.ast.tree.SelectExpression.setScalarColumn.

Doc from org.hibernate.hql.ast.tree.SelectExpression.setScalarColumn.

Sets the index and text for select expression in the projection list.

Parameters
i:int

The index of the select expression in the projection list.

setScalarColumnTextback to summary
public void setScalarColumnText(int i) throws SemanticException

Implements org.hibernate.hql.ast.tree.SelectExpression.setScalarColumnText.

Doc from org.hibernate.hql.ast.tree.SelectExpression.setScalarColumnText.

Appends AST nodes that represent the columns after the current AST node. (e.g. 'as col0_O_')

Parameters
i:int

The index of the select expression in the projection list.