public interface IdentifierLoadAccess<T>
Modifier and Type | Method and Description |
---|---|
T |
getReference(Serializable id)
Return the persistent instance with the given identifier, assuming that the instance exists.
|
T |
load(Serializable id)
Return the persistent instance with the given identifier, or null if there is no such persistent instance.
|
IdentifierLoadAccess<T> |
with(CacheMode cacheMode)
Specify the
CacheMode to use when retrieving the entity. |
IdentifierLoadAccess<T> |
with(LockOptions lockOptions)
Specify the
LockOptions to use when retrieving the entity. |
IdentifierLoadAccess<T> with(LockOptions lockOptions)
LockOptions
to use when retrieving the entity.lockOptions
- The lock options to use.this
, for method chainingIdentifierLoadAccess<T> with(CacheMode cacheMode)
CacheMode
to use when retrieving the entity.cacheMode
- The CacheMode to use.this
, for method chainingT getReference(Serializable id)
load(java.io.Serializable)
instead. Use this only to retrieve an instance that you assume exists, where non-existence would be an
actual error.id
- The identifier for which to obtain a referenceT load(Serializable id)
id
- The identifiernull
Copyright © 2017 JBoss by Red Hat. All rights reserved.