ID - Type of the entity identifier.public abstract class AbstractDomainEvent<ID extends EntityId> extends AbstractEvent implements DomainEvent<ID>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDomainEvent()
Protected default constructor for deserialization.
|
|
AbstractDomainEvent(@NotNull EntityIdPath entityIdPath)
Constructor with entity identifier path.
|
|
AbstractDomainEvent(@NotNull EntityIdPath entityIdPath,
@NotNull Event respondTo)
Constructor with entity identifier path and event this one responds to.
|
|
AbstractDomainEvent(@NotNull EntityIdPath entityIdPath,
EventId correlationId,
EventId causationId)
Constructor with entity identifier path, correlation and causation identifiers.
|
| Modifier and Type | Method and Description |
|---|---|
ID |
getEntityId()
Returns the identifier of the entity that caused this event.
|
EntityIdPath |
getEntityIdPath()
Returns the path to the originator of the event.
|
equals, getCausationId, getCorrelationId, getEventId, getTimestamp, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCausationId, getCorrelationId, getEventId, getEventType, getTimestampprotected AbstractDomainEvent()
public AbstractDomainEvent(@NotNull
@NotNull EntityIdPath entityIdPath)
entityIdPath - Identifier path from aggregate root to the entity that emitted the event.public AbstractDomainEvent(@NotNull
@NotNull EntityIdPath entityIdPath,
@NotNull
@NotNull Event respondTo)
entityIdPath - Identifier path from aggregate root to the entity that emitted the event.respondTo - Causing event.public AbstractDomainEvent(@NotNull
@NotNull EntityIdPath entityIdPath,
@Nullable
EventId correlationId,
@Nullable
EventId causationId)
entityIdPath - Identifier path from aggregate root to the entity that emitted the event.correlationId - Correlation ID.causationId - ID of the event that caused this one.public final EntityIdPath getEntityIdPath()
DomainEventgetEntityIdPath in interface DomainEvent<ID extends EntityId>public final ID getEntityId()
DomainEventgetEntityId in interface DomainEvent<ID extends EntityId>Copyright © 2019 fuin.org (Germany). All Rights Reserved.