@FunctionalInterface public interface BeforeDeleteCallback<T> extends EntityCallback<T>
EntityCallback
that gets invoked before an entity is deleted. This callback gets only invoked if the
method deleting the aggregate received an instance of that aggregate as an argument. Methods deleting entities by id
or without any parameter don't invoke this callback.Modifier and Type | Method and Description |
---|---|
T |
onBeforeDelete(T aggregate,
AggregateChange<T> aggregateChange)
Entity callback method invoked before an aggregate root is deleted.
|
T onBeforeDelete(T aggregate, AggregateChange<T> aggregateChange)
AggregateChange
contents. This method is called after converting
the aggregate
to AggregateChange
. Changes to the aggregate are not taken into account for deleting.
Only transient fields of the entity should be changed in this callback.aggregate
- the aggregate.aggregateChange
- the associated AggregateChange
.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.