Top Description Methods
org.hibernate.loader.entity

public Interface UniqueEntityLoader

Known Direct Implementers
org.hibernate.persister.entity.NamedQueryLoader, org.hibernate.loader.entity.AbstractEntityLoader, org.hibernate.loader.entity.BatchingEntityLoader
Imports
java.io.Serializable, org.hibernate.HibernateException, .LockOptions, org.hibernate.engine.SessionImplementor

Loads entities for a EntityPersister
Authors
Gavin King, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public Object
load(Serializable id, Object optionalObject, SessionImplementor session)

Load an entity instance.
public Object

Returns:

The loaded entity
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
)

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.

Method Detail

loadback to summary
public Object load(Serializable id, Object optionalObject, SessionImplementor session) throws HibernateException

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)

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

Exceptions
HibernateException:
indicates problem performing the load.