Interface StateBasedEntityModule<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.
All Superinterfaces:
EntityModule<ID,E>, Module

public interface StateBasedEntityModule<ID,E> extends EntityModule<ID,E>
An expansion on the EntityModule, specifically for state-based entities.

Invoke the static declarative(Class, Class) operation to start the builder flow for a state-based entity.

Provides operations to either (1) register a entity loader and entity persister, or (2) a repository performing both the loading and persisting task.

Since:
5.0.0
Author:
Allard Buijze, Mateusz Nowak, Mitchell Herrijgers, Steven van Beelen
  • Method Details

    • declarative

      static <ID, E> StateBasedEntityModule.RepositoryPhase<ID,E> declarative(@Nonnull Class<ID> idType, @Nonnull Class<E> entityType)
      Starts the builder for a state-based entity with the given entityType and idType.
      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.
      Parameters:
      idType - The type of identifier used to identify the state-based entity that's being built.
      entityType - The type of the state-based entity being built.
      Returns:
      The repository phase of this builder, for a fluent API.