Set all cross references of policy/pap
[policy/pap.git] / main / src / main / java / org / onap / policy / pap / main / repository / PdpStatisticsRepository.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2022 Bell Canada. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.pap.main.repository;
22
23 import java.util.Date;
24 import java.util.List;
25 import org.onap.policy.models.pdp.persistence.concepts.JpaPdpStatistics;
26 import org.springframework.data.domain.Pageable;
27 import org.springframework.data.jpa.repository.JpaRepository;
28 import org.springframework.stereotype.Repository;
29
30 @Repository
31 public interface PdpStatisticsRepository extends JpaRepository<JpaPdpStatistics, Long> {
32
33     List<JpaPdpStatistics> findByTimeStampBetween(Date startTime, Date endTime, Pageable topRecordsSize);
34
35     List<JpaPdpStatistics> findByTimeStampGreaterThanEqual(Date startTime, Pageable topRecordsSize);
36
37     List<JpaPdpStatistics> findByTimeStampLessThanEqual(Date endTime, Pageable topRecordsSize);
38
39     List<JpaPdpStatistics> findByPdpGroupName(String pdpGroup, Pageable topRecordsSize);
40
41     List<JpaPdpStatistics> findByPdpGroupNameAndTimeStampBetween(String pdpGroup, Date startTime, Date endTime,
42         Pageable topRecordsSize);
43
44     List<JpaPdpStatistics> findByPdpGroupNameAndTimeStampGreaterThanEqual(String pdpGroup, Date startTime,
45         Pageable topRecordsSize);
46
47     List<JpaPdpStatistics> findByPdpGroupNameAndTimeStampLessThanEqual(String pdpGroup, Date endTime,
48         Pageable topRecordsSize);
49
50     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupName(String pdpGroup, String pdpSubGroup,
51         Pageable topRecordsSize);
52
53     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupNameAndTimeStampBetween(String pdpGroup, String pdpSubGroup,
54         Date startTime, Date endTime, Pageable topRecordsSize);
55
56     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupNameAndTimeStampGreaterThanEqual(String pdpGroup,
57         String pdpSubGroup, Date startTime, Pageable topRecordsSize);
58
59     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupNameAndTimeStampLessThanEqual(String pdpGroup,
60         String pdpSubGroup, Date endTime, Pageable topRecordsSize);
61
62     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupNameAndName(String pdpGroup, String pdpSubGroup,
63         String pdp, Pageable topRecordsSize);
64
65     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupNameAndNameAndTimeStampGreaterThanEqual(String pdpGroup,
66         String pdpSubGroup, String pdp, Date startTime, Pageable topRecordsSize);
67
68     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupNameAndNameAndTimeStampLessThanEqual(String pdpGroup,
69         String pdpSubGroup, String pdp, Date endTime, Pageable topRecordsSize);
70
71     List<JpaPdpStatistics> findByPdpGroupNameAndPdpSubGroupNameAndNameAndTimeStampBetween(String pdpGroup,
72         String pdpSubGroup, String pdp, Date startTime, Date endTime, Pageable topRecordsSize);
73
74     List<JpaPdpStatistics> findByName(String pdp, Pageable topRecordsSize);
75
76     List<JpaPdpStatistics> findByNameAndTimeStampGreaterThanEqual(String pdp, Date startTime,
77         Pageable topRecordsSize);
78
79     List<JpaPdpStatistics> findByNameAndTimeStampLessThanEqual(String pdp, Date startTime, Pageable topRecordsSize);
80
81     List<JpaPdpStatistics> findByNameAndTimeStampBetween(String pdp, Date startTime, Date endTime,
82         Pageable topRecordsSize);
83
84 }