Top Description Inners Fields Constructors Methods
org.hibernate.hql.internal.ast

public Class HqlSqlWalker

extends HqlSqlBaseWalker
implements ErrorReporter, NamedParameterSource
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.internal.ParameterBinder.NamedParameterSource, org.hibernate.hql.internal.ast.ErrorReporter
Imports
java.io.Serializable, java.util.ArrayList, .Arrays, .Calendar, .Date, .HashMap, .HashSet, .Iterator, .List, .Locale, .Map, .Set, org.hibernate.QueryException, org.hibernate.dialect.Dialect, org.hibernate.engine.internal.JoinSequence, .ParameterBinder, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.hql.internal.CollectionProperties, org.hibernate.hql.internal.antlr.HqlSqlBaseWalker, .HqlSqlTokenTypes, .HqlTokenTypes, .SqlTokenTypes, org.hibernate.hql.internal.ast.tree.AggregateNode, .AssignmentSpecification, .CastFunctionNode, .CollectionFunction, .CollectionPathNode, .CollectionSizeNode, .ConstructorNode, .DeleteStatement, .DotNode, .EntityJoinFromElement, .FromClause, .FromElement, .FromElementFactory, .FromReferenceNode, .IdentNode, .ImpliedFromElement, .IndexNode, .InsertStatement, .IntoClause, .MethodNode, .OperatorNode, .ParameterContainer, .ParameterNode, .QueryNode, .ResolvableNode, .RestrictableStatement, .ResultVariableRefNode, .SelectClause, .SelectExpression, .UpdateStatement, org.hibernate.hql.internal.ast.util.ASTPrinter, .ASTUtil, .AliasGenerator, .JoinProcessor, .LiteralProcessor, .NodeTraverser, .SessionFactoryHelper, .SyntheticAndFactory, .TokenPrinters, org.hibernate.hql.spi.QueryTranslator, org.hibernate.id.BulkInsertionCapableIdentifierGenerator, .IdentifierGenerator, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.log.DeprecationLogger, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.param.CollectionFilterKeyParameterSpecification, .NamedParameterSpecification, .ParameterSpecification, .PositionalParameterSpecification, .VersionTypeSeedParameterSpecification, org.hibernate.persister.collection.CollectionPropertyNames, .QueryableCollection, org.hibernate.persister.entity.EntityPersister, .Queryable, org.hibernate.sql.JoinType, org.hibernate.type.AssociationType, .CompositeType, .DbTimestampType, .Type, .VersionType, org.hibernate.usertype.UserVersionType, antlr.ASTFactory, .RecognitionException, .SemanticException, antlr.collections.AST

Implements methods used by the HQL->SQL tree transform grammar (a.k.a. the second phase).
See Also
SqlASTFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final AliasGenerator
private ArrayList<AssignmentSpecification>
private final String
private FromClause
private boolean
private final HqlParser
private JoinType
private boolean
private final LiteralProcessor
private static final CoreMessageLogger
private Map<K, V>
private int
private int
private ArrayList<ParameterSpecification>
private final ParseErrorHandler
private Map<K, V>
private Set<Serializable>
private final QueryTranslatorImpl
private SelectClause
private Map<String, SelectExpression>
selectExpressionsByResultVariable

Maps each top-level result variable to its SelectExpression; (excludes result variables defined in subqueries)

private final SessionFactoryHelper
private final Map<K, V>
private int
Inherited from org.hibernate.hql.internal.antlr.HqlSqlBaseWalker:
_tokenNames_tokenSet_0_tokenSet_1

Constructor Summary

AccessConstructor and Description
public
HqlSqlWalker(QueryTranslatorImpl
Back pointer to the query translator implementation that is using this tree transform.
qti
,
SessionFactoryImplementor
The session factory implementor where the Hibernate mappings can be found.
sfi
,
HqlParser
A reference to the phase-1 parser
parser
,
Map<K, V>
Registers the token replacement map with the walker. This map will be used to substitute function names and constants.
tokenReplacements
,
String
The collection role name of the collection used as the basis for the filter, NULL if this is not a collection filter compilation.
collectionRole
)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Create a new tree transformer.

Method Summary

Modifier and TypeMethod and Description
public void
protected void
private String
protected AST
protected AST
private EntityJoinFromElement
createEntityJoin(EntityPersister entityPersister, AST aliasNode, int joinType, AST propertyFetch, AST with)

Deprecated as a consequence of EntityJoinFromElement being deprecated.
protected AST
protected AST
protected void
createFromJoinElement(AST path, AST alias, int joinType, AST fetchNode, AST propertyFetch, AST with)

