Interface DataRepository


  • public interface DataRepository
    Interface for data repository to persist and delete data from repository
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String key)
      Remove data from the repository.
      void deleteAll()
      Remove all data from the repository
      java.lang.String getString​(java.lang.String key)
      Retrieve the value from the repository
      void save​(java.lang.String key, java.lang.String value)
      Persist data to the repository.
    • Method Detail

      • save

        void save​(java.lang.String key,
                  java.lang.String value)
        Persist data to the repository.
        Parameters:
        key - The key for the value
        value - The data value
      • getString

        java.lang.String getString​(java.lang.String key)
        Retrieve the value from the repository
        Parameters:
        key - The name of the value to retrieve.
        Returns:
        The value if exist or null if does not exist.
      • delete

        void delete​(java.lang.String key)
        Remove data from the repository.
        Parameters:
        key - The name of the value to remove.
      • deleteAll

        void deleteAll()
        Remove all data from the repository