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
DbActions 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(@Nullable Object id, MutableAggregateChange<?> aggregateChange) Fills the providedMutableAggregateChangewith the necessaryDbActions to delete the aggregate root identified byid.
-
Constructor Details
-
RelationalEntityDeleteWriter
-
-
Method Details
-
write
Fills the providedMutableAggregateChangewith the necessaryDbActions to delete the aggregate root identified byid. Ifidisnullit is interpreted as "Delete all aggregates of the type indicated by the aggregateChange".- Specified by:
writein interfaceEntityWriter<Object, MutableAggregateChange<?>>- Parameters:
id- may benull.aggregateChange- must not benull.
-