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 TypeMethodDescriptionfindKeyById(Integer id) Find key by id.Get the max id.getIdsByKeyStatus(String status) Gets the ids by key status.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods 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
Get the max id.- Returns:
- the max id
-