Package org.hibernate.hql.ast.tree
Class FromReferenceNode
java.lang.Object
antlr.BaseAST
antlr.CommonAST
org.hibernate.hql.ast.tree.Node
org.hibernate.hql.ast.tree.SqlNode
org.hibernate.hql.ast.tree.HqlSqlWalkerNode
org.hibernate.hql.ast.tree.AbstractSelectExpression
org.hibernate.hql.ast.tree.FromReferenceNode
- All Implemented Interfaces:
antlr.collections.AST,Serializable,DisplayableNode,InitializeableNode,PathNode,ResolvableNode,SelectExpression
- Direct Known Subclasses:
AbstractMapComponentNode,DotNode,IdentNode,IndexNode,SelectExpressionImpl
public abstract class FromReferenceNode
extends AbstractSelectExpression
implements ResolvableNode, DisplayableNode, InitializeableNode, PathNode
Represents a reference to a FROM element, for example a class alias in a WHERE clause.
- See Also:
-
Field Summary
FieldsFields inherited from class antlr.BaseAST
down, right -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns additional display text for the AST node.Returns the FROM element that this expression refers to.Sub-classes can override this method if they produce implied joins (e.g.getPath()Returns the full path name represented by the node.booleanbooleanReturns true if this select expression represents an entity that can be returned.voidprepareForDot(String propertyName) voidrecursiveResolve(int level, boolean impliedAtRoot, String classAlias) voidrecursiveResolve(int level, boolean impliedAtRoot, String classAlias, antlr.collections.AST parent) voidresolve(boolean generateJoin, boolean implicitJoin) Does the work of resolving an identifier or a dot, but without a parent node or aliasvoidDoes the work of resolving an identifier or a dot, but without a parent nodevoidResolves the left hand side of the DOT.voidresolveInFunctionCall(boolean generateJoin, boolean implicitJoin) Does the work of resolving inside of the scope of a function callvoidsetFromElement(FromElement fromElement) voidMethods inherited from class org.hibernate.hql.ast.tree.AbstractSelectExpression
getAlias, getScalarColumnIndex, isConstructor, isScalar, setAlias, setScalarColumnMethods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
getAliasGenerator, getASTFactory, getSessionFactoryHelper, getWalker, initializeMethods inherited from class org.hibernate.hql.ast.tree.SqlNode
getDataType, getOriginalText, setDataType, setTextMethods inherited from class org.hibernate.hql.ast.tree.Node
getColumn, getFilename, getLine, getRenderText, getTextLength, initialize, initializeMethods inherited from class antlr.CommonAST
getText, getType, initialize, setTypeMethods 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, xmlSerializeRootOpenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.hql.ast.tree.InitializeableNode
initializeMethods inherited from interface org.hibernate.hql.ast.tree.ResolvableNode
resolve, resolveIndexMethods inherited from interface org.hibernate.hql.ast.tree.SelectExpression
getDataType, setScalarColumnText, setText
-
Field Details
-
ROOT_LEVEL
public static final int ROOT_LEVEL- See Also:
-
-
Constructor Details
-
FromReferenceNode
public FromReferenceNode()
-
-
Method Details
-
getFromElement
Description copied from interface:SelectExpressionReturns the FROM element that this expression refers to.- Specified by:
getFromElementin interfaceSelectExpression- Overrides:
getFromElementin classAbstractSelectExpression- Returns:
- The FROM element.
-
setFromElement
-
resolveFirstChild
Resolves the left hand side of the DOT.- Throws:
antlr.SemanticException
-
getPath
Description copied from interface:PathNodeReturns the full path name represented by the node. -
isResolved
public boolean isResolved() -
setResolved
public void setResolved() -
getDisplayText
Description copied from interface:DisplayableNodeReturns additional display text for the AST node.- Specified by:
getDisplayTextin interfaceDisplayableNode- Returns:
- String - The additional display text.
-
recursiveResolve
public void recursiveResolve(int level, boolean impliedAtRoot, String classAlias) throws antlr.SemanticException - Throws:
antlr.SemanticException
-
recursiveResolve
public void recursiveResolve(int level, boolean impliedAtRoot, String classAlias, antlr.collections.AST parent) throws antlr.SemanticException - Throws:
antlr.SemanticException
-
isReturnableEntity
Description copied from interface:SelectExpressionReturns true if this select expression represents an entity that can be returned.- Specified by:
isReturnableEntityin interfaceSelectExpression- Overrides:
isReturnableEntityin classAbstractSelectExpression- Returns:
- true if this select expression represents an entity that can be returned.
- Throws:
antlr.SemanticException
-
resolveInFunctionCall
public void resolveInFunctionCall(boolean generateJoin, boolean implicitJoin) throws antlr.SemanticException Description copied from interface:ResolvableNodeDoes the work of resolving inside of the scope of a function call- Specified by:
resolveInFunctionCallin interfaceResolvableNode- Throws:
antlr.SemanticException
-
resolve
Description copied from interface:ResolvableNodeDoes the work of resolving an identifier or a dot, but without a parent node or alias- Specified by:
resolvein interfaceResolvableNode- Throws:
antlr.SemanticException
-
resolve
public void resolve(boolean generateJoin, boolean implicitJoin, String classAlias) throws antlr.SemanticException Description copied from interface:ResolvableNodeDoes the work of resolving an identifier or a dot, but without a parent node- Specified by:
resolvein interfaceResolvableNode- Throws:
antlr.SemanticException
-
prepareForDot
- Throws:
antlr.SemanticException
-
getImpliedJoin
Sub-classes can override this method if they produce implied joins (e.g. DotNode).- Returns:
- an implied join created by this from reference.
-