- Type Parameters:
ID- Type of the identifier.
- All Superinterfaces:
Event,Serializable
- All Known Implementing Classes:
AbstractDomainEvent
Domain event published by an entity.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the version of the aggregate the entity belongs to.Returns the aggregate version as integer.Returns the identifier of the entity that caused this event.@NotNull EntityIdPathReturns the path to the originator of the event.Methods inherited from interface org.fuin.ddd4j.ddd.Event
getCausationId, getCorrelationId, getEventId, getEventTimestamp, getEventType
-
Method Details
-
getEntityIdPath
Returns the path to the originator of the event.- Returns:
- List of unique identifiers from aggregate root to the entity that emitted the event.
-
getEntityId
Returns the identifier of the entity that caused this event. This is the last ID in the path.- Returns:
- Entity identifier.
-
getAggregateVersion
Returns the version of the aggregate the entity belongs to.- Returns:
- Aggregate version at the time the event was raised.
-
getAggregateVersionInteger
Returns the aggregate version as integer. This is a null-safe shortcut forgetAggregateVersion().asBaseType()-- Returns:
- Expected version or null.
-