Interface OAuthClientRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<OAuthClient,,Long> org.springframework.data.jpa.repository.JpaRepository<OAuthClient,,Long> org.springframework.data.repository.PagingAndSortingRepository<OAuthClient,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<OAuthClient>,org.springframework.data.querydsl.QuerydslPredicateExecutor<OAuthClient>,org.springframework.data.repository.Repository<OAuthClient,Long>
@Repository
public interface OAuthClientRepository
extends org.springframework.data.jpa.repository.JpaRepository<OAuthClient,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<OAuthClient>
The Interface OAuthClientRepository.
-
Method Summary
Modifier and TypeMethodDescriptionfindByClientId(String clientId) Find by client id.findByIdAndVersion(long id, int version) Find by id and version.voidsetClientSecret(long id, String encodedPassword) Sets the client secret.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, 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, findOneMethods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor
count, exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
-
Method Details
-
findByClientId
Find by client id.- Parameters:
clientId- the client id- Returns:
- the o auth client
-
findByIdAndVersion
Find by id and version.- Parameters:
id- the idversion- the version- Returns:
- the o auth client
-
setClientSecret
@Modifying @Query("update OAuthClient set clientSecret = ?2 where id = ?1") void setClientSecret(long id, String encodedPassword) Sets the client secret.- Parameters:
id- the oauth client database IDencodedPassword- the encoded password
-