Package org.hibernate.hql.ast.tree
Interface SelectExpression
- All Known Subinterfaces:
AggregatedSelectExpression
- All Known Implementing Classes:
AbstractMapComponentNode,AbstractSelectExpression,AggregateNode,BinaryArithmeticOperatorNode,BooleanLiteralNode,Case2Node,CaseNode,CollectionFunction,ConstructorNode,CountNode,DotNode,FromReferenceNode,IdentNode,IndexNode,LiteralNode,MapEntryNode,MapKeyNode,MapValueNode,MethodNode,QueryNode,SelectExpressionImpl,UnaryArithmeticNode
public interface SelectExpression
Represents an element of a projection list, i.e. a select expression.
-
Method Summary
Modifier and TypeMethodDescriptiongetAlias()Returns the data type of the select expression.Returns the FROM element that this expression refers to.intGets index of the select expression in the projection list.booleanReturns true if the element is a constructor (e.g.booleanReturns true if this select expression represents an entity that can be returned.booleanisScalar()voidvoidsetScalarColumn(int i) Sets the index and text for select expression in the projection list.voidsetScalarColumnText(int i) Appends AST nodes that represent the columns after the current AST node.voidSets the text of the node.
-
Method Details
-
getDataType
Type getDataType()Returns the data type of the select expression.- Returns:
- The data type of the select expression.
-
setScalarColumnText
Appends AST nodes that represent the columns after the current AST node. (e.g. 'as col0_O_')- Parameters:
i- The index of the select expression in the projection list.- Throws:
antlr.SemanticException
-
setScalarColumn
Sets the index and text for select expression in the projection list.- Parameters:
i- The index of the select expression in the projection list.- Throws:
antlr.SemanticException
-
getScalarColumnIndex
int getScalarColumnIndex()Gets index of the select expression in the projection list. -
getFromElement
FromElement getFromElement()Returns the FROM element that this expression refers to.- Returns:
- The FROM element.
-
isConstructor
boolean isConstructor()Returns true if the element is a constructor (e.g. new Foo).- Returns:
- true if the element is a constructor (e.g. new Foo).
-
isReturnableEntity
Returns true if this select expression represents an entity that can be returned.- Returns:
- true if this select expression represents an entity that can be returned.
- Throws:
antlr.SemanticException
-
setText
Sets the text of the node.- Parameters:
text- the new node text.
-
isScalar
- Throws:
antlr.SemanticException
-
setAlias
-
getAlias
String getAlias()
-