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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      OAuthClient findByClientId​(String clientId)
      Find by client id.
      OAuthClient findByIdAndVersion​(long id, int version)
      Find by id and version.
      void setClientSecret​(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, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, 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, findBy, findOne
      • Methods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor

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

      • findByClientId

        OAuthClient findByClientId​(String clientId)
        Find by client id.
        Parameters:
        clientId - the client id
        Returns:
        the o auth client
      • findByIdAndVersion

        OAuthClient findByIdAndVersion​(long id,
                                       int version)
        Find by id and version.
        Parameters:
        id - the id
        version - 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 ID
        encodedPassword - the encoded password