org.surfnet.oaaas.repository
Interface AccessTokenRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<AccessToken,Long>, org.springframework.data.repository.Repository<AccessToken,Long>

@Repository
public interface AccessTokenRepository
extends org.springframework.data.repository.CrudRepository<AccessToken,Long>


Method Summary
 Number countByUniqueResourceOwnerIdAndClientId(long clientId)
           
 AccessToken findByIdAndResourceOwnerId(Long id, String owner)
           
 AccessToken findByRefreshToken(String refreshToken)
           
 List<AccessToken> findByResourceOwnerId(String resourceOwnerId)
           
 List<AccessToken> findByResourceOwnerIdAndClient(String resourceOwnerId, Client client)
           
 AccessToken findByToken(String token)
           
 
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, delete, delete, deleteAll, exists, findAll, findAll, findOne, save, save
 

Method Detail

findByToken

AccessToken findByToken(String token)

findByRefreshToken

AccessToken findByRefreshToken(String refreshToken)

findByResourceOwnerIdAndClient

List<AccessToken> findByResourceOwnerIdAndClient(String resourceOwnerId,
                                                 Client client)

findByResourceOwnerId

List<AccessToken> findByResourceOwnerId(String resourceOwnerId)

findByIdAndResourceOwnerId

AccessToken findByIdAndResourceOwnerId(Long id,
                                       String owner)

countByUniqueResourceOwnerIdAndClientId

@Query(value="select count(distinct resourceOwnerId) from accesstoken where client_id = ?1",
       nativeQuery=true)
Number countByUniqueResourceOwnerIdAndClientId(long clientId)


Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.