Interface StateBasedEntityModule.RepositoryPhase<ID,E>
- Type Parameters:
ID- The type of identifier used to identify the state-based entity that's being built.E- The type of the state-based entity being built.
- Enclosing interface:
StateBasedEntityModule<ID,E>
public static interface StateBasedEntityModule.RepositoryPhase<ID,E>
The repository phase of the state-based entity builder.
Allows for two paths when building a state-based entity. Firstly, a
entity loader can be defined, after which the builder will enforce registration
of an entity persister. The second option allows for providing
a repository right away.
-
Method Summary
Modifier and TypeMethodDescriptionloader(ComponentBuilder<SimpleRepositoryEntityLoader<ID, E>> loader) Registers the givenloaderas a factory method for the state-based entity being built.repository(ComponentBuilder<Repository<ID, E>> repository) Registers the givenrepositoryas a factory method for the state-based entity being built.
-
Method Details
-
loader
StateBasedEntityModule.PersisterPhase<ID,E> loader(@Nonnull ComponentBuilder<SimpleRepositoryEntityLoader<ID, E>> loader) Registers the givenloaderas a factory method for the state-based entity being built.- Parameters:
loader- A factory method constructing aSimpleRepositoryEntityLoader.- Returns:
- The "persister" phase of this builder, for a fluent API.
-
repository
StateBasedEntityModule.MessagingMetamodelPhase<ID,E> repository(@Nonnull ComponentBuilder<Repository<ID, E>> repository) Registers the givenrepositoryas a factory method for the state-based entity being built.- Parameters:
repository- A factory method constructing aRepository.- Returns:
- The parent
StateBasedEntityModule, signaling the end of configuring a state-based entity.
-