public interface NaturalIdLoadAccess<T>
NaturalId
Modifier and Type | Method and Description |
---|---|
T |
getReference()
Return the persistent instance with the natural id value(s) defined by the call(s) to
using(java.lang.String, java.lang.Object) . |
T |
load()
Return the persistent instance with the natural id value(s) defined by the call(s) to
using(java.lang.String, java.lang.Object) , or
null if there is no such persistent instance. |
NaturalIdLoadAccess<T> |
setSynchronizationEnabled(boolean enabled)
For entities with mutable natural ids, should Hibernate perform "synchronization" prior to performing
lookups? The default is to perform "synchronization" (for correctness).
|
NaturalIdLoadAccess<T> |
using(String attributeName,
Object value)
Add a NaturalId attribute value.
|
NaturalIdLoadAccess<T> |
with(LockOptions lockOptions)
Specify the
LockOptions to use when retrieving the entity. |
NaturalIdLoadAccess<T> with(LockOptions lockOptions)
LockOptions
to use when retrieving the entity.lockOptions
- The lock options to use.this
, for method chainingNaturalIdLoadAccess<T> using(String attributeName, Object value)
attributeName
- The entity attribute name that is marked as a NaturalIdvalue
- The value of the attributethis
, for method chainingNaturalIdLoadAccess<T> setSynchronizationEnabled(boolean enabled)
enabled
- Should synchronization be performed? true
indicates synchronization will be performed;
false
indicates it will be circumvented.this
, for method chainingT getReference()
using(java.lang.String, java.lang.Object)
. This
method might return a proxied instance that is initialized on-demand, when a non-identifier method is accessed.
You should not use this method to determine if an instance exists; to check for existence, use load()
instead. Use this only to retrieve an instance that you assume exists, where non-existence would be an
actual error.T load()
using(java.lang.String, java.lang.Object)
, or
null
if there is no such persistent instance. If the instance is already associated with the session,
return that instance, initializing it if needed. This method never returns an uninitialized instance.null
Copyright © 2017 JBoss by Red Hat. All rights reserved.