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

Classes in this File | Line Coverage | Branch Coverage | Complexity
PermissionRepository |
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.Permission;
4 |  |
5 |  |
     import org.springframework.data.repository.PagingAndSortingRepository;
6 |  |
7 |  |
     import java.util.Collection;
8 |  |
     import java.util.List;
9 |  |
10 |  |
     /**
11 |  |
      * @author Jason Song(song_s@ctrip.com)
12 |  |
      */
13 |  |
     public interface PermissionRepository extends PagingAndSortingRepository<Permission, Long> {
14 |  |
       /**
15 |  |
        * find permission by permission type and targetId
16 |  |
        */
17 |  |
       Permission findTopByPermissionTypeAndTargetId(String permissionType, String targetId);
18 |  |
19 |  |
       /**
20 |  |
        * find permissions by permission types and targetId
21 |  |
        * @param permissionTypes
22 |  |
        * @param targetId
23 |  |
        * @return
24 |  |
        */
25 |  |
       List<Permission> findByPermissionTypeInAndTargetId(Collection<String> permissionTypes,
26 |  |
                                                                String targetId);
27 |  |
     }