| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public NaturalIdLoadAccess | disableFetchProfile(String profileName)
Overrides org. Implements org. |
| public NaturalIdLoadAccess | enableFetchProfile(String profileName)
Overrides org. Implements org. |
| public final T | getReference()
Implements org. using.
|
| public final T | load()
Implements org. using, or null if there is no
such persistent instance.
|
| public Optional | loadOptional()
Implements org. load, except that here an Optional is
returned.
|
| public NaturalIdLoadAccessImpl | setSynchronizationEnabled(boolean
Should synchronization be performed?
synchronizationEnabled)true indicates synchronization will be performed;
false indicates it will be circumvented.Implements org. |
| public <X> NaturalIdLoadAccess | using(SingularAttribute<? super T, X>
A typesafe reference to an attribute of the
entity that is annotated attribute, X @NaturalIdThe value of the attribute value)Implements org. @NaturalId
attribute value in a typesafe way.
|
| public NaturalIdLoadAccess | using(String
The name of an attribute of the entity
that is annotated attributeName, Object @NaturalIdThe value of the attribute value)Implements org. @NaturalId
attribute value.
|
| public NaturalIdLoadAccess | using(Map<String, ?> mappings)
Implements org. @NaturalId
attribute values at once.
|
| public NaturalIdLoadAccess | using(Object... mappings)
Implements org.
Deprecated
Set multiple @NaturalId
attribute values at once.
|
| public NaturalIdLoadAccessImpl | with(LockOptions
The lock options to use. lockOptions)Overrides org. Implements org. |
| public NaturalIdLoadAccess | with(RootGraph<T> graph, GraphSemantic semantic)
Overrides org. Implements org. |
| naturalIdParameters | back to summary |
|---|---|
| private final Map<String, Object> naturalIdParameters | |
| NaturalIdLoadAccessImpl | back to summary |
|---|---|
| public NaturalIdLoadAccessImpl(LoadAccessContext context, EntityMappingType entityDescriptor) | |
| disableFetchProfile | back to summary |
|---|---|
| public NaturalIdLoadAccess Overrides org. Implements org. Doc from org. Customize the associations fetched by specifying a fetch profile that should be disabled during this operation. This allows the session-level fetch profiles to be temporarily overridden.
| |
| enableFetchProfile | back to summary |
|---|---|
| public NaturalIdLoadAccess Overrides org. Implements org. Doc from org. Customize the associations fetched by specifying a fetch profile that should be enabled during this operation. This allows the session-level fetch profiles to be temporarily overridden.
| |
| getReference | back to summary |
|---|---|
| public final T getReference() Implements org. Doc from org. Return the persistent instance with the full natural id specified
by previous calls to
You should not use this method to determine if an instance exists;
to check for existence, use
| |
| load | back to summary |
|---|---|
| public final T load() Implements org. Doc from org. Return the persistent instance with the full natural id specified
by previous calls to
| |
| loadOptional | back to summary |
|---|---|
| public Optional Implements org. | |
| setSynchronizationEnabled | back to summary |
|---|---|
| public NaturalIdLoadAccessImpl Implements org. Doc from org. Determines if cached natural id cross-references are synchronized before query execution with unflushed modifications made in memory to mutable natural ids. By default, every cached cross-reference is updated to reflect any modification made in memory. Here "synchronization" means updating the natural id to primary key cross-reference maintained by the session. When enabled, before performing the lookup, Hibernate will check all entities associated with the session of the given type to determine if any natural id values have changed and, if so, update the cross-references. There's some cost associated with this synchronization, so if it's completely certain the no natural ids have been modified, synchronization may be safely disabled to avoid that cost. Disabling this setting when natural id values have been modified may lead to incorrect results.
| |
| using | back to summary |
|---|---|
| public <X> NaturalIdLoadAccess Implements org. Doc from org. Add a
| |
| using | back to summary |
|---|---|
| public NaturalIdLoadAccess Implements org. Doc from org. Add a
| |
| using | back to summary |
|---|---|
| public NaturalIdLoadAccess Implements org. Doc from org. Set multiple
Book book =
session.byNaturalId(Book.class)
.using(Map.of(Book_.ISBN, isbn, Book_.PRINTING, printing))
.load();
| |
| using | back to summary |
|---|---|
| public NaturalIdLoadAccess Implements org. Doc from org. Deprecated
Set multiple
Book book =
session.byNaturalId(Book.class)
.using(Book_.ISBN, isbn, Book_.PRINTING, printing)
.load();
| |
| with | back to summary |
|---|---|
| public NaturalIdLoadAccessImpl Overrides org. Implements org. Doc from org. Specify the lock options to use when querying the database.
| |
| with | back to summary |
|---|---|
| public NaturalIdLoadAccess Overrides org. Implements org. Doc from org. Customize the associations fetched by specifying an entity graph, and how it should be interpreted.
| |