public class RelationalEntityDeleteWriter extends Object implements EntityWriter<Object,AggregateChange<?>>
DbAction
s inside a AggregateChange
that need to
be executed against the database to recreate the appropriate state in the database. If the AggregateChange
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,
AggregateChange<?> aggregateChange)
Fills the provided
AggregateChange with the necessary DbAction s to delete the aggregate root
identified by id . |
public RelationalEntityDeleteWriter(RelationalMappingContext context)
public void write(@Nullable Object id, AggregateChange<?> aggregateChange)
AggregateChange
with the necessary DbAction
s 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,AggregateChange<?>>
id
- may be null
.aggregateChange
- must not be null
.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.