Class DbAction.Merge<T>
java.lang.Object
org.springframework.data.relational.core.conversion.DbAction.Merge<T>
- Type Parameters:
T
- type of the entity for which this represents a database interaction.
- All Implemented Interfaces:
DbAction<T>
,DbAction.WithDependingOn<T>
,DbAction.WithEntity<T>
,DbAction.WithPropertyPath<T>
public static final class DbAction.Merge<T>
extends Object
implements DbAction.WithDependingOn<T>, DbAction.WithPropertyPath<T>
Represents a merge statement for a single entity that is not the root of an aggregate.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.relational.core.conversion.DbAction
DbAction.AcquireLockAllRoot<T>, DbAction.AcquireLockRoot<T>, DbAction.Delete<T>, DbAction.DeleteAll<T>, DbAction.DeleteAllRoot<T>, DbAction.DeleteRoot<T>, DbAction.Insert<T>, DbAction.InsertRoot<T>, DbAction.Merge<T>, DbAction.Update<T>, DbAction.UpdateRoot<T>, DbAction.WithDependingOn<T>, DbAction.WithEntity<T>, DbAction.WithGeneratedId<T>, DbAction.WithPropertyPath<T>
-
Constructor Summary
ConstructorDescriptionMerge
(T entity, PersistentPropertyPath<RelationalPersistentProperty> propertyPath, DbAction.WithEntity<?> dependingOn) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.relational.core.conversion.DbAction.WithDependingOn
getEntityType, getQualifier
-
Constructor Details
-
Merge
public Merge(T entity, PersistentPropertyPath<RelationalPersistentProperty> propertyPath, DbAction.WithEntity<?> dependingOn)
-
-
Method Details
-
getEntity
- Specified by:
getEntity
in interfaceDbAction.WithEntity<T>
- Returns:
- the entity to persist. Guaranteed to be not
null
.
-
getPropertyPath
- Specified by:
getPropertyPath
in interfaceDbAction.WithPropertyPath<T>
- Returns:
- the path from the aggregate root to the affected entity
-
getDependingOn
Description copied from interface:DbAction.WithDependingOn
TheDbAction
of a parent entity, possibly the aggregate root. This is used to obtain values needed to persist the entity, that are not part of the current entity, especially the id of the parent, which might only become available once the parent entity got persisted.- Specified by:
getDependingOn
in interfaceDbAction.WithDependingOn<T>
- Returns:
- guaranteed to be not
null
. - See Also:
-
getQualifiers
Description copied from interface:DbAction.WithDependingOn
Additional values to be set during insert or update statements.Values come from parent entities but one might also add values manually.
- Specified by:
getQualifiers
in interfaceDbAction.WithDependingOn<T>
- Returns:
- guaranteed to be not
null
.
-
toString
-