Package eu.europeana.apikey.repos
Interface ApiKeyRepo
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ApiKey,,String> org.springframework.data.jpa.repository.JpaRepository<ApiKey,,String> org.springframework.data.repository.PagingAndSortingRepository<ApiKey,,String> org.springframework.data.repository.query.QueryByExampleExecutor<ApiKey>,org.springframework.data.repository.Repository<ApiKey,String>
@Repository
public interface ApiKeyRepo
extends org.springframework.data.jpa.repository.JpaRepository<ApiKey,String>
The interface Api key repo.
-
Method Summary
Modifier and TypeMethodDescriptionfindAll()Deprecated.(The migration feature for all apikeys to Keycloak clients was abandoned)findByEmail(String email) Find by email optional.findByEmailAndAppName(String email, String appName) Find by email and app name list.findByKeycloakId(String keycloakId) Find by keycloak id optional.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, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods 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
-
findByEmail
Find by email optional.- Parameters:
email- the email- Returns:
- the optional
-
findByKeycloakId
Find by keycloak id optional.- Parameters:
keycloakId- the keycloak id- Returns:
- the optional
-
findAll
-
findByEmailAndAppName
Find by email and app name list.- Parameters:
email- the emailappName- the app name- Returns:
- the list
-
findAllKeysToMigrate
@Deprecated(since="version 0.2 to be released late november 2020") @Query("SELECT a FROM ApiKey a WHERE (a.keycloakId is null OR a.keycloakId = \'to-migrate\')") List<ApiKey> findAllKeysToMigrate()Deprecated.(The migration feature for all apikeys to Keycloak clients was abandoned)Find all keys to migrate list.- Returns:
- the list
-