Interface DataEncryptKeystoreRepository

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

@Repository public interface DataEncryptKeystoreRepository extends org.springframework.data.jpa.repository.JpaRepository<DataEncryptKeystore,String>
The Interface DataEncryptKeystoreRepository.
Author:
Mahammed Taheer
  • Method Summary

    Modifier and Type
    Method
    Description
    Find key by id.
    Get the max id.
    Gets the ids by key status.

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

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

    findAll, findAllById, saveAll

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

    findAll

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

    findAll

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

    count, exists, findAll, findBy, findOne
  • Method Details

    • findKeyById

      @Cacheable(value="zkdataencryptedkeystorecache", unless="#result == null") @Query("SELECT d.key from DataEncryptKeystore d where d.id = :id") String findKeyById(@Param("id") Integer id)
      Find key by id.
      Parameters:
      id - the id
      Returns:
      the string
    • getIdsByKeyStatus

      @Query("SELECT d.id from DataEncryptKeystore d where d.keyStatus = :status") List<Integer> getIdsByKeyStatus(@Param("status") String status)
      Gets the ids by key status.
      Parameters:
      status - the status
      Returns:
      the ids by key status
    • findMaxId

      @Query("SELECT MAX(d.id) from DataEncryptKeystore d") Long findMaxId()
      Get the max id.
      Returns:
      the max id