org.hibernate.hql.ast.tree

Class DotNode

Implemented Interfaces:
DisplayableNode, InitializeableNode, PathNode, ResolvableNode, SelectExpression

public class DotNode
extends FromReferenceNode
implements DisplayableNode, SelectExpression

Represents a reference to a property or alias expression. This should duplicate the relevant behaviors in PathExpressionParser.
Author:
Joshua Davis

Nested Class Summary

static interface
DotNode.IllegalCollectionDereferenceExceptionBuilder

Field Summary

static DotNode.IllegalCollectionDereferenceExceptionBuilder
DEF_ILLEGAL_COLL_DEREF_EXCP_BUILDER
static DotNode.IllegalCollectionDereferenceExceptionBuilder
ILLEGAL_COLL_DEREF_EXCP_BUILDER
static boolean
REGRESSION_STYLE_JOIN_SUPPRESSION
static boolean
useThetaStyleImplicitJoins

Fields inherited from class org.hibernate.hql.ast.tree.FromReferenceNode

ROOT_LEVEL

Method Summary

Type
getDataType()
String
getDisplayText()
Returns additional display text for the AST node.
FromElement
getImpliedJoin()
FromReferenceNode
getLhs()
String
getPath()
Returns the full path of the node.
String
getPropertyPath()
void
resolve(boolean generateJoin, boolean implicitJoin, String classAlias, AST parent)
void
resolveFirstChild()
Resolves the left hand side of the DOT.
void
resolveInFunctionCall(boolean generateJoin, boolean implicitJoin)
void
resolveIndex(AST parent)
void
resolveSelectExpression()
Special method to resolve expressions in the SELECT list.
void
setFetch(boolean fetch)
void
setJoinType(int joinType)
Sets the join type for this '.' node structure.
void
setPropertyPath(String propertyPath)
void
setResolvedConstant(String text)
void
setScalarColumnText(int i)

Methods inherited from class org.hibernate.hql.ast.tree.FromReferenceNode

getDisplayText, getFromElement, getImpliedJoin, getPath, isResolved, isReturnableEntity, prepareForDot, recursiveResolve, recursiveResolve, resolve, resolve, resolveFirstChild, resolveInFunctionCall, setFromElement, setResolved

Methods inherited from class org.hibernate.hql.ast.tree.AbstractSelectExpression

getAlias, getFromElement, isConstructor, isReturnableEntity, isScalar, setAlias

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

Field Details

DEF_ILLEGAL_COLL_DEREF_EXCP_BUILDER

public static final DotNode.IllegalCollectionDereferenceExceptionBuilder DEF_ILLEGAL_COLL_DEREF_EXCP_BUILDER

ILLEGAL_COLL_DEREF_EXCP_BUILDER

public static DotNode.IllegalCollectionDereferenceExceptionBuilder ILLEGAL_COLL_DEREF_EXCP_BUILDER

REGRESSION_STYLE_JOIN_SUPPRESSION

public static boolean REGRESSION_STYLE_JOIN_SUPPRESSION

useThetaStyleImplicitJoins

public static boolean useThetaStyleImplicitJoins

Method Details

getDataType

public Type getDataType()
Specified by:
getDataType in interface SelectExpression
Overrides:
getDataType in interface SqlNode

getDisplayText

public String getDisplayText()
Returns additional display text for the AST node.
Specified by:
getDisplayText in interface DisplayableNode
Overrides:
getDisplayText in interface FromReferenceNode
Returns:
String - The additional display text.

getImpliedJoin

public FromElement getImpliedJoin()
Overrides:
getImpliedJoin in interface FromReferenceNode

getLhs

public FromReferenceNode getLhs()

getPath

public String getPath()
Returns the full path of the node.
Specified by:
getPath in interface PathNode
Overrides:
getPath in interface FromReferenceNode
Returns:
the full path of the node.

getPropertyPath

public String getPropertyPath()

resolve

public void resolve(boolean generateJoin,
                    boolean implicitJoin,
                    String classAlias,
                    AST parent)
            throws SemanticException
Specified by:
resolve in interface ResolvableNode

resolveFirstChild

public void resolveFirstChild()
            throws SemanticException
Resolves the left hand side of the DOT.
Overrides:
resolveFirstChild in interface FromReferenceNode

resolveInFunctionCall

public void resolveInFunctionCall(boolean generateJoin,
                                  boolean implicitJoin)
            throws SemanticException
Specified by:
resolveInFunctionCall in interface ResolvableNode
Overrides:
resolveInFunctionCall in interface FromReferenceNode

resolveIndex

public void resolveIndex(AST parent)
            throws SemanticException
Specified by:
resolveIndex in interface ResolvableNode

resolveSelectExpression

public void resolveSelectExpression()
            throws SemanticException
Special method to resolve expressions in the SELECT list.

setFetch

public void setFetch(boolean fetch)

setJoinType

public void setJoinType(int joinType)
Sets the join type for this '.' node structure.
Parameters:
joinType - The type of join to use.

setPropertyPath

public void setPropertyPath(String propertyPath)

setResolvedConstant

public void setResolvedConstant(String text)

setScalarColumnText

public void setScalarColumnText(int i)
            throws SemanticException
Specified by:
setScalarColumnText in interface SelectExpression