Interface EventSourcedEntityFactoryDefinition<E,ID>

Type Parameters:
E - The type of the entity to create.
ID - The type of the identifier of the entity to create.
All Known Implementing Classes:
AnnotationBasedEventSourcedEntityFactoryDefinition

public interface EventSourcedEntityFactoryDefinition<E,ID>
Defines how an EventSourcedEntityFactory should be constructed for an EventSourcedEntity annotated class. The definition receives the entityType and idType to create the factory for. In addition, it receives the Configuration to resolve any component dependencies that are necessary for creating the factory.
Since:
5.0.0
Author:
Mitchell Herrijgers
See Also:
  • Method Details

    • createFactory

      EventSourcedEntityFactory<ID,E> createFactory(@Nonnull Class<E> entityType, @Nonnull Set<Class<? extends E>> entitySubTypes, @Nonnull Class<ID> idType, @Nonnull Configuration configuration)
      Creates a new EventSourcedEntityFactory for the given entityType and idType. In addition, it receives the Configuration to resolve any component dependencies that are necessary for creating the factory.
      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 EventSourcedEntityFactory for the given entityType and idType.