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

public Class ConstructorNode

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

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[]
private String
public String[]
getAggregatedAliases()

Implements org.hibernate.hql.internal.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.internal.ast.tree.SqlNode.getDataType.

Implements org.hibernate.hql.internal.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.internal.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.internal.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.internal.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.internal.ast.tree.SelectExpression.getScalarColumnIndex.

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

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

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

Implements org.hibernate.hql.internal.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.internal.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.internal.ast.tree.SelectExpression.setScalarColumnText.

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

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()
formatMissingContructorExceptionMessageback to summary
private String formatMissingContructorExceptionMessage(String className)
getAggregatedAliasesback to summary
public String[] getAggregatedAliases()

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

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

Retrieve the aliases for the columns aggregated here.

Returns:String[]

The column aliases.

Annotations
@Override
getAggregatedSelectionTypeListback to summary
public List<E> getAggregatedSelectionTypeList()

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

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

Retrieves a list of the selection types being aggregated

Returns:List<E>

The list of types.

Annotations
@Override
getAggregationResultTypeback to summary
public Class<T> getAggregationResultType()

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

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

Obtain the java type of the aggregation

Returns:Class<T>

The java type.

Annotations
@Override
getAliasback to summary
public String getAlias()

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

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

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

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

Doc from org.hibernate.hql.internal.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.

Annotations
@Deprecated
@Override
getFirstSelectExpressionback to summary
protected AST getFirstSelectExpression()

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

Doc from org.hibernate.hql.internal.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

Annotations
@Override
getFromElementback to summary
public FromElement getFromElement()

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

Doc from org.hibernate.hql.internal.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.

Annotations
@Override
getResultTransformerback to summary
public ResultTransformer getResultTransformer()

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

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

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

Returns:ResultTransformer

The appropriate transformer

Annotations
@Override
getScalarColumnIndexback to summary
public int getScalarColumnIndex()

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

Doc from org.hibernate.hql.internal.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.

Annotations
@Override
isConstructorback to summary
public boolean isConstructor()

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

Doc from org.hibernate.hql.internal.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).

Annotations
@Override
isReturnableEntityback to summary
public boolean isReturnableEntity() throws SemanticException

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

Doc from org.hibernate.hql.internal.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.

Annotations
@Override
Exceptions
SemanticException:
if a semantic error occurs
isScalarback to summary
public boolean isScalar()

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

Annotations
@Override
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.internal.ast.tree.SelectExpression.setAlias.

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

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

Doc from org.hibernate.hql.internal.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.

Annotations
@Override
Exceptions
SemanticException:
if a semantic error occurs
setScalarColumnTextback to summary
public void setScalarColumnText(int i) throws SemanticException

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

Doc from org.hibernate.hql.internal.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.

Annotations
@Override
Exceptions
SemanticException:
if a semantic error occurs