Interface StatefulAggregateInstanceFactory
-
- All Known Implementing Classes:
StatefulAggregateInstanceFactory.ObjenesisAggregateInstanceFactory,StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
public interface StatefulAggregateInstanceFactoryFactory that helps theStatefulAggregateRepository/StatefulAggregateInMemoryProjectorto create an instance of a givenAggregate.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classStatefulAggregateInstanceFactory.ObjenesisAggregateInstanceFactoryStatefulAggregateInstanceFactorythat 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 classStatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactoryStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate
-
Field Summary
Fields Modifier and Type Field Description static StatefulAggregateInstanceFactoryDEFAULT_REFLECTION_BASED_CONSTRUCTOR_AGGREGATE_ROOT_FACTORYAnStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregatestatic StatefulAggregateInstanceFactoryOBJENESIS_AGGREGATE_ROOT_FACTORYAnStatefulAggregateInstanceFactorythat 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
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <ID,AGGREGATE>
AGGREGATEcreate(ID id, Class<AGGREGATE> aggregateType)Create an instance of theAggregatestatic StatefulAggregateInstanceFactoryobjenesisAggregateRootFactory()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 byObjenesisstatic StatefulAggregateInstanceFactoryreflectionBasedAggregateRootFactory()Returns anStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate
-
-
-
Field Detail
-
DEFAULT_REFLECTION_BASED_CONSTRUCTOR_AGGREGATE_ROOT_FACTORY
static final StatefulAggregateInstanceFactory DEFAULT_REFLECTION_BASED_CONSTRUCTOR_AGGREGATE_ROOT_FACTORY
AnStatefulAggregateInstanceFactorythat calls the default no-arguments constructor on the concreteAggregatetype to create a new instance of theAggregate
-
OBJENESIS_AGGREGATE_ROOT_FACTORY
static final StatefulAggregateInstanceFactory 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 Detail
-
create
<ID,AGGREGATE> AGGREGATE create(ID id, Class<AGGREGATE> aggregateType)Create an instance of theAggregate
-
reflectionBasedAggregateRootFactory
static StatefulAggregateInstanceFactory 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
static StatefulAggregateInstanceFactory 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
-
-