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

public Class BatchingEntityLoader

extends Object
implements UniqueEntityLoader
Class Inheritance
All Implemented Interfaces
org.hibernate.loader.entity.UniqueEntityLoader
Imports
java.io.Serializable, java.util.Iterator, .List, org.hibernate.HibernateException, .LockMode, .MappingException, .LockOptions, org.hibernate.engine.SessionFactoryImplementor, .SessionImplementor, .LoadQueryInfluencers, org.hibernate.loader.Loader, org.hibernate.persister.entity.EntityPersister, .OuterJoinLoadable, org.hibernate.type.Type, org.hibernate.util.ArrayHelper

"Batch" loads entities, using multiple primary key values in the SQL where clause.
Author
Gavin King
See Also
EntityLoader

Field Summary

Modifier and TypeField and Description
private final int[]
private final Type
private final Loader[]
private final EntityPersister

Constructor Summary

AccessConstructor and Description
public
BatchingEntityLoader(EntityPersister persister, int[] batchSizes, Loader[] loaders)

Method Summary

Modifier and TypeMethod and Description
public static UniqueEntityLoader
createBatchingEntityLoader(final OuterJoinLoadable persister, final int maxBatchSize, final LockMode lockMode, final SessionFactoryImplementor factory, final LoadQueryInfluencers loadQueryInfluencers)

public static UniqueEntityLoader
createBatchingEntityLoader(final OuterJoinLoadable persister, final int maxBatchSize, final LockOptions lockOptions, final SessionFactoryImplementor factory, final LoadQueryInfluencers loadQueryInfluencers)

private Object
public Object
load(Serializable id, Object optionalObject, SessionImplementor session)

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

Load an entity instance.
public Object
load(Serializable
The id to be loaded
id
,
Object
The (optional) entity instance in to which to load the state
optionalObject
,
SessionImplementor
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.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

batchSizesback to summary
private final int[] batchSizes
idTypeback to summary
private final Type idType
loadersback to summary
private final Loader[] loaders
persisterback to summary
private final EntityPersister persister

Constructor Detail

BatchingEntityLoaderback to summary
public BatchingEntityLoader(EntityPersister persister, int[] batchSizes, Loader[] loaders)

Method Detail

createBatchingEntityLoaderback to summary
public static UniqueEntityLoader createBatchingEntityLoader(final OuterJoinLoadable persister, final int maxBatchSize, final LockMode lockMode, final SessionFactoryImplementor factory, final LoadQueryInfluencers loadQueryInfluencers) throws MappingException
createBatchingEntityLoaderback to summary
public static UniqueEntityLoader createBatchingEntityLoader(final OuterJoinLoadable persister, final int maxBatchSize, final LockOptions lockOptions, final SessionFactoryImplementor factory, final LoadQueryInfluencers loadQueryInfluencers) throws MappingException
getObjectFromListback to summary
private Object getObjectFromList(List<E> results, Serializable id, SessionImplementor session)
loadback to summary
public Object load(Serializable id, Object optionalObject, SessionImplementor session)

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.

loadback to summary
public Object load(Serializable id, Object optionalObject, SessionImplementor 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:SessionImplementor

The session from which the request originated

lockOptions:LockOptions

The lock options.

Returns:Object

The loaded entity