Interface ConfigRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Config,String>, org.springframework.data.jpa.repository.JpaRepository<Config,String>, org.springframework.data.repository.PagingAndSortingRepository<Config,String>, org.springframework.data.repository.query.QueryByExampleExecutor<Config>, org.springframework.data.repository.Repository<Config,String>

public interface ConfigRepository extends org.springframework.data.jpa.repository.JpaRepository<Config,String>
The ConfigRepository interface declares the repository for the Config domain type.
Author:
Marcus Portmann
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Delete the config with the specified key.
    boolean
    Check whether the config exists.
    Retrieve all the configs ordered by key descending.
    Retrieve the config.
    Retrieve the filtered configs.
    Retrieve the value for the config.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findOne
  • Method Details

    • deleteByKeyIgnoreCase

      void deleteByKeyIgnoreCase(String key)
      Delete the config with the specified key.
      Parameters:
      key - the key for the config
    • existsByKeyIgnoreCase

      boolean existsByKeyIgnoreCase(String key)
      Check whether the config exists.
      Parameters:
      key - the key for the config
      Returns:
      true if the config exists or false otherwise
    • findAllByOrderByKeyDesc

      List<Config> findAllByOrderByKeyDesc()
      Retrieve all the configs ordered by key descending.
      Returns:
      all the configs ordered by key descending
    • findByKeyIgnoreCase

      Optional<Config> findByKeyIgnoreCase(String key)
      Retrieve the config.
      Parameters:
      key - the key for the config
      Returns:
      an Optional containing the config or an empty Optional if the config could not be found
    • findByKeyIgnoreCaseContaining

      List<Config> findByKeyIgnoreCaseContaining(String filter)
      Retrieve the filtered configs.
      Parameters:
      filter - the filter to apply to the keys for the configs
      Returns:
      the filtered configs
    • getValueByKeyIgnoreCase

      @Query("select c.value from Config c where lower(c.key) = lower(:key)") Optional<String> getValueByKeyIgnoreCase(@Param("key") String key)
      Retrieve the value for the config.
      Parameters:
      key - the key for the config
      Returns:
      an Optional containing the value for the config or an empty Optional if the config could not be found