Class RelationalEntityDeleteWriter
java.lang.Object
org.springframework.data.relational.core.conversion.RelationalEntityDeleteWriter
- All Implemented Interfaces:
EntityWriter<Object,
MutableAggregateChange<?>>
public class RelationalEntityDeleteWriter
extends Object
implements EntityWriter<Object,MutableAggregateChange<?>>
Converts an entity that is about to be deleted into
DbAction
s inside a MutableAggregateChange
that
need to be executed against the database to recreate the appropriate state in the database. If the
MutableAggregateChange
has a reference to the entity and the entity has a version attribute, the delete will
include an optimistic record locking check.- Author:
- Jens Schauder, Mark Paluch, Bastian Wilhelm, Tyler Van Gorder, Myeonghyeon Lee, Chirag Tailor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(Object id, MutableAggregateChange<?> aggregateChange) Fills the providedMutableAggregateChange
with the necessaryDbAction
s to delete the aggregate root identified byid
.
-
Constructor Details
-
RelationalEntityDeleteWriter
-
-
Method Details
-
write
Fills the providedMutableAggregateChange
with the necessaryDbAction
s to delete the aggregate root identified byid
. Ifid
isnull
it is interpreted as "Delete all aggregates of the type indicated by the aggregateChange".- Specified by:
write
in interfaceEntityWriter<Object,
MutableAggregateChange<?>> - Parameters:
id
- may benull
.aggregateChange
- must not benull
.
-