org.hibernate.hql.ast.tree

Class ConstructorNode

Implemented Interfaces:
InitializeableNode, SelectExpression

public class ConstructorNode
extends SelectExpressionList
implements SelectExpression

Represents a constructor (new) in a SELECT.
Author:
josh Sep 24, 2004 6:46:08 PM

Method Summary

String
getAlias()
String[]
getAliases()
Constructor
getConstructor()
List
getConstructorArgumentTypeList()
Type
getDataType()
Deprecated. (tell clover to ignore this method)
protected AST
getFirstSelectExpression()
Returns the first select expression node that should be considered when building the array of select expressions.
FromElement
getFromElement()
Returns the FROM element that this expression refers to.
boolean
isConstructor()
Returns true if the element is a constructor (e.g.
boolean
isList()
boolean
isMap()
boolean
isReturnableEntity()
Returns true if this select expression represents an entity that can be returned.
boolean
isScalar()
void
prepare()
void
setAlias(String alias)
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.SelectExpressionList

collectSelectExpressions, getFirstSelectExpression

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

getAlias

public String getAlias()
Specified by:
getAlias in interface SelectExpression

getAliases

public String[] getAliases()

getConstructor

public Constructor getConstructor()

getConstructorArgumentTypeList

public List getConstructorArgumentTypeList()

getDataType

public Type getDataType()

Deprecated. (tell clover to ignore this method)

Specified by:
getDataType in interface SelectExpression
Overrides:
getDataType in interface SqlNode

getFirstSelectExpression

protected AST getFirstSelectExpression()
Returns the first select expression node that should be considered when building the array of select expressions.
Overrides:
getFirstSelectExpression in interface SelectExpressionList
Returns:
the first select expression node that should be considered when building the array of select expressions

getFromElement

public FromElement getFromElement()
Returns the FROM element that this expression refers to.
Specified by:
getFromElement in interface SelectExpression
Returns:
The FROM element.

isConstructor

public boolean isConstructor()
Returns true if the element is a constructor (e.g. new Foo).
Specified by:
isConstructor in interface SelectExpression
Returns:
true if the element is a constructor (e.g. new Foo).

isList

public boolean isList()

isMap

public boolean isMap()

isReturnableEntity

public boolean isReturnableEntity()
            throws SemanticException
Returns true if this select expression represents an entity that can be returned.
Specified by:
isReturnableEntity in interface SelectExpression
Returns:
true if this select expression represents an entity that can be returned.

isScalar

public boolean isScalar()
Specified by:
isScalar in interface SelectExpression

prepare

public void prepare()
            throws SemanticException

setAlias

public void setAlias(String alias)
Specified by:
setAlias in interface SelectExpression

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.