Package org.hibernate.loader.criteria
Class CriteriaLoader
java.lang.Object
org.hibernate.loader.Loader
org.hibernate.loader.BasicLoader
org.hibernate.loader.OuterJoinLoader
org.hibernate.loader.criteria.CriteriaLoader
A Loader for Criteria queries. Note that criteria queries are
more like multi-object load()s than like HQL queries.
-
Field Summary
Fields inherited from class org.hibernate.loader.OuterJoinLoader
aliases, collectionOwners, collectionPersisters, collectionSuffixes, lockModeArray, ownerAssociationTypes, owners, persisters, sql, suffixesFields inherited from class org.hibernate.loader.BasicLoader
NO_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionCriteriaLoader(OuterJoinLoadable persister, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringapplyLocks(String sqlSelectString, LockOptions lockOptions, Dialect dialect) Append FOR UPDATE OF clause, if necessary.protected booleanareResultSetRowsTransformedImmediately(ResultTransformer transformer) Are rows transformed immediately after being read from the ResultSet?protected LockMode[]getLockModes(LockOptions lockOptions) What lock options does this load entities with?protected ObjectgetResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session) Get the actual object that is returned in the user-visible result list.protected ListgetResultList(List results, ResultTransformer resultTransformer) protected booleanlist(SessionImplementor session) protected ResultTransformerresolveResultTransformer(ResultTransformer resultTransformer) Determine the actual ResultTransformer that will be used to transform query results.scroll(SessionImplementor session, ScrollMode scrollMode) Methods inherited from class org.hibernate.loader.OuterJoinLoader
getAliases, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getEntityPersisters, getLoadQueryInfluencers, getLockOptions, getOwnerAssociationTypes, getOwners, getSQLString, getSuffixes, initFromWalkerMethods inherited from class org.hibernate.loader.BasicLoader
generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiateMethods inherited from class org.hibernate.loader.Loader
applyPostLoadLocks, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, doList, extractKeysFromResultSet, getCompositeKeyManyToOneTargetIndices, getEntityEagerPropertyFetches, getFactory, getNamedParameterLocs, getQueryIdentifier, getResultSet, hasSubselectLoadableCollections, isSingleRowLoader, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessSQL, scroll, toString, upgradeLocks
-
Constructor Details
-
CriteriaLoader
public CriteriaLoader(OuterJoinLoadable persister, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers) throws HibernateException - Throws:
HibernateException
-
-
Method Details
-
scroll
public ScrollableResults scroll(SessionImplementor session, ScrollMode scrollMode) throws HibernateException - Throws:
HibernateException
-
list
- Throws:
HibernateException
-
resolveResultTransformer
Description copied from class:LoaderDetermine the actual ResultTransformer that will be used to transform query results.- Overrides:
resolveResultTransformerin classLoader- Parameters:
resultTransformer- the specified result transformer- Returns:
- the actual result transformer
-
areResultSetRowsTransformedImmediately
Description copied from class:LoaderAre rows transformed immediately after being read from the ResultSet?- Overrides:
areResultSetRowsTransformedImmediatelyin classLoader- Parameters:
transformer- the specified transformer- Returns:
- true, if getResultColumnOrRow() transforms the results; false, otherwise
-
getResultColumnOrRow
protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session) throws SQLException, HibernateException Description copied from class:LoaderGet 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.- Overrides:
getResultColumnOrRowin classLoader- Throws:
SQLExceptionHibernateException
-
getQuerySpaces
-
applyLocks
protected String applyLocks(String sqlSelectString, LockOptions lockOptions, Dialect dialect) throws QueryException Description copied from class:LoaderAppend FOR UPDATE OF clause, if necessary. This empty superclass implementation merely returns its first argument.- Overrides:
applyLocksin classLoader- Throws:
QueryException
-
getLockModes
Description copied from class:LoaderWhat lock options does this load entities with?- Overrides:
getLockModesin classOuterJoinLoader- Parameters:
lockOptions- a collection of lock options specified dynamically via the Query interface
-
isSubselectLoadingEnabled
protected boolean isSubselectLoadingEnabled()- Overrides:
isSubselectLoadingEnabledin classLoader
-
getResultList
- Overrides:
getResultListin classLoader
-