public class AbstractAggregateRoot extends Object
registerEvent(Object)
to capture domain events and
expose them via #domainEvents())
. The implementation is using the general event publication mechanism implied
by DomainEvents
and AfterDomainEventPublication
. If in doubt or need to customize anything here,
rather build your own base class and use the annotations directly.Constructor and Description |
---|
AbstractAggregateRoot() |
Modifier and Type | Method and Description |
---|---|
protected void |
clearDomainEvents()
Clears all domain events currently held.
|
protected Collection<Object> |
domainEvents()
All domain events currently captured by the aggregate.
|
List<Object> |
getDomainEvents()
Deprecated.
since 1.13.7, prefer
domainEvents() |
protected <T> T |
registerEvent(T event)
Registers the given event object for publication on a call to a Spring Data repository's save methods.
|
protected <T> T registerEvent(T event)
event
- must not be null.protected void clearDomainEvents()
protected Collection<Object> domainEvents()
@Deprecated public List<Object> getDomainEvents()
domainEvents()
domainEvents()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.