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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected static final Loggerprotected final OuterJoinLoadableprotected final TypeFields 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
ConstructorsConstructorDescriptionAbstractEntityLoader(OuterJoinLoadable persister, Type uniqueKeyType, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session) Get the actual object that is returned in the user-visible result list.protected booleanReturn false is this loader is a batch entity loaderload(Serializable id, Object optionalObject, SessionImplementor session) Load an entity instance.load(Serializable id, Object optionalObject, SessionImplementor session, LockOptions lockOptions) Load an entity instance by id.protected Objectload(SessionImplementor session, Object id, Object optionalObject, 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, initFromWalkerMethods inherited from class org.hibernate.loader.BasicLoader
generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiateMethods inherited from class org.hibernate.loader.Loader
applyLocks, applyPostLoadLocks, areResultSetRowsTransformedImmediately, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, doList, extractKeysFromResultSet, getCompositeKeyManyToOneTargetIndices, getEntityEagerPropertyFetches, getFactory, getNamedParameterLocs, getQueryIdentifier, getResultList, getResultSet, hasSubselectLoadableCollections, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessSQL, resolveResultTransformer, scroll, toString, upgradeLocks
-
Field Details
-
log
-
persister
-
uniqueKeyType
-
entityName
-
-
Constructor Details
-
AbstractEntityLoader
public AbstractEntityLoader(OuterJoinLoadable persister, Type uniqueKeyType, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
-
Method Details
-
load
Load 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, SessionImplementor session, LockOptions lockOptions) 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:
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
protected Object load(SessionImplementor session, Object id, Object optionalObject, Serializable optionalId, LockOptions lockOptions) -
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
-
isSingleRowLoader
protected boolean isSingleRowLoader()Description copied from class:LoaderReturn false is this loader is a batch entity loader- Overrides:
isSingleRowLoaderin classLoader
-