Top Description Fields Constructors Methods
org.hibernate.loader.criteria

public Class CriteriaLoader

extends OuterJoinLoader
Class Inheritance
Imports
java.io.Serializable, java.sql.ResultSet, .SQLException, java.util.HashMap, .List, .Map, .Set, org.hibernate.HibernateException, .LockMode, .LockOptions, .QueryException, .ScrollMode, .Session, org.hibernate.dialect.Dialect, org.hibernate.engine.spi.LoadQueryInfluencers, .QueryParameters, .SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.internal.CriteriaImpl, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.loader.OuterJoinLoader, org.hibernate.loader.spi.AfterLoadAction, org.hibernate.persister.entity.Loadable, .Lockable, .OuterJoinLoadable, org.hibernate.query.spi.ScrollableResultsImplementor, org.hibernate.transform.ResultTransformer, org.hibernate.type.Type

A Loader for Criteria queries. Note that criteria queries are more like multi-object load()s than like HQL queries.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final boolean[]
private final Set<Serializable>
private final int
private final Type[]
private final CriteriaQueryTranslator
private final String[]
Inherited from org.hibernate.loader.OuterJoinLoader:
aliasescollectionOwnerscollectionPersisterscollectionSuffixeslockModeArrayownerAssociationTypesownerspersisterssqlsuffixes

Constructor Summary

AccessConstructor and Description
public
CriteriaLoader(final OuterJoinLoadable persister, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected String
applyLocks(String sql, QueryParameters parameters, Dialect dialect, List<AfterLoadAction> afterLoadActions)

Overrides org.hibernate.loader.Loader.applyLocks.

Append FOR UPDATE OF clause, if necessary.
protected boolean
areResultSetRowsTransformedImmediately()

Overrides org.hibernate.loader.Loader.areResultSetRowsTransformedImmediately.

Are rows transformed immediately after being read from the ResultSet?
protected LockMode
protected LockMode[]
getLockModes(LockOptions
a collection of lock options specified dynamically via the Query interface
lockOptions
)

Overrides org.hibernate.loader.OuterJoinLoader.getLockModes.

What lock options does this load entities with?
protected String
getQueryIdentifier()

Overrides org.hibernate.loader.Loader.getQueryIdentifier.

Identifies the query for statistics reporting, if null, no statistics will be reported
public Set<E>
protected Object
getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SharedSessionContractImplementor session)

Overrides org.hibernate.loader.Loader.getResultColumnOrRow.

Get the actual object that is returned in the user-visible result list.
protected List<E>
protected Object[]
protected String[]
getResultRowAliases()

Overrides org.hibernate.loader.Loader.getResultRowAliases.

Returns the aliases that corresponding to a result row.
protected boolean[]
protected boolean
public List<E>
protected ResultTransformer
resolveResultTransformer(ResultTransformer
the specified result transformer
resultTransformer
)

Overrides org.hibernate.loader.Loader.resolveResultTransformer.

Determine the actual ResultTransformer that will be used to transform query results.
public ScrollableResultsImplementor
private Object[]
Inherited from org.hibernate.loader.OuterJoinLoader:
getAliasesgetCollectionOwnersgetCollectionPersistersgetCollectionSuffixesgetDialectgetEntityPersistersgetLoadQueryInfluencersgetLockOptionsgetOwnerAssociationTypesgetOwnersgetSQLStringgetSuffixesinitFromWalker

Field Detail

includeInResultRowback to summary
private final boolean[] includeInResultRow
querySpacesback to summary
private final Set<Serializable> querySpaces
resultRowLengthback to summary
private final int resultRowLength
resultTypesback to summary
private final Type[] resultTypes
translatorback to summary
private final CriteriaQueryTranslator translator
userAliasesback to summary
private final String[] userAliases

Constructor Detail

CriteriaLoaderback to summary
public CriteriaLoader(final OuterJoinLoadable persister, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers) throws HibernateException

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

applyLocksback to summary
protected String applyLocks(String sql, QueryParameters parameters, Dialect dialect, List<AfterLoadAction> afterLoadActions) throws QueryException

