Class NoArgumentConstructorCreationPolicyAggregateFactory<A>
java.lang.Object
org.axonframework.modelling.command.NoArgumentConstructorCreationPolicyAggregateFactory<A>
- Type Parameters:
A- The aggregate type this factory constructs.
- All Implemented Interfaces:
CreationPolicyAggregateFactory<A>
public class NoArgumentConstructorCreationPolicyAggregateFactory<A>
extends Object
implements CreationPolicyAggregateFactory<A>
Default implementation of
CreationPolicyAggregateFactory that invokes the default, no-arguments constructor
of the aggregate class A.- Since:
- 4.6.0
- Author:
- Stefan Andjelkovic
-
Constructor Summary
ConstructorsConstructorDescriptionNoArgumentConstructorCreationPolicyAggregateFactory(Class<? extends A> aggregateClass) Construct an instance of theNoArgumentConstructorCreationPolicyAggregateFactoryfor the given type. -
Method Summary
-
Constructor Details
-
NoArgumentConstructorCreationPolicyAggregateFactory
public NoArgumentConstructorCreationPolicyAggregateFactory(@Nonnull Class<? extends A> aggregateClass) Construct an instance of theNoArgumentConstructorCreationPolicyAggregateFactoryfor the given type.- Parameters:
aggregateClass- The aggregate type.
-
-
Method Details
-
create
Creates the aggregate instance based on the previously provided type. Invokes the default, no-argument constructor of the class.- Specified by:
createin interfaceCreationPolicyAggregateFactory<A>- Parameters:
identifier- The identifier to create the aggregate with. Not used by this factory.- Returns:
- An aggregate instance.
-