-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
PurgeMapper.java
100 lines (63 loc) · 3.96 KB
/
PurgeMapper.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.db.purge;
import java.util.List;
import javax.annotation.Nullable;
import org.apache.ibatis.annotations.Param;
public interface PurgeMapper {
List<IdUuidPair> selectSnapshotIdsAndUuids(PurgeSnapshotQuery query);
/**
* Returns the list of components of a project from a project_uuid. The project itself is also returned.
*/
List<IdUuidPair> selectComponentsByProjectUuid(String projectUuid);
void deleteAnalyses(@Param("analysisUuids") List<String> analysisUuids);
void deleteDescendantSnapshots(@Param("snapshotIds") List<Long> snapshotIds);
void deleteSnapshot(@Param("snapshotUuids") List<String> snapshotUuids);
void deleteSnapshotDuplications(@Param("analysisUuids") List<String> analysisUuids);
void deleteSnapshotEvents(@Param("analysisUuids") List<String> analysisUuids);
void deleteAnalysisMeasures(@Param("analysisUuids") List<String> analysisUuids);
void deleteSnapshotMeasures(@Param("snapshotIds") List<Long> snapshotIds);
void deleteComponentMeasures(@Param("analysisUuids") List<String> analysisUuids, @Param("componentUuids") List<String> componentUuids);
List<Long> selectMetricIdsWithoutHistoricalData();
void deleteSnapshotWastedMeasures(@Param("snapshotIds") List<Long> snapshotIds, @Param("mids") List<Long> metricIds);
void updatePurgeStatusToOne(String snapshotUuid);
void disableComponent(String componentUuid);
void resolveComponentIssuesNotAlreadyResolved(@Param("componentUuid") String componentUuid, @Param("dateAsLong") Long dateAsLong);
void deleteResourceIndex(@Param("componentUuids") List<String> componentUuids);
void setSnapshotIsLastToFalse(@Param("componentUuid") String componentUuid);
void deleteComponentLinks(@Param("componentUuids") List<String> componentUuids);
void deleteComponentProperties(@Param("componentIds") List<Long> componentIds);
void deleteComponents(@Param("componentUuids") List<String> componentUuids);
void deleteComponentGroupRoles(@Param("componentIds") List<Long> componentIds);
void deleteComponentUserRoles(@Param("componentIds") List<Long> componentIds);
void deleteComponentManualMeasures(@Param("componentUuids") List<String> componentUuids);
void deleteComponentEvents(@Param("componentUuids") List<String> componentUuids);
void deleteAuthors(@Param("resourceIds") List<Long> resourceIds);
List<PurgeableAnalysisDto> selectPurgeableAnalysesWithEvents(@Param("componentUuid") String componentUuid);
List<PurgeableAnalysisDto> selectPurgeableAnalysesWithoutEvents(@Param("componentUuid") String componentUuid);
void deleteComponentIssueChanges(@Param("componentUuids") List<String> componentUuids);
void deleteComponentIssues(@Param("componentUuids") List<String> componentUuids);
List<String> selectOldClosedIssueKeys(@Param("projectUuid") String projectUuid, @Nullable @Param("toDate") Long toDate);
void deleteIssuesFromKeys(@Param("keys") List<String> keys);
void deleteIssueChangesFromIssueKeys(@Param("issueKeys") List<String> issueKeys);
void deleteFileSourcesByProjectUuid(String rootProjectUuid);
void deleteFileSourcesByUuid(String fileUuid);
void deleteCeActivityByProjectUuid(String projectUuid);
}