View Javadoc
1   package fr.ifremer.dali.dao.referential;
2   
3   /*
4    * #%L
5    * Dali :: Core
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2015 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  
27  import fr.ifremer.dali.dto.referential.AnalysisInstrumentDTO;
28  import org.springframework.cache.annotation.Cacheable;
29  
30  import java.util.List;
31  
32  /**
33   * Created by Ludovic on 17/07/2015.
34   */
35  public interface DaliAnalysisInstrumentDao {
36  
37      /** Constant <code>ANALYSIS_INSTRUMENT_BY_ID_CACHE="analysisInstrumentById"</code> */
38      String ANALYSIS_INSTRUMENT_BY_ID_CACHE = "analysis_instrument_by_id";
39      /** Constant <code>ALL_ANALYSIS_INSTRUMENTS_CACHE="allAnalysisInstruments"</code> */
40      String ALL_ANALYSIS_INSTRUMENTS_CACHE = "all_analysis_instruments";
41      /** Constant <code>ANALYSIS_INSTRUMENTS_BY_IDS_CACHE="analysisInstrumentsByIds"</code> */
42      String ANALYSIS_INSTRUMENTS_BY_IDS_CACHE = "analysis_instruments_by_ids";
43  
44      /**
45       * <p>getAllAnalysisInstruments.</p>
46       *
47       * @param statusCodes a {@link java.util.List} object.
48       * @return a {@link java.util.List} object.
49       */
50      @Cacheable(value = ALL_ANALYSIS_INSTRUMENTS_CACHE)
51      List<AnalysisInstrumentDTO> getAllAnalysisInstruments(List<String> statusCodes);
52  
53      /**
54       * <p>getAnalysisInstrumentById.</p>
55       *
56       * @param analysisInstrumentId a int.
57       * @return a {@link fr.ifremer.dali.dto.referential.AnalysisInstrumentDTO} object.
58       */
59      @Cacheable(value = ANALYSIS_INSTRUMENT_BY_ID_CACHE)
60      AnalysisInstrumentDTO getAnalysisInstrumentById(int analysisInstrumentId);
61  
62      /**
63       * <p>getAnalysisInstrumentsByIds.</p>
64       *
65       * @param analysisInstrumentsIds a {@link java.util.List} object.
66       * @return a {@link java.util.List} object.
67       */
68      @Cacheable(value = ANALYSIS_INSTRUMENTS_BY_IDS_CACHE)
69      List<AnalysisInstrumentDTO> getAnalysisInstrumentsByIds(List<Integer> analysisInstrumentsIds);
70  
71      /**
72       * <p>findAnalysisInstruments.</p>
73       *
74       * @param statusCodes a {@link java.util.List} object.
75       * @param analysisInstrumentId a {@link java.lang.Integer} object.
76       * @return a {@link java.util.List} object.
77       */
78      List<AnalysisInstrumentDTO> findAnalysisInstruments(List<String> statusCodes, Integer analysisInstrumentId);
79  
80      /**
81       * <p>findAnalysisInstrumentsByName.</p>
82       *
83       * @param statusCodes a {@link java.util.List} object.
84       * @param analysisInstrumentName a {@link java.lang.String} object.
85       * @return a {@link java.util.List} object.
86       */
87      List<AnalysisInstrumentDTO> findAnalysisInstrumentsByName(List<String> statusCodes, String analysisInstrumentName);
88  
89  }