Interface Repository<K,T extends Identifiable<K>>

Type Parameters:
K - the key type
T - the entity type, must implement Identifiable
All Known Implementing Classes:
HazelcastRepository, StaticPositionRepository, StaticQuoteRepository

public interface Repository<K,T extends Identifiable<K>>
Generic repository interface for entities that implement Identifiable.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(K id)
    Delete entity
    get(K id)
    Get mapped value
    Get all mapped values
    void
    put(T entity)
    Store entity
  • Method Details

    • get

      Optional<T> get(K id)
      Get mapped value
      Parameters:
      id - key of the entity
      Returns:
    • put

      void put(T entity)
      Store entity
      Parameters:
      entity - to be stored
    • getAll

      Collection<T> getAll()
      Get all mapped values
      Returns:
    • delete

      void delete(K id)
      Delete entity
      Parameters:
      id - key of the entity