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

public Class IndexNode

extends FromReferenceNode
Class Inheritance
Imports
java.util.List, .Iterator, java.sql.PreparedStatement, .SQLException, org.hibernate.QueryException, org.hibernate.param.ParameterSpecification, org.hibernate.engine.JoinSequence, .QueryParameters, .SessionImplementor, org.hibernate.hql.ast.SqlGenerator, org.hibernate.hql.ast.util.SessionFactoryHelper, org.hibernate.persister.collection.QueryableCollection, org.hibernate.type.CollectionType, .Type, antlr.RecognitionException, .SemanticException, antlr.collections.AST, org.slf4j.Logger, .LoggerFactory

Represents the [] operator and provides it's semantics.
Author
josh

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
IndexNode.AggregatedIndexCollectionSelectorParameterSpecifications

In the (rare?) case where the index selector contains multiple parameters...

Field Summary

Modifier and TypeField and Description
private static final Logger
Inherited from org.hibernate.hql.ast.tree.FromReferenceNode:
ROOT_LEVEL

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
resolve(boolean generateJoin, boolean implicitJoin, String classAlias, AST parent)

Implements org.hibernate.hql.ast.tree.ResolvableNode.resolve.

Does the work of resolving an identifier or a dot
public void
resolveIndex(AST parent)

Implements org.hibernate.hql.ast.tree.ResolvableNode.resolveIndex.

Does the work of resolving an an index [].
public void
setScalarColumnText(int
The index of the select expression in the projection list.
i
)

Implements org.hibernate.hql.ast.tree.SelectExpression.setScalarColumnText.

Appends AST nodes that represent the columns after the current AST node.
Inherited from org.hibernate.hql.ast.tree.FromReferenceNode:
getDisplayTextgetFromElementgetImpliedJoingetPathisResolvedisReturnableEntityrecursiveResolverecursiveResolveresolveresolveresolveFirstChildresolveInFunctionCallsetFromElementsetResolved

Field Detail

logback to summary
private static final Logger log

Hides org.hibernate.hql.ast.tree.FromReferenceNode.log.

Constructor Detail

IndexNodeback to summary
public IndexNode()

Method Detail

prepareForDotback to summary
public void prepareForDot(String propertyName) throws SemanticException

Overrides org.hibernate.hql.ast.tree.FromReferenceNode.prepareForDot.

resolveback to summary
public void resolve(boolean generateJoin, boolean implicitJoin, String classAlias, AST parent) throws SemanticException

Implements org.hibernate.hql.ast.tree.ResolvableNode.resolve.

Doc from org.hibernate.hql.ast.tree.ResolvableNode.resolve.

Does the work of resolving an identifier or a dot

resolveIndexback to summary
public void resolveIndex(AST parent) throws SemanticException

Implements org.hibernate.hql.ast.tree.ResolvableNode.resolveIndex.

Doc from org.hibernate.hql.ast.tree.ResolvableNode.resolveIndex.

Does the work of resolving an an index [].

setScalarColumnTextback to summary
public void setScalarColumnText(int i) throws SemanticException

Implements org.hibernate.hql.ast.tree.SelectExpression.setScalarColumnText.

Doc from org.hibernate.hql.ast.tree.SelectExpression.setScalarColumnText.

Appends AST nodes that represent the columns after the current AST node. (e.g. 'as col0_O_')

Parameters
i:int

The index of the select expression in the projection list.

org.hibernate.hql.ast.tree back to summary

private Class IndexNode.AggregatedIndexCollectionSelectorParameterSpecifications

extends Object
implements ParameterSpecification
Class Inheritance
  • java.lang.Object
  • org.hibernate.hql.ast.tree.IndexNode.AggregatedIndexCollectionSelectorParameterSpecifications
All Implemented Interfaces
org.hibernate.param.ParameterSpecification

In the (rare?) case where the index selector contains multiple parameters...

Field Summary

Modifier and TypeField and Description
private final List<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
bind(PreparedStatement
The statement into which the value should be bound.
statement
,
QueryParameters
The defined values for the current query execution.
qp
,
SessionImplementor
The session against which the current execution is occuring.
session
,
int
The position from which to start binding value(s).
position
)

Implements org.hibernate.param.ParameterSpecification.bind.

Bind the appropriate value into the given statement at the specified position.
private String
public Type
getExpectedType()

Implements org.hibernate.param.ParameterSpecification.getExpectedType.

Get the type which we are expeting for a bind into this parameter based on translated contextual information.
public String
renderDisplayInfo()

Implements org.hibernate.param.ParameterSpecification.renderDisplayInfo.

Render this parameter into displayable info (for logging, etc).
public void
setExpectedType(Type
The type to expect.
expectedType
)

Implements org.hibernate.param.ParameterSpecification.setExpectedType.

Injects the expected type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

paramSpecsback to summary
private final List<E> paramSpecs

Constructor Detail

AggregatedIndexCollectionSelectorParameterSpecificationsback to summary
public AggregatedIndexCollectionSelectorParameterSpecifications(List<E> paramSpecs)

Method Detail

bindback to summary
public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException

Implements org.hibernate.param.ParameterSpecification.bind.

Doc from org.hibernate.param.ParameterSpecification.bind.

Bind the appropriate value into the given statement at the specified position.

Parameters
statement:PreparedStatement

The statement into which the value should be bound.

qp:QueryParameters

The defined values for the current query execution.

session:SessionImplementor

The session against which the current execution is occuring.

position:int

The position from which to start binding value(s).

Returns:int

The number of sql bind positions "eaten" by this bind operation.

Exceptions
SQLException:
Indicates problems performing the JDBC biind operation.
collectDisplayInfoback to summary
private String collectDisplayInfo()
getExpectedTypeback to summary
public Type getExpectedType()

Implements org.hibernate.param.ParameterSpecification.getExpectedType.

Doc from org.hibernate.param.ParameterSpecification.getExpectedType.

Get the type which we are expeting for a bind into this parameter based on translated contextual information.

Returns:Type

The expected type.

renderDisplayInfoback to summary
public String renderDisplayInfo()

Implements org.hibernate.param.ParameterSpecification.renderDisplayInfo.

Doc from org.hibernate.param.ParameterSpecification.renderDisplayInfo.

Render this parameter into displayable info (for logging, etc).

Returns:String

The displayable info.

setExpectedTypeback to summary
public void setExpectedType(Type expectedType)

Implements org.hibernate.param.ParameterSpecification.setExpectedType.

Doc from org.hibernate.param.ParameterSpecification.setExpectedType.

Injects the expected type. Called during translation.

Parameters
expectedType:Type

The type to expect.