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

public final Class NamedQueryLoader

extends Object
implements UniqueEntityLoader
Class Inheritance
All Implemented Interfaces
org.hibernate.loader.entity.UniqueEntityLoader
Imports
java.io.Serializable, org.slf4j.Logger, .LoggerFactory, org.hibernate.FlushMode, .HibernateException, .LockOptions, org.hibernate.engine.EntityKey, .SessionImplementor, org.hibernate.impl.AbstractQueryImpl, org.hibernate.loader.entity.UniqueEntityLoader

Not really a Loader, just a wrapper around a named query.
Authors
Gavin King, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final Logger
private final EntityPersister
private final String

Constructor Summary

AccessConstructor and Description
public
NamedQueryLoader(String queryName, EntityPersister persister)

Method Summary

Modifier and TypeMethod and Description
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.
public Object
load(Serializable id, Object optionalObject, SessionImplementor session)

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

Load an entity instance.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Logger log
persisterback to summary
private final EntityPersister persister
queryNameback to summary
private final String queryName

Constructor Detail

NamedQueryLoaderback to summary
public NamedQueryLoader(String queryName, EntityPersister persister)

Method Detail

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

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.