类 NamedQueryLoader
- java.lang.Object
-
- org.hibernate.persister.entity.NamedQueryLoader
-
- 所有已实现的接口:
UniqueEntityLoader
public final class NamedQueryLoader extends Object implements UniqueEntityLoader
Not really a Loader, just a wrapper around a named query. Used when the metadata has named a query to use for loading an entity (usingLoaderor<loader/>).- 作者:
- Gavin King, Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 NamedQueryLoader(String queryName, EntityPersister persister)Constructs the NamedQueryLoader
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Objectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session)Load an entity instance.Objectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session, Boolean readOnly)Objectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)Load an entity instance by id.Objectload(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions, Boolean readOnly)
-
-
-
构造器详细资料
-
NamedQueryLoader
public NamedQueryLoader(String queryName, EntityPersister persister)
Constructs the NamedQueryLoader- 参数:
queryName- The name of the named query to usepersister- The corresponding persister for the entity we are loading
-
-
方法详细资料
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions)
从接口复制的说明:UniqueEntityLoaderLoad 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.- 指定者:
load在接口中UniqueEntityLoader- 参数:
id- The id to be loadedoptionalObject- The (optional) entity instance in to which to load the statesession- The session from which the request originatedlockOptions- The lock options.- 返回:
- The loaded entity
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, LockOptions lockOptions, Boolean readOnly)
- 指定者:
load在接口中UniqueEntityLoader
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session)
从接口复制的说明:UniqueEntityLoaderLoad an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.- 指定者:
load在接口中UniqueEntityLoader
-
load
public Object load(Serializable id, Object optionalObject, SharedSessionContractImplementor session, Boolean readOnly)
- 指定者:
load在接口中UniqueEntityLoader
-
-