@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,
MutableAggregateChange<T> aggregateChange)
Entity callback method invoked before an aggregate root is deleted.
|
T onBeforeDelete(T aggregate, MutableAggregateChange<T> aggregateChange)
MutableAggregateChange
contents. This method is called after
converting the aggregate
to MutableAggregateChange
. 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 DefaultAggregateChange
.Copyright © 2017–2021 Pivotal Software, Inc.. All rights reserved.