Overrides org.hibernate.loader.Loader.applyLocks.

Doc from org.hibernate.loader.Loader.applyLocks.

Append FOR UPDATE OF clause, if necessary. This empty superclass implementation merely returns its first argument.

Annotations
@Override
areResultSetRowsTransformedImmediatelyback to summary
protected boolean areResultSetRowsTransformedImmediately()

Overrides org.hibernate.loader.Loader.areResultSetRowsTransformedImmediately.

Doc from org.hibernate.loader.Loader.areResultSetRowsTransformedImmediately.

Are rows transformed immediately after being read from the ResultSet?

Returns:boolean

true, if getResultColumnOrRow() transforms the results; false, otherwise

Annotations
@Override
determineFollowOnLockModeback to summary
protected LockMode determineFollowOnLockMode(LockOptions lockOptions)

Overrides org.hibernate.loader.Loader.determineFollowOnLockMode.

Annotations
@Override
getLockModesback to summary
protected LockMode[] getLockModes(LockOptions lockOptions)

Overrides org.hibernate.loader.OuterJoinLoader.getLockModes.

Doc from org.hibernate.loader.Loader.getLockModes.

What lock options does this load entities with?

Parameters
lockOptions:LockOptions

a collection of lock options specified dynamically via the Query interface

Annotations
@Override
getQueryIdentifierback to summary
protected String getQueryIdentifier()

Overrides org.hibernate.loader.Loader.getQueryIdentifier.

Doc from org.hibernate.loader.Loader.getQueryIdentifier.

Identifies the query for statistics reporting, if null, no statistics will be reported

Annotations
@Override
getQuerySpacesback to summary
public Set<E> getQuerySpaces()
getResultColumnOrRowback to summary
protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SharedSessionContractImplementor session) throws SQLException, HibernateException

Overrides org.hibernate.loader.Loader.getResultColumnOrRow.

Doc from org.hibernate.loader.Loader.getResultColumnOrRow.

Get the actual object that is returned in the user-visible result list. This empty implementation merely returns its first argument. This is overridden by some subclasses.

Annotations
@Override
getResultListback to summary
protected List<E> getResultList(List<E> results, ResultTransformer resultTransformer)

Overrides org.hibernate.loader.Loader.getResultList.

Annotations
@Override
getResultRowback to summary
protected Object[] getResultRow(Object[] row, ResultSet rs, SharedSessionContractImplementor session) throws SQLException, HibernateException

Overrides org.hibernate.loader.Loader.getResultRow.

Annotations
@Override
getResultRowAliasesback to summary
protected String[] getResultRowAliases()

Overrides org.hibernate.loader.Loader.getResultRowAliases.

Doc from org.hibernate.loader.Loader.getResultRowAliases.

Returns the aliases that corresponding to a result row.

Returns:String[]

Returns the aliases that corresponding to a result row.

Annotations
@Override
includeInResultRowback to summary
protected boolean[] includeInResultRow()

Overrides org.hibernate.loader.Loader.includeInResultRow.

Annotations
@Override
isSubselectLoadingEnabledback to summary
protected boolean isSubselectLoadingEnabled()

Overrides org.hibernate.loader.Loader.isSubselectLoadingEnabled.

Annotations
@Override
listback to summary
public List<E> list(SharedSessionContractImplementor session) throws HibernateException
resolveResultTransformerback to summary
protected ResultTransformer resolveResultTransformer(ResultTransformer resultTransformer)

Overrides org.hibernate.loader.Loader.resolveResultTransformer.

Doc from org.hibernate.loader.Loader.resolveResultTransformer.

Determine the actual ResultTransformer that will be used to transform query results.

Parameters
resultTransformer:ResultTransformer

the specified result transformer

Returns:ResultTransformer

the actual result transformer

Annotations
@Override
scrollback to summary
public ScrollableResultsImplementor scroll(SharedSessionContractImplementor session, ScrollMode scrollMode) throws HibernateException
toResultRowback to summary
private Object[] toResultRow(Object[] row)