Interface EventSourcedEntityModule.EntityFactoryPhase<ID,E>
- Type Parameters:
ID- The type of identifier used to identify the event-sourced entity.E- The type of the event-sourced entity being built.
- Enclosing interface:
EventSourcedEntityModule<ID,E>
public static interface EventSourcedEntityModule.EntityFactoryPhase<ID,E>
Phase of the module's building process in which a
ComponentBuilder for an
EventSourcedEntityFactory should be provided. This factory is responsible for creating the event-sourced
entity of type E based on the entity's type, an identifier of type I, and optionally an
EventMessage if the stream is non-empty.-
Method Summary
Modifier and TypeMethodDescriptionentityFactory(ComponentBuilder<EventSourcedEntityFactory<ID, E>> entityFactory) Registers the givenComponentBuilderof anEventSourcedEntityFactoryas the factory for the event-sourced entity being built.
-
Method Details
-
entityFactory
EventSourcedEntityModule.CriteriaResolverPhase<ID,E> entityFactory(@Nonnull ComponentBuilder<EventSourcedEntityFactory<ID, E>> entityFactory) Registers the givenComponentBuilderof anEventSourcedEntityFactoryas the factory for the event-sourced entity being built. This factory is responsible for creating the event-sourced entity of typeEbased on the entity's type, an identifier of typeI, and optionally anEventMessageif the stream is non-empty.- Parameters:
entityFactory- AComponentBuilderconstructing theEventSourcedEntityFactoryfor the event-sourced entity.- Returns:
- The
CriteriaResolverphase of this builder, for a fluent API.
-