Interface SimpleRepositoryEntityPersister<I,T>

Type Parameters:
I - The type of the identifier of the entity.
T - The type of the entity.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SimpleRepositoryEntityPersister<I,T>
Functional interface describing a component capable of persisting an entity with given identifier for the SimpleRepository. The entity is persisted within the given ProcessingContext.
  • Method Summary

    Modifier and Type
    Method
    Description
    persist(I id, T entity, ProcessingContext context)
    Persist the given entity with given id within the given context.
  • Method Details

    • persist

      CompletableFuture<Void> persist(I id, T entity, ProcessingContext context)
      Persist the given entity with given id within the given context.
      Parameters:
      id - The identifier of the entity to persist.
      entity - The entity to persist.
      context - The context in which the entity should be persisted.
      Returns:
      a CompletableFuture that completes when the entity has been persisted.