org.hibernate.hql.ast.tree
Class ConstructorNode

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by org.hibernate.hql.ast.tree.Node
              extended by org.hibernate.hql.ast.tree.SqlNode
                  extended by org.hibernate.hql.ast.tree.HqlSqlWalkerNode
                      extended by org.hibernate.hql.ast.tree.SelectExpressionList
                          extended by org.hibernate.hql.ast.tree.ConstructorNode
All Implemented Interfaces:
antlr.collections.AST, Serializable, AggregatedSelectExpression, InitializeableNode, SelectExpression

public class ConstructorNode
extends SelectExpressionList
implements AggregatedSelectExpression

Represents a constructor (new) in a SELECT.

Author:
josh
See Also:
Serialized Form

Field Summary
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
ConstructorNode()
           
 
Method Summary
 String[] getAggregatedAliases()
          Retrieve the aliases for the columns aggregated here.
 List getAggregatedSelectionTypeList()
          Retrieves a list of the selection types being aggregated
 String getAlias()
           
 Constructor getConstructor()
           
 List getConstructorArgumentTypeList()
           
 Type getDataType()
          Deprecated. (tell clover to ignore this method)
protected  antlr.collections.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.
 ResultTransformer getResultTransformer()
          Retrieve the ResultTransformer responsible for building aggregated select expression results into their aggregated form.
 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
 
Methods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
getAliasGenerator, getASTFactory, getSessionFactoryHelper, getWalker, initialize
 
Methods inherited from class org.hibernate.hql.ast.tree.SqlNode
getOriginalText, setDataType, setText
 
Methods inherited from class org.hibernate.hql.ast.tree.Node
getColumn, getFilename, getLine, getRenderText, getTextLength, initialize, initialize
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.hibernate.hql.ast.tree.SelectExpression
setText
 

Constructor Detail

ConstructorNode

public ConstructorNode()
Method Detail

getResultTransformer

public ResultTransformer getResultTransformer()
Description copied from interface: AggregatedSelectExpression
Retrieve the ResultTransformer responsible for building aggregated select expression results into their aggregated form.

Specified by:
getResultTransformer in interface AggregatedSelectExpression
Returns:
The appropriate transformer

isMap

public boolean isMap()

isList

public boolean isList()

getAggregatedAliases

public String[] getAggregatedAliases()
Description copied from interface: AggregatedSelectExpression
Retrieve the aliases for the columns aggregated here.

Specified by:
getAggregatedAliases in interface AggregatedSelectExpression
Returns:
The column aliases.

setScalarColumnText

public void setScalarColumnText(int i)
                         throws antlr.SemanticException
Description copied from interface: SelectExpression
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.
Throws:
antlr.SemanticException

getFirstSelectExpression

protected antlr.collections.AST getFirstSelectExpression()
Description copied from class: SelectExpressionList
Returns the first select expression node that should be considered when building the array of select expressions.

Specified by:
getFirstSelectExpression in class SelectExpressionList
Returns:
the first select expression node that should be considered when building the array of select expressions

getDataType

public Type getDataType()
Deprecated. (tell clover to ignore this method)

Description copied from interface: SelectExpression
Returns the data type of the select expression.

Specified by:
getDataType in interface SelectExpression
Overrides:
getDataType in class SqlNode
Returns:
The data type of the select expression.

prepare

public void prepare()
             throws antlr.SemanticException
Throws:
antlr.SemanticException

getConstructor

public Constructor getConstructor()

getConstructorArgumentTypeList

public List getConstructorArgumentTypeList()

getAggregatedSelectionTypeList

public List getAggregatedSelectionTypeList()
Description copied from interface: AggregatedSelectExpression
Retrieves a list of the selection types being aggregated

Specified by:
getAggregatedSelectionTypeList in interface AggregatedSelectExpression
Returns:
The list of types.

getFromElement

public FromElement getFromElement()
Description copied from interface: SelectExpression
Returns the FROM element that this expression refers to.

Specified by:
getFromElement in interface SelectExpression
Returns:
The FROM element.

isConstructor

public boolean isConstructor()
Description copied from interface: SelectExpression
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).

isReturnableEntity

public boolean isReturnableEntity()
                           throws antlr.SemanticException
Description copied from interface: SelectExpression
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.
Throws:
antlr.SemanticException

isScalar

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

setAlias

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

getAlias

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


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.