View Javadoc
1   package fr.ifremer.dali.dao.data.samplingoperation;
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  import fr.ifremer.quadrige3.core.dao.data.samplingoperation.SamplingOperationExtendDao;
27  import fr.ifremer.dali.dto.data.sampling.SamplingOperationDTO;
28  
29  import java.util.Collection;
30  import java.util.Date;
31  import java.util.List;
32  
33  /**
34   * <p>DaliSamplingOperationDao interface.</p>
35   *
36   * @author Ludovic
37   */
38  public interface DaliSamplingOperationDao extends SamplingOperationExtendDao {
39  
40      /**
41       * <p>getSamplingOperationsBySurveyId.</p>
42       *
43       * @param surveyId                   a int.
44       * @param withIndividualMeasurements a boolean.
45       * @return a {@link java.util.List} object.
46       */
47      List<SamplingOperationDTO> getSamplingOperationsBySurveyId(int surveyId, boolean withIndividualMeasurements);
48  
49      /**
50       * <p>saveSamplingOperationsBySurveyId.</p>
51       *
52       * @param surveyId           a int.
53       * @param samplingOperations a {@link java.util.Collection} object.
54       */
55      void saveSamplingOperationsBySurveyId(int surveyId, Collection<SamplingOperationDTO> samplingOperations);
56  
57      /**
58       * <p>removeBySurveyId.</p>
59       *
60       * @param surveyId a int.
61       */
62      void removeBySurveyId(int surveyId);
63  
64      /**
65       * Validate all sampling operations by survey id
66       *
67       * @param surveyIds the survey id
68       * @param validationDate the validation date
69       */
70      int validateBySurveyIds(Collection<Integer> surveyIds, Date validationDate);
71  
72      /**
73       * Unvalidate all sampling operations by survey id
74       *
75       * @param surveyIds the survey id
76       */
77      int unvalidateBySurveyIds(Collection<Integer> surveyIds);
78  
79      /**
80       * Qualify all sampling operations by survey id
81       *
82       * @param surveyIds the survey id
83       * @param qualityLevelCode the qualification level code
84       */
85      int qualifyBySurveyIds(List<Integer> surveyIds, Date qualificationDate, String qualityLevelCode);
86  
87      /**
88       * <p>updateSamplingOperationsControlDate.</p>
89       *
90       * @param samplingOperationIds a {@link java.util.Collection} object.
91       * @param controlDate          a {@link java.util.Date} object.
92       */
93      void updateSamplingOperationsControlDate(Collection<Integer> samplingOperationIds, Date controlDate);
94  
95  }