T - The type of aggregate this factory createspublic interface AggregateFactory<T extends EventSourcedAggregateRoot>
AbstractAggregateFactory instead.| Modifier and Type | Method and Description |
|---|---|
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.
|
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 eventString getTypeIdentifier()
Copyright © 2010-2014. All Rights Reserved.