类 CriteriaLoader
- java.lang.Object
-
- org.hibernate.loader.Loader
-
- org.hibernate.loader.BasicLoader
-
- org.hibernate.loader.OuterJoinLoader
-
- org.hibernate.loader.criteria.CriteriaLoader
-
public class CriteriaLoader extends OuterJoinLoader
A Loader for Criteria queries. Note that criteria queries are more like multi-object load()s than like HQL queries.- 作者:
- Gavin King
-
-
嵌套类概要
-
从类继承的嵌套类/接口 org.hibernate.loader.Loader
Loader.SqlStatementWrapper
-
-
字段概要
-
从类继承的字段 org.hibernate.loader.OuterJoinLoader
aliases, collectionOwners, collectionPersisters, collectionSuffixes, lockModeArray, ownerAssociationTypes, owners, persisters, sql, suffixes
-
从类继承的字段 org.hibernate.loader.BasicLoader
NO_SUFFIX
-
从类继承的字段 org.hibernate.loader.Loader
LOG, SELECT, SELECT_DISTINCT
-
-
构造器概要
构造器 构造器 说明 CriteriaLoader(OuterJoinLoadable persister, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected StringapplyLocks(String sql, QueryParameters parameters, Dialect dialect, List<AfterLoadAction> afterLoadActions)Append FOR UPDATE OF clause, if necessary.protected booleanareResultSetRowsTransformedImmediately()Are rows transformed immediately after being read from the ResultSet?protected LockModedetermineFollowOnLockMode(LockOptions lockOptions)protected LockMode[]getLockModes(LockOptions lockOptions)What lock options does this load entities with?protected StringgetQueryIdentifier()Identifies the query for statistics reporting, if null, no statistics will be reportedSetgetQuerySpaces()protected ObjectgetResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SharedSessionContractImplementor session)Get the actual object that is returned in the user-visible result list.protected ListgetResultList(List results, ResultTransformer resultTransformer)protected Object[]getResultRow(Object[] row, ResultSet rs, SharedSessionContractImplementor session)protected String[]getResultRowAliases()Returns the aliases that corresponding to a result row.protected boolean[]includeInResultRow()protected booleanisSubselectLoadingEnabled()Listlist(SharedSessionContractImplementor session)protected ResultTransformerresolveResultTransformer(ResultTransformer resultTransformer)Determine the actual ResultTransformer that will be used to transform query results.ScrollableResultsImplementorscroll(SharedSessionContractImplementor session, ScrollMode scrollMode)-
从类继承的方法 org.hibernate.loader.OuterJoinLoader
getAliases, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getEntityPersisters, getLoadQueryInfluencers, getLockOptions, getOwnerAssociationTypes, getOwners, getSQLString, getSuffixes, initFromWalker
-
从类继承的方法 org.hibernate.loader.BasicLoader
generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiate
-
从类继承的方法 org.hibernate.loader.Loader
applyPostLoadLocks, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, doList, doQueryAndInitializeNonLazyCollections, doQueryAndInitializeNonLazyCollections, executeQueryStatement, executeQueryStatement, extractKeysFromResultSet, getCompositeKeyManyToOneTargetIndices, getEntityEagerPropertyFetches, getFactory, getLimitHandler, getNamedParameterLocs, getResultSet, getResultSet, hasSubselectLoadableCollections, isSingleRowLoader, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessSQL, processDistinctKeyword, processResultSet, putResultInQueryCache, scroll, shouldUseFollowOnLocking, toString, upgradeLocks
-
-
-
-
构造器详细资料
-
CriteriaLoader
public CriteriaLoader(OuterJoinLoadable persister, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers) throws HibernateException
-
-
方法详细资料
-
scroll
public ScrollableResultsImplementor scroll(SharedSessionContractImplementor session, ScrollMode scrollMode) throws HibernateException
-
list
public List list(SharedSessionContractImplementor session) throws HibernateException
-
getResultRowAliases
protected String[] getResultRowAliases()
从类复制的说明:LoaderReturns the aliases that corresponding to a result row.- 覆盖:
getResultRowAliases在类中Loader- 返回:
- Returns the aliases that corresponding to a result row.
-
resolveResultTransformer
protected ResultTransformer resolveResultTransformer(ResultTransformer resultTransformer)
从类复制的说明:LoaderDetermine the actual ResultTransformer that will be used to transform query results.- 覆盖:
resolveResultTransformer在类中Loader- 参数:
resultTransformer- the specified result transformer- 返回:
- the actual result transformer
-
areResultSetRowsTransformedImmediately
protected boolean areResultSetRowsTransformedImmediately()
从类复制的说明:LoaderAre rows transformed immediately after being read from the ResultSet?- 覆盖:
areResultSetRowsTransformedImmediately在类中Loader- 返回:
- true, if getResultColumnOrRow() transforms the results; false, otherwise
-
includeInResultRow
protected boolean[] includeInResultRow()
- 覆盖:
includeInResultRow在类中Loader
-
getResultColumnOrRow
protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SharedSessionContractImplementor session) throws SQLException, HibernateException
从类复制的说明: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.- 覆盖:
getResultColumnOrRow在类中Loader- 抛出:
SQLExceptionHibernateException
-
getResultRow
protected Object[] getResultRow(Object[] row, ResultSet rs, SharedSessionContractImplementor session) throws SQLException, HibernateException
- 覆盖:
getResultRow在类中Loader- 抛出:
SQLExceptionHibernateException
-
getQuerySpaces
public Set getQuerySpaces()
-
applyLocks
protected String applyLocks(String sql, QueryParameters parameters, Dialect dialect, List<AfterLoadAction> afterLoadActions) throws QueryException
从类复制的说明:LoaderAppend FOR UPDATE OF clause, if necessary. This empty superclass implementation merely returns its first argument.- 覆盖:
applyLocks在类中Loader- 抛出:
QueryException
-
determineFollowOnLockMode
protected LockMode determineFollowOnLockMode(LockOptions lockOptions)
- 覆盖:
determineFollowOnLockMode在类中Loader
-
getLockModes
protected LockMode[] getLockModes(LockOptions lockOptions)
从类复制的说明:LoaderWhat lock options does this load entities with?- 覆盖:
getLockModes在类中OuterJoinLoader- 参数:
lockOptions- a collection of lock options specified dynamically via the Query interface
-
isSubselectLoadingEnabled
protected boolean isSubselectLoadingEnabled()
- 覆盖:
isSubselectLoadingEnabled在类中Loader
-
getResultList
protected List getResultList(List results, ResultTransformer resultTransformer)
- 覆盖:
getResultList在类中Loader
-
getQueryIdentifier
protected String getQueryIdentifier()
从类复制的说明:LoaderIdentifies the query for statistics reporting, if null, no statistics will be reported- 覆盖:
getQueryIdentifier在类中Loader
-
-