Class StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
java.lang.Object
dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
- All Implemented Interfaces:
StatefulAggregateInstanceFactory
- Enclosing interface:
- StatefulAggregateInstanceFactory
public static class StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory
extends Object
implements StatefulAggregateInstanceFactory
StatefulAggregateInstanceFactory that calls the default no-arguments constructor on the concrete Aggregate type to
create a new instance of the Aggregate-
Nested Class Summary
Nested classes/interfaces inherited from interface dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.StatefulAggregateInstanceFactory
StatefulAggregateInstanceFactory.ObjenesisAggregateInstanceFactory, StatefulAggregateInstanceFactory.ReflectionBasedAggregateInstanceFactory -
Field Summary
Fields inherited from interface dk.cloudcreate.essentials.components.eventsourced.aggregates.stateful.StatefulAggregateInstanceFactory
DEFAULT_REFLECTION_BASED_CONSTRUCTOR_AGGREGATE_ROOT_FACTORY, OBJENESIS_AGGREGATE_ROOT_FACTORY -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ReflectionBasedAggregateInstanceFactory
public ReflectionBasedAggregateInstanceFactory()
-
-
Method Details
-
create
Description copied from interface:StatefulAggregateInstanceFactoryCreate an instance of theAggregate- Specified by:
createin interfaceStatefulAggregateInstanceFactory- Type Parameters:
ID- the type of aggregate idAGGREGATE- theAggregateimplementation type- Parameters:
id- the id valueaggregateType- theAggregateimplementation type- Returns:
- new aggregate instance
-