org.hibernate.loader.entity
Class EntityLoader
java.lang.Object
org.hibernate.loader.Loader
org.hibernate.loader.BasicLoader
org.hibernate.loader.OuterJoinLoader
org.hibernate.loader.AbstractEntityLoader
org.hibernate.loader.entity.EntityLoader
- All Implemented Interfaces:
- UniqueEntityLoader
- public class EntityLoader
- extends AbstractEntityLoader
- implements UniqueEntityLoader
Load an entity using outerjoin fetching to fetch associated entities.
The EntityPersister must implement Loadable. For other entities,
create a customized subclass of Loader.
- Author:
- Gavin King
- See Also:
SimpleEntityLoader
Constructor Summary |
EntityLoader(OuterJoinLoadable persister,
int batchSize,
LockMode lockMode,
SessionFactoryImplementor factory,
Map enabledFilters)
|
EntityLoader(OuterJoinLoadable persister,
LockMode lockMode,
SessionFactoryImplementor factory,
Map enabledFilters)
|
EntityLoader(OuterJoinLoadable persister,
String[] uniqueKey,
Type uniqueKeyType,
int batchSize,
LockMode lockMode,
SessionFactoryImplementor factory,
Map enabledFilters)
|
Methods inherited from class org.hibernate.loader.OuterJoinLoader |
countCollectionPersisters, countEntityPersisters, generateRootAlias, generateTableAlias, getAliases, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getEnabledFilters, getEntityPersisters, getJoinType, getJoinType, getLockModes, getOwnerAssociationTypes, getOwners, getSQLString, getSuffixes, initPersisters, isDuplicateAssociation, isDuplicateAssociation, isJoinable, isJoinedFetchEnabledInMapping, isTooDeep, mergeOuterJoins, orderBy, orderBy, selectString, walkCollectionTree, walkEntityTree, whereString |
Methods inherited from class org.hibernate.loader.Loader |
applyLocks, bindNamedParameters, bindPositionalParameters, doList, getEntityEagerPropertyFetches, getFactory, getQueryIdentifier, getResultList, getResultSet, getResultSet, hasSubselectLoadableCollections, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntityBatch, loadSingleRow, prepareQueryStatement, preprocessSQL, scroll, upgradeLocks |
EntityLoader
public EntityLoader(OuterJoinLoadable persister,
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,
String[] uniqueKey,
Type uniqueKeyType,
int batchSize,
LockMode lockMode,
SessionFactoryImplementor factory,
Map enabledFilters)
throws MappingException
load
public Object load(Serializable id,
Object optionalObject,
SessionImplementor session)
throws HibernateException
- 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 interface UniqueEntityLoader
- Throws:
HibernateException
loadByUniqueKey
public Object loadByUniqueKey(SessionImplementor session,
Object key)
throws HibernateException
- Throws:
HibernateException
getResultColumnOrRow
protected Object getResultColumnOrRow(Object[] row,
ResultSet rs,
SessionImplementor session)
throws 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 class Loader
- Throws:
SQLException
HibernateException
isSingleRowLoader
protected boolean isSingleRowLoader()
- Description copied from class:
Loader
- Return false is this loader is a batch entity loader
- Overrides:
isSingleRowLoader
in class Loader
isJoinedFetchEnabled
protected boolean isJoinedFetchEnabled(AssociationType type,
FetchMode config)
- Disable outer join fetching if this loader obtains an
upgrade lock mode
- Overrides:
isJoinedFetchEnabled
in class AbstractEntityLoader
getComment
public String getComment()
- Specified by:
getComment
in class AbstractEntityLoader