Overrides org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.createFromJoinElement.

protected AST
private void
protected void
private void
evaluateAssignment(AST eq, Queryable persister, int targetIndex)

protected void
protected AST
protected AST
private AST
generateSyntheticDotNodeForNonQualifiedPropertyRef(AST property, FromElement fromElement)

Deprecated as a consequence of FromElement being deprecated.
private AST
public AliasGenerator
public ArrayList<AssignmentSpecification>
public ASTPrinter
public String
public FromClause
public Dialect
public Map<K, V>
public FromClause
public JoinType
public LiteralProcessor
public int[]
getNamedParameterLocations(String
The parameter name
name
)

Implements org.hibernate.engine.internal.ParameterBinder.NamedParameterSource.getNamedParameterLocations.

Returns the locations of all occurrences of the named parameter.
public int
public ArrayList<ParameterSpecification>
public ParseErrorHandler
public Set<Serializable>

Returns:

A set of table names (Strings).
getQuerySpaces
()

Returns the set of unique query spaces (a.k.a. table names) that occurred in the query.

public String[]
public Type[]
public SelectClause
public SessionFactoryHelper
public Map<K, V>
public Set<String>
protected void
private void
handleWithFragment(FromElement fromElement, AST hqlWithNode)

Deprecated as a consequence of FromElement being deprecated.
public boolean
private boolean
public boolean
protected boolean
public boolean
private boolean
protected boolean
protected boolean
public boolean
private boolean
protected void
protected AST
protected AST
public static void
private void
popFromClause()

Returns to the previous 'FROM' context.

protected void
protected void
protected void
protected void
protected void
protected void
prepareFromClauseInputTree(AST fromClauseInput)

Overrides org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.prepareFromClauseInputTree.

Pre-process the from clause input tree.
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
pushFromClause(AST
The new 'FROM' context.
fromNode
,
AST
The from node from the input AST.
inputFromNode
)

Overrides org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.pushFromClause.

Sets the current 'FROM' context.
public void
registerForcibleNotFoundImplicitJoin(ImpliedFromElement impliedJoin)

Deprecated as a consequence of ImpliedFromElement being deprecated.
public void
reportError(RecognitionException e)

Overrides antlr.TreeParser.reportError.

Implements org.hibernate.hql.internal.ast.ErrorReporter.reportError.

Parser error-reporting function can be overridden in subclass
public void
reportError(String s)

Overrides antlr.TreeParser.reportError.

Implements org.hibernate.hql.internal.ast.ErrorReporter.reportError.

Parser error-reporting function can be overridden in subclass
public void
reportWarning(String s)

Overrides antlr.TreeParser.reportWarning.

Implements org.hibernate.hql.internal.ast.ErrorReporter.reportWarning.

Parser warning-reporting function can be overridden in subclass
protected void
protected void
private EntityPersister
protected void
protected void
protected void
public void
traceIn(String ruleName, AST tree)

Overrides antlr.TreeParser.traceIn.

public void
traceOut(String ruleName, AST tree)

Overrides antlr.TreeParser.traceOut.

private void
private void
private void
protected void
Inherited from org.hibernate.hql.internal.antlr.HqlSqlBaseWalker:
addrExpraddrExprLhsaggregateExpraliasedSelectExpraliasRefarithmeticExprassignmentcaseExprcollectionFunctioncollectionFunctionOrSubselectcollectionPathcollectionPathQualifiercomparisonExprconstantconstructorcountdeleteStatementelseClauseexprexpressionOrSubQueryexprOrSubqueryfkReffromClausefromElementfromElementListfunctionCallgetCurrentClauseTypegetCurrentStatementTypegetCurrentTopLevelClauseTypegetStatementTypegroupClauseidentifierinRhsinsertablePropertySpecinsertStatementintoClauseisComparativeExpressionClauseisInCaseisInCountisInCountDistinctisInFromisInFunctionCallisInSelectisInSizeisSelectStatementisSubQueryjoinElementjoinTypeliterallogicalExprlookupFkRefSourcemapComponentReferencemapPropertyExpressionnewValuenullOrderingnullPrecedencenumericIntegerorderClauseorderExprorderExprsparameterpathpathAsIdentprocessMapComponentReferencepropertyNamepropertyRefpropertyRefLhsqueryresultVariableRefsearchedCaseExpressionsearchedCaseWhenClauseselectClauseselectExprselectExprListselectStatementsetClausesimpleCaseExpressionsimpleCaseWhenClausestatementupdateStatementwhereClausewithClause