org.hibernate.loader.entity
Class BatchingEntityLoader

java.lang.Object
  extended by org.hibernate.loader.entity.BatchingEntityLoader
All Implemented Interfaces:
UniqueEntityLoader

public class BatchingEntityLoader
extends Object
implements UniqueEntityLoader

"Batch" loads entities, using multiple primary key values in the SQL where clause.

Author:
Gavin King
See Also:
EntityLoader

Constructor Summary
BatchingEntityLoader(EntityPersister persister, int[] batchSizes, Loader[] loaders)
           
 
Method Summary
static UniqueEntityLoader createBatchingEntityLoader(OuterJoinLoadable persister, int maxBatchSize, LockMode lockMode, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
           
static UniqueEntityLoader createBatchingEntityLoader(OuterJoinLoadable persister, int maxBatchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
           
 Object load(Serializable id, Object optionalObject, SessionImplementor session)
          Load an entity instance.
 Object load(Serializable id, Object optionalObject, SessionImplementor session, LockOptions lockOptions)
          Load an entity instance by id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchingEntityLoader

public BatchingEntityLoader(EntityPersister persister,
                            int[] batchSizes,
                            Loader[] loaders)
Method Detail

load

public Object load(Serializable id,
                   Object optionalObject,
                   SessionImplementor session)
Load an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.

Specified by:
load in interface UniqueEntityLoader

load

public Object load(Serializable id,
                   Object optionalObject,
                   SessionImplementor session,
                   LockOptions lockOptions)
Description copied from interface: UniqueEntityLoader
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.

Specified by:
load in interface UniqueEntityLoader
Parameters:
id - The id to be loaded
optionalObject - The (optional) entity instance in to which to load the state
session - The session from which the request originated
lockOptions - The lock options.
Returns:
The loaded entity

createBatchingEntityLoader

public static UniqueEntityLoader createBatchingEntityLoader(OuterJoinLoadable persister,
                                                            int maxBatchSize,
                                                            LockMode lockMode,
                                                            SessionFactoryImplementor factory,
                                                            LoadQueryInfluencers loadQueryInfluencers)
                                                     throws MappingException
Throws:
MappingException

createBatchingEntityLoader

public static UniqueEntityLoader createBatchingEntityLoader(OuterJoinLoadable persister,
                                                            int maxBatchSize,
                                                            LockOptions lockOptions,
                                                            SessionFactoryImplementor factory,
                                                            LoadQueryInfluencers loadQueryInfluencers)
                                                     throws MappingException
Throws:
MappingException


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.