T
- The type of aggregate this factory createspublic interface AggregateFactory<T>
AbstractAggregateFactory
.Modifier and Type | Method and Description |
---|---|
T |
createAggregateRoot(String aggregateIdentifier,
DomainEventMessage<?> firstEvent)
Instantiate the aggregate root using the given aggregate identifier and first event.
|
Class<T> |
getAggregateType()
Returns the type of aggregate this factory creates.
|
T createAggregateRoot(String aggregateIdentifier, DomainEventMessage<?> firstEvent)
aggregateIdentifier
- the aggregate identifier of the aggregate to instantiatefirstEvent
- The first event in the event stream. This is either the event generated during
creation of the aggregate, or a snapshot eventCopyright © 2010–2020. All rights reserved.