org.hibernate.hql.ast.tree

Class CaseNode

Implemented Interfaces:
InitializeableNode, SelectExpression

public class CaseNode
extends AbstractSelectExpression
implements SelectExpression

Represents a case ... when .. then ... else ... end expression in a select.
Author:
Gavin King

Method Summary

Type
getDataType()
Returns the data type of the select expression.
void
setScalarColumnText(int i)
Appends AST nodes that represent the columns after the current AST node.

Methods inherited from class org.hibernate.hql.ast.tree.AbstractSelectExpression

getAlias, getFromElement, isConstructor, isReturnableEntity, isScalar, setAlias

Methods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode

getASTFactory, getAliasGenerator, getSessionFactoryHelper, getWalker, initialize

Methods inherited from class org.hibernate.hql.ast.tree.SqlNode

getDataType, getOriginalText, setDataType, setText

Methods inherited from class org.hibernate.hql.ast.tree.Node

getColumn, getFilename, getLine, getRenderText, getTextLength, initialize, initialize

Method Details

getDataType

public Type getDataType()
Returns the data type of the select expression.
Specified by:
getDataType in interface SelectExpression
Overrides:
getDataType in interface SqlNode
Returns:
The data type of the select expression.

setScalarColumnText

public void setScalarColumnText(int i)
            throws SemanticException
Appends AST nodes that represent the columns after the current AST node. (e.g. 'as col0_O_')
Specified by:
setScalarColumnText in interface SelectExpression
Parameters:
i - The index of the select expression in the projection list.