T - The type of aggregate this factory createspublic class GenericAggregateFactory<T extends EventSourcedAggregateRoot> extends AbstractAggregateFactory<T>
| Constructor and Description | 
|---|
GenericAggregateFactory(Class<T> aggregateType)
Initialize the AggregateFactory for creating instances of the given  
aggregateType. | 
| Modifier and Type | Method and Description | 
|---|---|
protected T | 
doCreateAggregate(Object aggregateIdentifier,
                 DomainEventMessage firstEvent)
Create an uninitialized Aggregate instance with the given  
aggregateIdentifier. | 
Class<T> | 
getAggregateType()
Returns the type of aggregate this factory creates. 
 | 
String | 
getTypeIdentifier()
Returns the type identifier for this aggregate factory. 
 | 
createAggregate, postProcessInstancepublic GenericAggregateFactory(Class<T> aggregateType)
aggregateType.aggregateType - The type of aggregate this factory creates instances of.IncompatibleAggregateException - if the aggregate constructor throws an exception, or if the JVM security
                                        settings prevent the GenericAggregateFactory from calling the
                                        constructor.protected T doCreateAggregate(Object aggregateIdentifier, DomainEventMessage firstEvent)
aggregateIdentifier. The given
 firstEvent can be used to define the requirements of the aggregate to create.
 
 The given firstEvent is never a snapshot event.
 doCreateAggregate in class AbstractAggregateFactory<T extends EventSourcedAggregateRoot>aggregateIdentifier - The identifier of the aggregate to createfirstEvent - The first event in the Event Stream of the AggregateIncompatibleAggregateException - if the aggregate constructor throws an exception, or if the JVM security
                                        settings prevent the GenericAggregateFactory from calling the
                                        constructor.public String getTypeIdentifier()
AggregateFactorypublic Class<T> getAggregateType()
AggregateFactoryinstanceOf this type.Copyright © 2010-2014. All Rights Reserved.