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

public Class SimpleCaseNode

extends AbstractSelectExpression
implements SelectExpression, ExpectedTypeAwareNode
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.internal.ast.tree.ExpectedTypeAwareNode, org.hibernate.hql.internal.ast.tree.SelectExpression
Imports
org.hibernate.QueryException, org.hibernate.hql.internal.antlr.HqlSqlTokenTypes, org.hibernate.hql.internal.ast.util.ASTUtil, .ColumnHelper, org.hibernate.type.Type, antlr.SemanticException, antlr.collections.AST

Models what ANSI SQL terms a simple case statement. This is a CASE expression in the form
CASE [expression]
    WHEN [firstCondition] THEN [firstResult]
    WHEN [secondCondition] THEN [secondResult]
    ELSE [defaultResult]
END
Authors
Gavin King, Steve Ebersole

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Type
public Type
public void
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

Constructor Detail

SimpleCaseNodeback to summary
public SimpleCaseNode()

Method Detail

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.

Returns the data type of the select expression.

Returns:Type

The data type of the select expression.

getExpectedTypeback to summary
public Type getExpectedType()

Implements org.hibernate.hql.internal.ast.tree.ExpectedTypeAwareNode.getExpectedType.

Annotations
@Override
setExpectedTypeback to summary
public void setExpectedType(Type expectedType)

Implements org.hibernate.hql.internal.ast.tree.ExpectedTypeAwareNode.setExpectedType.

Annotations
@Override
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.

Exceptions
SemanticException:
if a semantic error occurs