Interface MutableAggregateChange<T>
- All Superinterfaces:
AggregateChange<T>
Represents the change happening to the aggregate (as used in the context of Domain Driven Design) as a whole.
- Since:
- 2.0
- Author:
- Jens Schauder, Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.relational.core.conversion.AggregateChange
AggregateChange.Kind
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an action to thisAggregateChange
.static <T> MutableAggregateChange<T>
Factory method to create anMutableAggregateChange
for deleting entities.static <T> MutableAggregateChange<T>
forDelete
(T entity) Factory method to create anMutableAggregateChange
for deleting entities.static <T> MutableAggregateChange<T>
forSave
(T entity) Factory method to create anMutableAggregateChange
for saving entities.void
Set the root object of theAggregateChange
.Methods inherited from interface org.springframework.data.relational.core.conversion.AggregateChange
forEachAction, getEntity, getEntityType, getKind
-
Method Details
-
forSave
Factory method to create anMutableAggregateChange
for saving entities.- Type Parameters:
T
- entity type.- Parameters:
entity
- aggregate root to save.- Returns:
- the
MutableAggregateChange
for saving the rootentity
. - Since:
- 1.2
-
forDelete
Factory method to create anMutableAggregateChange
for deleting entities.- Type Parameters:
T
- entity type.- Parameters:
entity
- aggregate root to delete.- Returns:
- the
MutableAggregateChange
for deleting the rootentity
. - Since:
- 1.2
-
forDelete
Factory method to create anMutableAggregateChange
for deleting entities.- Type Parameters:
T
- entity type.- Parameters:
entityClass
- aggregate root type.entity
- aggregate root to delete.- Returns:
- the
MutableAggregateChange
for deleting the rootentity
. - Since:
- 1.2
-
addAction
Adds an action to thisAggregateChange
.- Parameters:
action
- must not be null.
-
setEntity
Set the root object of theAggregateChange
.- Parameters:
aggregateRoot
- may be null if the change refers to a list of aggregates or references it by id.
-