org.hibernate.loader.entity

Class EntityLoader

Implemented Interfaces:
UniqueEntityLoader

public class EntityLoader
extends AbstractEntityLoader

Loads an entity instance using outerjoin fetching to fetch associated entities.
The EntityPersister must implement Loadable. For other entities, create a customized subclass of Loader.
Author:
Gavin King

Field Summary

Fields inherited from class org.hibernate.loader.entity.AbstractEntityLoader

entityName, log, persister, 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

EntityLoader(OuterJoinLoadable persister, String[] uniqueKey, Type uniqueKeyType, int batchSize, LockMode lockMode, SessionFactoryImplementor factory, Map enabledFilters)
EntityLoader(OuterJoinLoadable persister, int batchSize, LockMode lockMode, SessionFactoryImplementor factory, Map enabledFilters)
EntityLoader(OuterJoinLoadable persister, LockMode lockMode, SessionFactoryImplementor factory, Map enabledFilters)

Method Summary

protected boolean
isSingleRowLoader()
Return false is this loader is a batch entity loader
Object
loadByUniqueKey(SessionImplementor session, Object key)

Methods inherited from class org.hibernate.loader.entity.AbstractEntityLoader

getResultColumnOrRow, isSingleRowLoader, load, load

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

Constructor Details

EntityLoader

public EntityLoader(OuterJoinLoadable persister,
                    String[] uniqueKey,
                    Type uniqueKeyType,
                    int batchSize,
                    LockMode lockMode,
                    SessionFactoryImplementor factory,
                    Map enabledFilters)
            throws MappingException

EntityLoader

public EntityLoader(OuterJoinLoadable persister,
                    int batchSize,
                    LockMode lockMode,
                    SessionFactoryImplementor factory,
                    Map enabledFilters)
            throws MappingException

EntityLoader

public EntityLoader(OuterJoinLoadable persister,
                    LockMode lockMode,
                    SessionFactoryImplementor factory,
                    Map enabledFilters)
            throws MappingException

Method Details

isSingleRowLoader

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

loadByUniqueKey

public Object loadByUniqueKey(SessionImplementor session,
                              Object key)
            throws HibernateException