Package org.hibernate.loader.entity
Class AbstractEntityLoader
- java.lang.Object
-
- org.hibernate.loader.Loader
-
- org.hibernate.loader.BasicLoader
-
- org.hibernate.loader.OuterJoinLoader
-
- org.hibernate.loader.entity.AbstractEntityLoader
-
- All Implemented Interfaces:
UniqueEntityLoader
- Direct Known Subclasses:
CascadeEntityLoader,EntityLoader
public abstract class AbstractEntityLoader extends OuterJoinLoader implements UniqueEntityLoader
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.loader.Loader
Loader.SqlStatementWrapper
-
-
Field Summary
Fields Modifier and Type Field Description protected StringentityNameprotected OuterJoinLoadablepersisterprotected TypeuniqueKeyType-
Fields inherited from class org.hibernate.loader.OuterJoinLoader
aliases, collectionOwners, collectionPersisters, collectionSuffixes, lockModeArray, ownerAssociationTypes, owners, persisters, sql, suffixes
-
Fields inherited from class org.hibernate.loader.BasicLoader
NO_SUFFIX
-
Fields inherited from class org.hibernate.loader.Loader
LOG, SELECT, SELECT_DISTINCT
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityLoader(OuterJoinLoadable persister, Type uniqueKeyType, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectgetResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SharedSessionContractImplementor session)Get the actual object that is returned in the user-visible result list.protected booleanisSingleRowLoader()Return false is this loader is a batch entity loaderObjectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session)Load an entity instance.Objectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session, Boolean readOnly)Objectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)Load an entity instance by id.Objectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions, Boolean readOnly)Objectload(Object id, SharedSessionContractImplementor session, LockOptions lockOptions)protected Objectload(SharedSessionContractImplementor session, Object id, Object optionalObject, Serializable optionalId, LockOptions lockOptions, Boolean readOnly)-
Methods inherited from class org.hibernate.loader.OuterJoinLoader
getAliases, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getEntityPersisters, getLoadQueryInfluencers, getLockModes, getLockOptions, getOwnerAssociationTypes, getOwners, getSQLString, getSuffixes, initFromWalker
-
Methods inherited from class org.hibernate.loader.BasicLoader
generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiate
-
Methods inherited from class org.hibernate.loader.Loader
applyLocks, applyPostLoadLocks, areResultSetRowsTransformedImmediately, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, bindPreparedStatement, checkScrollability, createCacheableResultTransformer, createSubselects, determineFollowOnLockMode, doList, doQueryAndInitializeNonLazyCollections, doQueryAndInitializeNonLazyCollections, endCollectionLoad, executeQueryStatement, executeQueryStatement, extractKeysFromResultSet, generateQueryKey, getCompositeKeyManyToOneTargetIndices, getEntityEagerPerPropertyFetches, getEntityEagerPropertyFetches, getEntityPersister, getFactory, getLimitHandler, getNamedParameterLocs, getOptionalObjectKey, getQueryIdentifier, getResultFromQueryCache, getResultList, getResultRow, getResultRowAliases, getResultSet, getResultSet, getRowsFromResultSet, handleEmptyCollections, hasSubselectLoadableCollections, includeInResultRow, instanceAlreadyLoaded, instanceNotYetLoaded, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessResultSet, preprocessSQL, processDistinctKeyword, processResultSet, putResultInQueryCache, registerNonExists, resolveResultTransformer, scroll, shouldUseFollowOnLocking, toString, upgradeLocks
-
-
-
-
Field Detail
-
persister
protected final OuterJoinLoadable persister
-
uniqueKeyType
protected final Type uniqueKeyType
-
entityName
protected final String entityName
-
-
Constructor Detail
-
AbstractEntityLoader
public AbstractEntityLoader(OuterJoinLoadable persister, Type uniqueKeyType, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
-
Method Detail
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session)
Description copied from interface:UniqueEntityLoaderLoad an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.- Specified by:
loadin interfaceUniqueEntityLoader
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, Boolean readOnly)
- Specified by:
loadin interfaceUniqueEntityLoader
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)
Description copied from interface:UniqueEntityLoaderLoad an entity instance by id. If optionalObject is supplied (non-null, the entity state is loaded into that object instance instead of instantiating a new one.- Specified by:
loadin interfaceUniqueEntityLoader- Parameters:
id- The id to be loadedoptionalObject- The (optional) entity instance in to which to load the statesession- The session from which the request originatedlockOptions- The lock options.- Returns:
- The loaded entity
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions, Boolean readOnly)
- Specified by:
loadin interfaceUniqueEntityLoader
-
load
public Object load(Object id, SharedSessionContractImplementor session, LockOptions lockOptions)
- Specified by:
loadin interfaceUniqueEntityLoader
-
load
protected Object load(SharedSessionContractImplementor session, Object id, Object optionalObject, Serializable optionalId, LockOptions lockOptions, Boolean readOnly)
-
getResultColumnOrRow
protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SharedSessionContractImplementor session)
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
-
isSingleRowLoader
protected boolean isSingleRowLoader()
Description copied from class:LoaderReturn false is this loader is a batch entity loader- Overrides:
isSingleRowLoaderin classLoader
-
-