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 java.lang.String
entityName
protected OuterJoinLoadable
persister
protected Type
uniqueKeyType
-
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
DEBUG_ENABLED, 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 java.lang.Object
getResultColumnOrRow(java.lang.Object[] row, ResultTransformer transformer, java.sql.ResultSet rs, SharedSessionContractImplementor session)
Get the actual object that is returned in the user-visible result list.protected boolean
isSingleRowLoader()
Return false is this loader is a batch entity loaderjava.lang.Object
load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session)
Load an entity instance.java.lang.Object
load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)
Load an entity instance by id.protected java.lang.Object
load(SharedSessionContractImplementor session, java.lang.Object id, java.lang.Object optionalObject, java.io.Serializable optionalId, LockOptions lockOptions)
-
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, checkScrollability, determineFollowOnLockMode, doList, doQueryAndInitializeNonLazyCollections, doQueryAndInitializeNonLazyCollections, executeQueryStatement, executeQueryStatement, extractKeysFromResultSet, getCompositeKeyManyToOneTargetIndices, getEntityEagerPropertyFetches, getFactory, getLimitHandler, getNamedParameterLocs, getQueryIdentifier, getResultList, getResultRow, getResultRowAliases, getResultSet, getResultSet, hasSubselectLoadableCollections, includeInResultRow, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessSQL, processDistinctKeyword, processResultSet, putResultInQueryCache, resolveResultTransformer, scroll, shouldUseFollowOnLocking, toString, upgradeLocks
-
-
-
-
Field Detail
-
persister
protected final OuterJoinLoadable persister
-
uniqueKeyType
protected final Type uniqueKeyType
-
entityName
protected final java.lang.String entityName
-
-
Constructor Detail
-
AbstractEntityLoader
public AbstractEntityLoader(OuterJoinLoadable persister, Type uniqueKeyType, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
-
Method Detail
-
load
public java.lang.Object load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session)
Description copied from interface:UniqueEntityLoader
Load an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.- Specified by:
load
in interfaceUniqueEntityLoader
-
load
public java.lang.Object load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)
Description copied from interface:UniqueEntityLoader
Load 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:
load
in 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
protected java.lang.Object load(SharedSessionContractImplementor session, java.lang.Object id, java.lang.Object optionalObject, java.io.Serializable optionalId, LockOptions lockOptions)
-
getResultColumnOrRow
protected java.lang.Object getResultColumnOrRow(java.lang.Object[] row, ResultTransformer transformer, java.sql.ResultSet rs, SharedSessionContractImplementor session) throws java.sql.SQLException, HibernateException
Description copied from class:Loader
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.- Overrides:
getResultColumnOrRow
in classLoader
- Throws:
java.sql.SQLException
HibernateException
-
isSingleRowLoader
protected boolean isSingleRowLoader()
Description copied from class:Loader
Return false is this loader is a batch entity loader- Overrides:
isSingleRowLoader
in classLoader
-
-