View Javadoc
1   package fr.ifremer.dali.dao.data.photo;
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.photo.PhotoDao;
27  import fr.ifremer.dali.dto.data.photo.PhotoDTO;
28  
29  import java.util.Collection;
30  import java.util.Date;
31  import java.util.List;
32  
33  /**
34   * <p>DaliPhotoDao interface.</p>
35   *
36   * @author Ludovic
37   */
38  public interface DaliPhotoDao extends PhotoDao {
39      
40      /**
41       * <p>getPhotosBySurveyId.</p>
42       *
43       * @param surveyId a int.
44       * @return a {@link java.util.List} object.
45       */
46      List<PhotoDTO> getPhotosBySurveyId(int surveyId);
47      
48      /**
49       * <p>savePhotosBySurveyId.</p>
50       *
51       * @param surveyId a int.
52       * @param photos a {@link java.util.Collection} object.
53       */
54      void savePhotosBySurveyId(int surveyId, Collection<PhotoDTO> photos);
55  
56      /**
57       * <p>removeBySurveyId.</p>
58       *
59       * @param surveyId a int.
60       */
61      void removeBySurveyId(int surveyId);
62      
63      /**
64       * <p>removeBySamplingOperationId.</p>
65       *
66       * @param samplingOperationId a int.
67       */
68      void removeBySamplingOperationId(int samplingOperationId);
69  
70      /**
71       * Validate all photos attached to the survey and to the inner sampling operations
72       *
73       * @param surveyIds the survey id
74       * @param validationDate the validation date
75       */
76      int validateBySurveyIds(Collection<Integer> surveyIds, Date validationDate);
77  
78      /**
79       * Unvalidate all photos attached to the survey and to the inner sampling operations
80       *
81       * @param surveyIds the survey id
82       */
83      int unvalidateBySurveyIds(Collection<Integer> surveyIds);
84  
85      /**
86       * Qualify all photos attached to the survey and to the inner sampling operations
87       *
88       * @param surveyIds the survey id
89       */
90      int qualifyBySurveyIds(List<Integer> surveyIds, Date qualificationDate);
91  
92  }