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

public Class CriteriaLoader

extends OuterJoinLoader
Class Inheritance
Imports
java.sql.ResultSet, .SQLException, java.util.HashMap, .List, .Map, .Set, org.hibernate.HibernateException, .LockMode, .QueryException, .ScrollMode, .ScrollableResults, .LockOptions, org.hibernate.dialect.Dialect, org.hibernate.engine.QueryParameters, .SessionFactoryImplementor, .SessionImplementor, .LoadQueryInfluencers, org.hibernate.impl.CriteriaImpl, org.hibernate.loader.OuterJoinLoader, org.hibernate.persister.entity.OuterJoinLoadable, .Lockable, org.hibernate.transform.ResultTransformer, org.hibernate.type.Type, org.hibernate.util.ArrayHelper

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 Set<E>
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)

Method Summary

Modifier and TypeMethod and Description
protected String
applyLocks(String sqlSelectString, LockOptions lockOptions, Dialect dialect)

Overrides org.hibernate.loader.Loader.applyLocks.

Append FOR UPDATE OF clause, if necessary.
protected boolean
areResultSetRowsTransformedImmediately(ResultTransformer
the specified transformer
transformer
)

Overrides org.hibernate.loader.Loader.areResultSetRowsTransformedImmediately.

Are rows transformed immediately after being read from the ResultSet?
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?
public Set<E>
protected Object
getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session)

Overrides org.hibernate.loader.Loader.getResultColumnOrRow.

Get the actual object that is returned in the user-visible result list.
protected List<E>
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 ScrollableResults
scroll(SessionImplementor session, ScrollMode scrollMode)

Inherited from org.hibernate.loader.OuterJoinLoader:
getAliasesgetCollectionOwnersgetCollectionPersistersgetCollectionSuffixesgetDialectgetEntityPersistersgetLoadQueryInfluencersgetLockOptionsgetOwnerAssociationTypesgetOwnersgetSQLStringgetSuffixesinitFromWalker

Field Detail

querySpacesback to summary
private final Set<E> querySpaces
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

Method Detail

applyLocksback to summary
protected String applyLocks(String sqlSelectString, LockOptions lockOptions, Dialect dialect) 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.

areResultSetRowsTransformedImmediatelyback to summary
protected boolean areResultSetRowsTransformedImmediately(ResultTransformer transformer)

Overrides org.hibernate.loader.Loader.areResultSetRowsTransformedImmediately.

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

Are rows transformed immediately after being read from the ResultSet?

Parameters
transformer:ResultTransformer

the specified transformer

Returns:boolean

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

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

getQuerySpacesback to summary
public Set<E> getQuerySpaces()
getResultColumnOrRowback to summary
protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor 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.

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

Overrides org.hibernate.loader.Loader.getResultList.

isSubselectLoadingEnabledback to summary
protected boolean isSubselectLoadingEnabled()

Overrides org.hibernate.loader.Loader.isSubselectLoadingEnabled.

listback to summary
public List<E> list(SessionImplementor 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

scrollback to summary
public ScrollableResults scroll(SessionImplementor session, ScrollMode scrollMode) throws HibernateException