|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - The type of aggregate this factory createspublic interface AggregateFactory<T extends EventSourcedAggregateRoot>
Interface describing objects capable of creating instances of aggregates to be initialized with an event stream.
Implementation note: to make sure an implementation handles snapshot events correctly, extends theAbstractAggregateFactory instead.
| Method Summary | |
|---|---|
T |
createAggregate(Object aggregateIdentifier,
DomainEventMessage<?> firstEvent)
Instantiate the aggregate using the given aggregate identifier and first event. |
Class<T> |
getAggregateType()
Returns the type of aggregate this factory creates. |
String |
getTypeIdentifier()
Returns the type identifier for this aggregate factory. |
| Method Detail |
|---|
T createAggregate(Object 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 event
String getTypeIdentifier()
Class<T> getAggregateType()
instanceOf this type.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||