1 package fr.ifremer.dali.dao.referential;
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 import fr.ifremer.dali.dto.referential.*;
27 import fr.ifremer.quadrige3.ui.core.dto.referential.StatusDTO;
28 import org.springframework.cache.annotation.Cacheable;
29
30 import java.util.List;
31
32
33
34
35
36 public interface DaliReferentialDao {
37
38 String ALL_STATUS_CACHE = "all_status";
39 String STATUS_BY_CODE_CACHE = "status_by_code";
40
41 String DEPTH_LEVEL_BY_ID_CACHE = "depth_level_by_id";
42
43 String POSITIONING_SYSTEM_BY_ID_CACHE = "positioning_system_by_id";
44
45 String QUALITY_FLAG_BY_CODE_CACHE = "quality_flag_by_code";
46 String ALL_QUALITY_FLAGS_CACHE = "all_quality_flags";
47
48 String ALL_TAXONOMIC_LEVELS_CACHE = "all_taxonomic_levels";
49 String TAXONOMIC_LEVEL_BY_CODE_CACHE = "taxonomic_level_by_code";
50
51 @Cacheable(value = ALL_STATUS_CACHE)
52 List<StatusDTO> getAllStatus();
53
54 @Cacheable(value = STATUS_BY_CODE_CACHE)
55 StatusDTO getStatusByCode(String statusCode);
56
57 List<StatusDTO> getStatusByCodes(List<String> statusCodes);
58
59
60
61
62
63
64
65 @Cacheable(value = "all_depth_levels")
66 List<LevelDTO> getAllDepthLevels();
67
68
69
70
71
72
73
74 @Cacheable(value = DEPTH_LEVEL_BY_ID_CACHE)
75 LevelDTO getDepthLevelById(int depthLevelId);
76
77
78
79
80
81
82
83 @Cacheable(value = ALL_QUALITY_FLAGS_CACHE)
84 List<QualityLevelDTO> getAllQualityFlags(List<String> statusCodes);
85
86
87
88
89
90
91
92 @Cacheable(value = QUALITY_FLAG_BY_CODE_CACHE)
93 QualityLevelDTO getQualityFlagByCode(String qualityFlagCode);
94
95
96
97
98
99
100 @Cacheable(value = "all_positioning_systems")
101 List<PositioningSystemDTO> getAllPositioningSystems();
102
103
104
105
106
107
108
109 @Cacheable(value = POSITIONING_SYSTEM_BY_ID_CACHE)
110 PositioningSystemDTO getPositioningSystemById(int posSystemId);
111
112
113
114
115
116
117 @Cacheable(value = "all_grouping_types")
118 List<GroupingTypeDTO> getAllGroupingTypes();
119
120
121
122
123
124
125
126 @Cacheable(value = "groupings_by_type")
127 List<GroupingDTO> getGroupingsByType(String groupingType);
128
129
130
131
132
133
134 @Cacheable(value = "all_citations")
135 List<CitationDTO> getAllCitations();
136
137
138
139
140
141
142 List<PhotoTypeDTO> getAllPhotoTypes();
143
144
145
146
147
148
149
150 PhotoTypeDTO getPhotoTypeByCode(String photoTypeCode);
151
152 @Cacheable(value = ALL_TAXONOMIC_LEVELS_CACHE)
153 List<TaxonomicLevelDTO> getAllTaxonomicLevels();
154
155 @Cacheable(value = TAXONOMIC_LEVEL_BY_CODE_CACHE)
156 TaxonomicLevelDTO getTaxonomicLevelByCode(String code);
157
158 }