Interface StatefulAggregateInstanceFactory
- All Known Implementing Classes:
StatefulAggregateInstanceFactory.ObjenesisAggregateInstanceFactory,StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
public interface StatefulAggregateInstanceFactory
Factory that helps the
StatefulAggregateRepository/StatefulAggregateInMemoryProjector to create an instance of a given Aggregate.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classStatefulAggregateInstanceFactorythat usesObjenesisto create a new instance of theAggregate
Please note: Objenesis doesn't initialize fields nor call any constructors, so youAggregatedesign needs to take this into consideration.
All concrete aggregates that extendsAggregateRoothave been prepared to be initialized byObjenesisstatic classStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StatefulAggregateInstanceFactoryAnStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregatestatic final StatefulAggregateInstanceFactoryAnStatefulAggregateInstanceFactorythat usesObjenesisto create a new instance of theAggregate
Please note: Objenesis doesn't initialize fields nor call any constructors, so youAggregatedesign needs to take this into consideration.
All concrete aggregates that extendsStatefulAggregatehave been prepared to be initialized byObjenesis -
Method Summary
Modifier and TypeMethodDescription<ID,AGGREGATE>
AGGREGATECreate an instance of theAggregateReturns anStatefulAggregateInstanceFactorythat usesObjenesisto create a new instance of theAggregate
Please note: Objenesis doesn't initialize fields nor call any constructors, so youAggregatedesign needs to take this into consideration.
All concrete aggregates that extendsAggregateRoothave been prepared to be initialized byObjenesisReturns anStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate
-
Field Details
-
DEFAULT_REFLECTION_BASED_CONSTRUCTOR_AGGREGATE_ROOT_FACTORY
static final StatefulAggregateInstanceFactory DEFAULT_REFLECTION_BASED_CONSTRUCTOR_AGGREGATE_ROOT_FACTORYAnStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate -
OBJENESIS_AGGREGATE_ROOT_FACTORY
AnStatefulAggregateInstanceFactorythat usesObjenesisto create a new instance of theAggregate
Please note: Objenesis doesn't initialize fields nor call any constructors, so youAggregatedesign needs to take this into consideration.
All concrete aggregates that extendsStatefulAggregatehave been prepared to be initialized byObjenesis
-
-
Method Details
-
create
Create an instance of theAggregate -
reflectionBasedAggregateRootFactory
Returns anStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate- Returns:
- #DEFAULT_CONSTRUCTOR_AGGREGATE_ROOT_FACTORY
-
objenesisAggregateRootFactory
Returns anStatefulAggregateInstanceFactorythat usesObjenesisto create a new instance of theAggregate
Please note: Objenesis doesn't initialize fields nor call any constructors, so youAggregatedesign needs to take this into consideration.
All concrete aggregates that extendsAggregateRoothave been prepared to be initialized byObjenesis- Returns:
- #OBJENESIS_AGGREGATE_ROOT_FACTORY
-