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

public Class CastFunctionNode

extends AbstractSelectExpression
implements FunctionNode
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.internal.ast.tree.FunctionNode
Imports
org.hibernate.QueryException, org.hibernate.dialect.function.CastFunction, .SQLFunction, org.hibernate.hql.internal.ast.util.ColumnHelper, org.hibernate.type.Type, antlr.SemanticException

Represents a cast function call. We handle this specially because its type argument has a semantic meaning to the HQL query (its not just pass through).
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private Type
private SQLFunction
private Node
private IdentNode

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Type
public SQLFunction
public void
resolve(boolean
Is this call part of the SELECT clause?
inSelect
)

Called from the hql-sql grammar after the children of the CAST have been resolved.

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.AbstractSelectExpression:
getAliasgetFromElementgetScalarColumnIndexisConstructorisReturnableEntityisScalarsetAliassetScalarColumn

Field Detail

castTypeback to summary
private Type castType
dialectCastFunctionback to summary
private SQLFunction dialectCastFunction
expressionNodeback to summary
private Node expressionNode
typeNodeback to summary
private IdentNode typeNode

Constructor Detail

CastFunctionNodeback to summary
public CastFunctionNode()

Method Detail

getFirstArgumentTypeback to summary
public Type getFirstArgumentType()

Implements org.hibernate.hql.internal.ast.tree.FunctionNode.getFirstArgumentType.

Annotations
@Override
getSQLFunctionback to summary
public SQLFunction getSQLFunction()

Implements org.hibernate.hql.internal.ast.tree.FunctionNode.getSQLFunction.

Annotations
@Override
resolveback to summary
public void resolve(boolean inSelect)

Called from the hql-sql grammar after the children of the CAST have been resolved.

Parameters
inSelect:boolean

Is this call part of the SELECT clause?

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