@FunctionalInterface public interface BeforeSaveCallback<T> extends EntityCallback<T>
EntityCallbackthat gets invoked before changes are applied to the database, after the aggregate was converted to a database change.
T onBeforeSave(T aggregate, AggregateChange<T> aggregateChange)
AggregateChangecontents. This method is called after converting the
AggregateChange. Changes to the aggregate are not taken into account for saving. Only transient fields of the entity should be changed in this callback. To change persistent the entity before being converted, use the
aggregate- the aggregate.
aggregateChange- the associated
Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.