public class RelationalEntityDeleteWriter extends Object implements EntityWriter<Object,MutableAggregateChange<?>>
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.| Constructor and Description |
|---|
RelationalEntityDeleteWriter(RelationalMappingContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
write(Object id,
MutableAggregateChange<?> aggregateChange)
Fills the provided
MutableAggregateChange with the necessary DbActions to delete the aggregate root
identified by id. |
public RelationalEntityDeleteWriter(RelationalMappingContext context)
public void write(@Nullable Object id, MutableAggregateChange<?> aggregateChange)
MutableAggregateChange with the necessary DbActions to delete the aggregate root
identified by id. If id is null it is interpreted as "Delete all aggregates of the type
indicated by the aggregateChange".write in interface EntityWriter<Object,MutableAggregateChange<?>>id - may be null.aggregateChange - must not be null.Copyright © 2017–2021 Pivotal Software, Inc.. All rights reserved.