public class BeforeSaveEvent extends RelationalEventWithEntity
AggregateChange is mutable and may
be changed in order to change the actions that get performed on the database as part of the save operation.source| Constructor and Description |
|---|
BeforeSaveEvent(Identifier id,
Object instance,
AggregateChange change) |
| Modifier and Type | Method and Description |
|---|---|
AggregateChange |
getChange() |
Identifier |
getId()
The identifier of the aggregate root, triggering this event.
|
Optional<Object> |
getOptionalEntity()
Returns the aggregate root the event was triggered for.
|
getTimestampgetSource, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEntitygetId, getOptionalEntitypublic BeforeSaveEvent(Identifier id, Object instance, AggregateChange change)
id - of the entity to be saved.instance - the entity about to get saved.change - the AggregateChange that is going to get applied to the database.public Identifier getId()
RelationalEventgetId in interface RelationalEventIdentifier. Guaranteed to be not null.public Optional<Object> getOptionalEntity()
RelationalEventgetOptionalEntity in interface RelationalEventnull.public AggregateChange getChange()
Copyright © 2017–2019 Pivotal Software, Inc.. All rights reserved.