Top Description Fields Constructors Methods
org.hibernate.loader.entity.plan

public abstract Class AbstractLoadPlanBasedEntityLoader

extends AbstractLoadPlanBasedLoader
implements UniqueEntityLoader
Class Inheritance
All Implemented Interfaces
org.hibernate.loader.entity.UniqueEntityLoader
Known Direct Subclasses
org.hibernate.loader.entity.plan.EntityLoader
Imports
java.io.Serializable, java.sql.ResultSet, .SQLException, java.util.Arrays, .List, org.hibernate.AssertionFailure, .HibernateException, .LockOptions, org.hibernate.engine.spi.EffectiveEntityGraph, .QueryParameters, .SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.graph.GraphSemantic, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.loader.entity.UniqueEntityLoader, org.hibernate.loader.plan.build.internal.FetchGraphLoadPlanBuildingStrategy, .FetchStyleLoadPlanBuildingAssociationVisitationStrategy, .LoadGraphLoadPlanBuildingStrategy, org.hibernate.loader.plan.build.spi.LoadPlanBuildingAssociationVisitationStrategy, .MetamodelDrivenLoadPlanBuilder, org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader, .BatchingLoadQueryDetailsFactory, .EntityLoadQueryDetails, org.hibernate.loader.plan.exec.process.spi.ResultSetProcessorResolver, org.hibernate.loader.plan.exec.query.spi.QueryBuildingParameters, org.hibernate.loader.plan.exec.spi.LoadQueryDetails, org.hibernate.loader.plan.spi.LoadPlan, org.hibernate.persister.entity.EntityPersister, .OuterJoinLoadable, org.hibernate.pretty.MessageHelper, org.hibernate.type.Type

A UniqueEntityLoader implementation based on using LoadPlans
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final String
private final OuterJoinLoadable
private static final CoreMessageLogger
private final EntityLoadQueryDetails
private final Type

Constructor Summary

AccessConstructor and Description
public
AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public
AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
protected
AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
protected
AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected void
protected Object
extractEntityResult(List<E> results)

Deprecated extractEntityResult(List, Serializable) should be used instead.
protected Object
protected String
public OuterJoinLoadable
protected int[]
protected LoadQueryDetails
public Object
load(Serializable id, Object optionalObject, SharedSessionContractImplementor session)

Implements org.hibernate.loader.entity.UniqueEntityLoader.load.

Load an entity instance.
public Object
public Object
load(Serializable
The id to be loaded
id
,
Object
The (optional) entity instance in to which to load the state
optionalObject
,
SharedSessionContractImplementor
The session from which the request originated
session
,
LockOptions
The lock options.
lockOptions
)

Implements org.hibernate.loader.entity.UniqueEntityLoader.load.

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.
public Object
public List<?>
public final List<E>
loadEntityBatch(final SharedSessionContractImplementor session, final Serializable[] ids, final Type idType, final Object optionalObject, final String optionalEntityName, final Serializable optionalId, final EntityPersister
only needed for logging
persister
,
final LockOptions lockOptions)

Called by wrappers that batch load entities

public final List<E>
loadEntityBatch(final SharedSessionContractImplementor session, final Serializable[] ids, final Type idType, final Object optionalObject, final String optionalEntityName, final Serializable optionalId, final EntityPersister persister, final LockOptions lockOptions, final Boolean readOnly)

Inherited from org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader:
advancebindNamedParametersbindParameterValuesbindPositionalParametersexecuteLoadexecuteQueryStatementgetFactorygetLimitHandlergetResultSetgetScrollModeprepareQueryStatement

Field Detail

entityNameback to summary
private final String entityName
entityPersisterback to summary
private final OuterJoinLoadable entityPersister
logback to summary
private static final CoreMessageLogger log

Hides org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.log.

staticLoadQueryback to summary
private final EntityLoadQueryDetails staticLoadQuery
uniqueKeyTypeback to summary
private final Type uniqueKeyType

Constructor Detail

AbstractLoadPlanBasedEntityLoaderback to summary
public AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

AbstractLoadPlanBasedEntityLoaderback to summary
public AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, String[] uniqueKeyColumnNames, Type uniqueKeyType, QueryBuildingParameters buildingParameters)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

AbstractLoadPlanBasedEntityLoaderback to summary
protected AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters, ResultSetProcessorResolver resultSetProcessorResolver)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

AbstractLoadPlanBasedEntityLoaderback to summary
protected AbstractLoadPlanBasedEntityLoader(OuterJoinLoadable entityPersister, SessionFactoryImplementor factory, EntityLoadQueryDetails entityLoaderQueryDetailsTemplate, Type uniqueKeyType, QueryBuildingParameters buildingParameters)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

autoDiscoverTypesback to summary
protected void autoDiscoverTypes(ResultSet rs)

Implements abstract org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.autoDiscoverTypes.

extractEntityResultback to summary
protected Object extractEntityResult(List<E> results)

Deprecated

extractEntityResult(List, Serializable) should be used instead.

Annotations
@Deprecated
extractEntityResultback to summary
protected Object extractEntityResult(List<E> results, Serializable id)
getEntityNameback to summary
protected String getEntityName()
getEntityPersisterback to summary
public OuterJoinLoadable getEntityPersister()
getNamedParameterLocsback to summary
protected int[] getNamedParameterLocs(String name)

Implements abstract org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.getNamedParameterLocs.

getStaticLoadQueryback to summary
protected LoadQueryDetails getStaticLoadQuery()

Implements abstract org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.getStaticLoadQuery.

Annotations
@Override
loadback to summary
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session) throws HibernateException

Implements org.hibernate.loader.entity.UniqueEntityLoader.load.

Doc from org.hibernate.loader.entity.UniqueEntityLoader.load.

Load an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.

Annotations
@Override
Exceptions
HibernateException:
indicates problem performing the load.
loadback to summary
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, Boolean readOnly) throws HibernateException

Overrides default org.hibernate.loader.entity.UniqueEntityLoader.load.

Annotations
@Override
loadback to summary
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)

Implements org.hibernate.loader.entity.UniqueEntityLoader.load.

Doc from org.hibernate.loader.entity.UniqueEntityLoader.load.

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.

Parameters
id:Serializable

The id to be loaded

optionalObject:Object

The (optional) entity instance in to which to load the state

session:SharedSessionContractImplementor

The session from which the request originated

lockOptions:LockOptions

The lock options.

Returns:Object

The loaded entity

Annotations
@Override
loadback to summary
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions, Boolean readOnly)

Overrides default org.hibernate.loader.entity.UniqueEntityLoader.load.

Annotations
@Override
loadEntityBatchback to summary
public List<?> loadEntityBatch(Serializable[] idsInBatch, OuterJoinLoadable persister, LockOptions lockOptions, SharedSessionContractImplementor session)
loadEntityBatchback to summary
public final List<E> loadEntityBatch(final SharedSessionContractImplementor session, final Serializable[] ids, final Type idType, final Object optionalObject, final String optionalEntityName, final Serializable optionalId, final EntityPersister persister, final LockOptions lockOptions) throws HibernateException

Called by wrappers that batch load entities

Parameters
persister:EntityPersister

only needed for logging

loadEntityBatchback to summary
public final List<E> loadEntityBatch(final SharedSessionContractImplementor session, final Serializable[] ids, final Type idType, final Object optionalObject, final String optionalEntityName, final Serializable optionalId, final EntityPersister persister, final LockOptions lockOptions, final Boolean readOnly) throws HibernateException