Package org.hibernate.loader.entity.plan
Class AbstractLoadPlanBasedEntityLoader
- java.lang.Object
-
- org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader
-
- org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader
-
- All Implemented Interfaces:
UniqueEntityLoader
- Direct Known Subclasses:
EntityLoader
public abstract class AbstractLoadPlanBasedEntityLoader extends org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader implements UniqueEntityLoader
A UniqueEntityLoader implementation based on using LoadPlans
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, java.lang.String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters)AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, java.lang.String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)protectedAbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, org.hibernate.loader.plan.exec.internal.EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters)protectedAbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, org.hibernate.loader.plan.exec.internal.EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidautoDiscoverTypes(java.sql.ResultSet rs)protected java.lang.ObjectextractEntityResult(java.util.List results)Deprecated.extractEntityResult(List, Serializable)should be used instead.protected java.lang.ObjectextractEntityResult(java.util.List results, java.io.Serializable id)protected java.lang.StringgetEntityName()OuterJoinLoadablegetEntityPersister()protected int[]getNamedParameterLocs(java.lang.String name)protected LoadQueryDetailsgetStaticLoadQuery()java.lang.Objectload(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session)Load an entity instance.java.lang.Objectload(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, java.lang.Boolean readOnly)java.lang.Objectload(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)Load an entity instance by id.java.lang.Objectload(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions, java.lang.Boolean readOnly)java.util.List<?>loadEntityBatch(java.io.Serializable[] idsInBatch, OuterJoinLoadable persister, LockOptions lockOptions, SharedSessionContractImplementor session)java.util.ListloadEntityBatch(SharedSessionContractImplementor session, java.io.Serializable[] ids, Type idType, java.lang.Object optionalObject, java.lang.String optionalEntityName, java.io.Serializable optionalId, EntityPersister persister, LockOptions lockOptions)Called by wrappers that batch load entitiesjava.util.ListloadEntityBatch(SharedSessionContractImplementor session, java.io.Serializable[] ids, Type idType, java.lang.Object optionalObject, java.lang.String optionalEntityName, java.io.Serializable optionalId, EntityPersister persister, LockOptions lockOptions, java.lang.Boolean readOnly)-
Methods inherited from class org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader
advance, bindNamedParameters, bindParameterValues, bindPositionalParameters, executeLoad, executeQueryStatement, getFactory, getLimitHandler, getResultSet, getScrollMode, prepareQueryStatement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.loader.entity.UniqueEntityLoader
load
-
-
-
-
Constructor Detail
-
AbstractLoadPlanBasedEntityLoader
public AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, java.lang.String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)
-
AbstractLoadPlanBasedEntityLoader
public AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, java.lang.String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters)
-
AbstractLoadPlanBasedEntityLoader
protected AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, org.hibernate.loader.plan.exec.internal.EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)
-
AbstractLoadPlanBasedEntityLoader
protected AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, org.hibernate.loader.plan.exec.internal.EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters)
-
-
Method Detail
-
getEntityPersister
public OuterJoinLoadable getEntityPersister()
-
getStaticLoadQuery
protected LoadQueryDetails getStaticLoadQuery()
- Specified by:
getStaticLoadQueryin classorg.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader
-
getEntityName
protected java.lang.String getEntityName()
-
loadEntityBatch
public java.util.List<?> loadEntityBatch(java.io.Serializable[] idsInBatch, OuterJoinLoadable persister, LockOptions lockOptions, SharedSessionContractImplementor session)
-
loadEntityBatch
public final java.util.List loadEntityBatch(SharedSessionContractImplementor session, java.io.Serializable[] ids, Type idType, java.lang.Object optionalObject, java.lang.String optionalEntityName, java.io.Serializable optionalId, EntityPersister persister, LockOptions lockOptions) throws HibernateException
Called by wrappers that batch load entities- Parameters:
persister- only needed for logginglockOptions-- Throws:
HibernateException
-
loadEntityBatch
public final java.util.List loadEntityBatch(SharedSessionContractImplementor session, java.io.Serializable[] ids, Type idType, java.lang.Object optionalObject, java.lang.String optionalEntityName, java.io.Serializable optionalId, EntityPersister persister, LockOptions lockOptions, java.lang.Boolean readOnly) throws HibernateException
- Throws:
HibernateException
-
load
public java.lang.Object load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session) throws HibernateExceptionDescription copied from interface:UniqueEntityLoaderLoad an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.- Specified by:
loadin interfaceUniqueEntityLoader- Throws:
HibernateException- indicates problem performing the load.
-
load
public java.lang.Object load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, java.lang.Boolean readOnly) throws HibernateException- Specified by:
loadin interfaceUniqueEntityLoader- Throws:
HibernateException
-
load
public java.lang.Object load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)Description copied from interface:UniqueEntityLoaderLoad 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
public java.lang.Object load(java.io.Serializable id, java.lang.Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions, java.lang.Boolean readOnly)- Specified by:
loadin interfaceUniqueEntityLoader
-
extractEntityResult
@Deprecated protected java.lang.Object extractEntityResult(java.util.List results)
Deprecated.extractEntityResult(List, Serializable)should be used instead.
-
extractEntityResult
protected java.lang.Object extractEntityResult(java.util.List results, java.io.Serializable id)
-
getNamedParameterLocs
protected int[] getNamedParameterLocs(java.lang.String name)
- Specified by:
getNamedParameterLocsin classorg.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader
-
autoDiscoverTypes
protected void autoDiscoverTypes(java.sql.ResultSet rs)
- Specified by:
autoDiscoverTypesin classorg.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader
-
-