##### Coverage Report - com.ctrip.framework.apollo.portal.repository.UserRoleRepository

Classes in this File | Line Coverage | Branch Coverage | Complexity
UserRoleRepository |
N/A | N/A
N/A | N/A
| 1.0;1

1 |  |
     package com.ctrip.framework.apollo.portal.repository;
2 |  |
3 |  |
     import com.ctrip.framework.apollo.portal.entity.po.UserRole;
4 |  |
5 |  |
     import org.springframework.data.repository.PagingAndSortingRepository;
6 |  |
7 |  |
     import java.util.Collection;
8 |  |
     import java.util.List;
9 |  |
     import java.util.Set;
10 |  |
11 |  |
     /**
12 |  |
      * @author Jason Song(song_s@ctrip.com)
13 |  |
      */
14 |  |
     public interface UserRoleRepository extends PagingAndSortingRepository<UserRole, Long> {
15 |  |
       /**
16 |  |
        * find user roles by userId
17 |  |
        * @param userId
18 |  |
        * @return
19 |  |
        */
20 |  |
       List<UserRole> findByUserId(String userId);
21 |  |
22 |  |
       /**
23 |  |
        * find user roles by roleId
24 |  |
        * @param roleId
25 |  |
        * @return
26 |  |
        */
27 |  |
       List<UserRole> findByRoleId(long roleId);
28 |  |
29 |  |
       /**
30 |  |
        * find user roles by userIds and roleId
31 |  |
        * @param userId
32 |  |
        * @param roleId
33 |  |
        * @return
34 |  |
        */
35 |  |
       List<UserRole> findByUserIdInAndRoleId(Collection<String> userId, long roleId);
36 |  |
     }