org.hibernate.annotations.NaturalId
| Modifier and Type | Method and Description |
|---|---|
| public T | Returns: the persistent instance or proxyReturn the persistent instance with the natural id value(s) defined by the call(s) to |
| public T | |
| public Optional | Returns: The persistent instance, if one, wrapped in OptionalSame semantic as |
| public NaturalIdLoadAccess | Returns: this, for method chainingShould synchronization be performed? enabled)true indicates synchronization will be performed;
false indicates it will be circumvented.For entities with mutable natural ids, should Hibernate perform "synchronization" prior to performing lookups? |
| public NaturalIdLoadAccess | |
| public NaturalIdLoadAccess | Returns: this, for method chainingThe lock options to use. lockOptions)Specify the |
| getReference | back to summary |
|---|---|
| public T getReference() Return the persistent instance with the natural id value(s) defined by the call(s) to
| |
| load | back to summary |
|---|---|
| public T load() Return the persistent instance with the natural id value(s) defined by the call(s) to
| |
| loadOptional | back to summary |
|---|---|
| public Optional Same semantic as
| |
| setSynchronizationEnabled | back to summary |
|---|---|
| public NaturalIdLoadAccess For entities with mutable natural ids, should Hibernate perform "synchronization" prior to performing lookups? The default is to perform "synchronization" (for correctness). "synchronization" here indicates updating the natural-id -> pk cross reference maintained as part of the session. When enabled, prior to performing the lookup, Hibernate will check all entities of the given type associated with the session to see if its natural-id values have changed and, if so, update the cross reference. There is a performance impact associated with this, so if application developers are certain the natural-ids in play have not changed, this setting can be disabled to circumvent that impact. However, disabling this setting when natural-ids values have changed can result in incorrect results!
| |
| using | back to summary |
|---|---|
| public NaturalIdLoadAccess Add a NaturalId attribute value.
| |
| with | back to summary |
|---|---|
| public NaturalIdLoadAccess Specify the
| |