Class AnnotationBasedEventSourcedEntityFactoryDefinition
java.lang.Object
org.axonframework.eventsourcing.annotation.reflection.AnnotationBasedEventSourcedEntityFactoryDefinition
- All Implemented Interfaces:
EventSourcedEntityFactoryDefinition<Object,Object>
public class AnnotationBasedEventSourcedEntityFactoryDefinition
extends Object
implements EventSourcedEntityFactoryDefinition<Object,Object>
Definition for an annotation-based
EventSourcedEntityFactory that constructs an
EventSourcedEntity-annotated class. This is the default implementation of the
EventSourcedEntityFactoryDefinition for the EventSourcedEntity annotation.
The AnnotationBasedEventSourcedEntityFactory that is constructed through this class scans
EntityCreator-annotated static methods and constructors. See the EntityCreator documentation
for more information on how to use it.
- Since:
- 5.0.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFactory(Class<Object> entityType, Set<Class<? extends Object>> entitySubTypes, Class<Object> idType, Configuration configuration)
-
Constructor Details
-
AnnotationBasedEventSourcedEntityFactoryDefinition
public AnnotationBasedEventSourcedEntityFactoryDefinition()
-
-
Method Details
-
createFactory
public EventSourcedEntityFactory<Object,Object> createFactory(@Nonnull Class<Object> entityType, @Nonnull Set<Class<? extends Object>> entitySubTypes, @Nonnull Class<Object> idType, @Nonnull Configuration configuration) Description copied from interface:EventSourcedEntityFactoryDefinitionCreates a newEventSourcedEntityFactoryfor the givenentityTypeandidType. In addition, it receives theConfigurationto resolve any component dependencies that are necessary for creating the factory.- Specified by:
createFactoryin interfaceEventSourcedEntityFactoryDefinition<Object,Object> - Parameters:
entityType- The type of the entity to create.entitySubTypes- The subtypes of the entity in case the entity is polymorphic.idType- The identifier type of the entity to create.configuration- The configuration to use for creating the factory.- Returns:
- A new
EventSourcedEntityFactoryfor the givenentityTypeandidType.
-