##### Coverage Report - com.ctrip.framework.apollo.biz.repository.AuditRepository

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

1 |  |
     package com.ctrip.framework.apollo.biz.repository;
2 |  |
3 |  |
     import java.util.List;
4 |  |
5 |  |
     import org.springframework.data.jpa.repository.Query;
6 |  |
     import org.springframework.data.repository.PagingAndSortingRepository;
7 |  |
     import org.springframework.data.repository.query.Param;
8 |  |
9 |  |
     import com.ctrip.framework.apollo.biz.entity.Audit;
10 |  |
11 |  |
     public interface AuditRepository extends PagingAndSortingRepository<Audit, Long> {
12 |  |
13 |  |
       @Query("SELECT a from Audit a WHERE a.dataChangeCreatedBy = :owner")
14 |  |
       List<Audit> findByOwner(@Param("owner") String owner);
15 |  |
16 |  |
       @Query("SELECT a from Audit a WHERE a.dataChangeCreatedBy = :owner AND a.entityName =:entity AND a.opName = :op")
17 |  |
       List<Audit> findAudits(@Param("owner") String owner, @Param("entity") String entity,
18 |  |
           @Param("op") String op);
19 |  |
     }