-
- All Implemented Interfaces:
-
org.enodeframework.domain.AggregateRoot
public abstract class AbstractAggregateRoot<TAggregateRootId> implements AggregateRoot
Represents an abstract base aggregate root.
-
-
Field Summary
Fields Modifier and Type Field Description protected TAggregateRootIdidprotected intversion
-
Method Summary
Modifier and Type Method Description TAggregateRootIdgetId()intgetVersion()Represents the current version of the aggregate root. StringgetUniqueId()Represents the unique id of the aggregate root. List<DomainEventMessage<out Object>>getChanges()Get all the changes of the aggregate root. voidacceptChanges()Accept changes of the aggregate root. voidreplayEvents(List<DomainEventStream> eventStreams)Replay the given event streams. -
-
Method Detail
-
getId
TAggregateRootId getId()
-
getVersion
int getVersion()
Represents the current version of the aggregate root.
-
getUniqueId
String getUniqueId()
Represents the unique id of the aggregate root.
-
getChanges
List<DomainEventMessage<out Object>> getChanges()
Get all the changes of the aggregate root.
-
acceptChanges
void acceptChanges()
Accept changes of the aggregate root.
-
replayEvents
void replayEvents(List<DomainEventStream> eventStreams)
Replay the given event streams.
-
-
-
-