org.hibernate.loader.entity

Class AbstractEntityLoader

Implemented Interfaces:
UniqueEntityLoader
Known Direct Subclasses:
CascadeEntityLoader, EntityLoader

public abstract class AbstractEntityLoader
extends OuterJoinLoader
implements UniqueEntityLoader

Field Summary

protected String
entityName
protected static Logger
log
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

Constructor Summary

AbstractEntityLoader(OuterJoinLoadable persister, Type uniqueKeyType, SessionFactoryImplementor factory, Map enabledFilters)

Method Summary

protected Object
getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor 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 loader
Object
load(Serializable id, Object optionalObject, SessionImplementor session)
Load an entity instance.
protected Object
load(SessionImplementor session, Object id, Object optionalObject, Serializable optionalId)

Methods inherited from class org.hibernate.loader.OuterJoinLoader

getAliases, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getEnabledFilters, getEntityPersisters, getLockModes, getOwnerAssociationTypes, getOwners, getSQLString, getSuffixes, initFromWalker

Methods inherited from class org.hibernate.loader.BasicLoader

generateSuffixes, generateSuffixes, getCollectionAliases, getCollectionSuffixes, getEntityAliases, getSuffixes, postInstantiate

Methods inherited from class org.hibernate.loader.Loader

applyLocks, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, doList, getAliases, getCollectionAliases, getCollectionOwners, getCollectionPersisters, getEntityAliases, getEntityEagerPropertyFetches, getEntityPersisters, getFactory, getLockModes, getNamedParameterLocs, getOwnerAssociationTypes, getOwners, getQueryIdentifier, getResultColumnOrRow, getResultList, getResultSet, getSQLString, hasSubselectLoadableCollections, isSingleRowLoader, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, postInstantiate, prepareQueryStatement, preprocessSQL, scroll, toString, upgradeLocks

Field Details

entityName

protected final String entityName

log

protected static final Logger log

persister

protected final OuterJoinLoadable persister

uniqueKeyType

protected final Type uniqueKeyType

Constructor Details

AbstractEntityLoader

public AbstractEntityLoader(OuterJoinLoadable persister,
                            Type uniqueKeyType,
                            SessionFactoryImplementor factory,
                            Map enabledFilters)

Method Details

getResultColumnOrRow

protected Object getResultColumnOrRow(Object[] row,
                                      ResultTransformer transformer,
                                      ResultSet rs,
                                      SessionImplementor session)
            throws SQLException,
                   HibernateException
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 interface Loader

isSingleRowLoader

protected boolean isSingleRowLoader()
Return false is this loader is a batch entity loader
Overrides:
isSingleRowLoader in interface Loader

load

public Object load(Serializable id,
                   Object optionalObject,
                   SessionImplementor session)
            throws HibernateException
Load an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.
Specified by:
load in interface UniqueEntityLoader

load

protected Object load(SessionImplementor session,
                      Object id,
                      Object optionalObject,
                      Serializable optionalId)
            throws HibernateException