public class RelationalEventWithId extends ApplicationEvent implements WithId
SimpleRelationalEvent
guaranteed to have an identifier.source
Constructor and Description |
---|
RelationalEventWithId(Identifier.Specified id,
Optional<Object> entity,
AggregateChange change) |
Modifier and Type | Method and Description |
---|---|
AggregateChange |
getChange() |
Identifier.Specified |
getId()
The identifier of the aggregate root, triggering this event.
|
Optional<Object> |
getOptionalEntity()
Returns the aggregate root the event was triggered for.
|
getTimestamp
getSource, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOptionalEntity
public RelationalEventWithId(Identifier.Specified id, Optional<Object> entity, @Nullable AggregateChange change)
public Identifier.Specified getId()
RelationalEvent
getId
in interface RelationalEvent
getId
in interface WithId
Identifier
. Guaranteed to be not null
.public Optional<Object> getOptionalEntity()
RelationalEvent
getOptionalEntity
in interface RelationalEvent
null
.public AggregateChange getChange()
Copyright © 2017–2018 Pivotal Software, Inc.. All rights reserved.