1 package fr.ifremer.dali.dao.data.measurement; 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.measurement.Measurement; 27 import fr.ifremer.dali.dto.data.measurement.MeasurementDTO; 28 29 import java.util.Collection; 30 import java.util.Date; 31 import java.util.List; 32 33 /** 34 * <p>DaliMeasurementDao interface.</p> 35 * 36 * @author Ludovic 37 */ 38 public interface DaliMeasurementDao { 39 40 /** 41 * <p>getMeasurementEntityBySurveyId.</p> 42 * 43 * @param surveyId a int. 44 * @param pmfmId a int. 45 * @param createIfNotExists a boolean. 46 * @return a {@link fr.ifremer.quadrige3.core.dao.data.measurement.Measurement} object. 47 */ 48 Measurement getMeasurementEntityBySurveyId(int surveyId, int pmfmId, boolean createIfNotExists); 49 50 /** 51 * <p>removeMeasurementBySurveyId.</p> 52 * 53 * @param surveyId a int. 54 * @param pmfmId a int. 55 */ 56 void removeMeasurementBySurveyId(int surveyId, int pmfmId); 57 58 /** 59 * <p>getMeasurementsBySurveyId.</p> 60 * 61 * @param surveyId a int. 62 * @param excludePmfmId a {@link java.lang.Integer} object. 63 * @return a {@link java.util.List} object. 64 */ 65 List<MeasurementDTO> getMeasurementsBySurveyId(int surveyId, Integer... excludePmfmId); 66 67 /** 68 * <p>getMeasurementsBySamplingOperationId.</p> 69 * 70 * @param samplingOperationId a int. 71 * @param withTaxonMeasurements a boolean. 72 * @param excludePmfmId a {@link java.lang.Integer} object. 73 * @return a {@link java.util.List} object. 74 */ 75 List<MeasurementDTO> getMeasurementsBySamplingOperationId(int samplingOperationId, boolean withTaxonMeasurements, Integer... excludePmfmId); 76 77 /** 78 * <p>saveMeasurementsBySurveyId.</p> 79 * 80 * @param surveyId a int. 81 * @param measurements a {@link java.util.Collection} object. 82 * @param excludePmfmId a {@link java.lang.Integer} object. 83 */ 84 void saveMeasurementsBySurveyId(int surveyId, Collection<MeasurementDTO> measurements, Integer... excludePmfmId); 85 86 /** 87 * <p>saveMeasurementsBySamplingOperationId.</p> 88 * 89 * @param samplingOperationId a int. 90 * @param measurements a {@link java.util.Collection} object. 91 * @param withIndividual a boolean. 92 * @param excludePmfmId a {@link java.lang.Integer} object. 93 */ 94 void saveMeasurementsBySamplingOperationId(int samplingOperationId, Collection<MeasurementDTO> measurements, boolean withIndividual, Integer... excludePmfmId); 95 96 /** 97 * Remove a list of measurement 98 * 99 * @param measurementIds a {@link java.util.Collection} object. 100 */ 101 void removeMeasurementsByIds(Collection<Integer> measurementIds); 102 103 /** 104 * Remove a list of individual measurements 105 * 106 * @param taxonMeasurementIds a {@link java.util.Collection} object. 107 */ 108 void removeTaxonMeasurementsByIds(Collection<Integer> taxonMeasurementIds); 109 110 /** 111 * <p>removeAllMeasurementsBySurveyId.</p> 112 * 113 * @param surveyId a int. 114 */ 115 void removeAllMeasurementsBySurveyId(int surveyId); 116 117 /** 118 * <p>removeAllMeasurementsBySamplingOperationId.</p> 119 * 120 * @param samplingOperationId a int. 121 */ 122 void removeAllMeasurementsBySamplingOperationId(int samplingOperationId); 123 124 /** 125 * Validate all measurements and taxon measurements attached to the survey and to the inner sampling operations 126 * 127 * @param surveyIds the survey id 128 */ 129 int validateAllMeasurementsBySurveyIds(Collection<Integer> surveyIds, Date validationDate); 130 131 /** 132 * Unvalidate all measurements and taxon measurements attached to the survey and to the inner sampling operations 133 * 134 * @param surveyIds the survey id 135 */ 136 int unvalidateAllMeasurementsBySurveyIds(Collection<Integer> surveyIds); 137 138 /** 139 * Qualify all measurements and taxon measurements attached to the survey and to the inner sampling operations 140 * 141 * @param surveyIds the survey id 142 */ 143 int qualifyAllMeasurementsBySurveyIds(List<Integer> surveyIds, Date qualificationDate); 144 145 /** 146 * <p>updateMeasurementsControlDate.</p> 147 * 148 * @param measurementIds a {@link java.util.Collection} object. 149 * @param controlDate a {@link java.util.Date} object. 150 */ 151 void updateMeasurementsControlDate(Collection<Integer> measurementIds, Date controlDate); 152 153 /** 154 * <p>updateTaxonMeasurementsControlDate.</p> 155 * 156 * @param taxonMeasurementIds a {@link java.util.Collection} object. 157 * @param controlDate a {@link java.util.Date} object. 158 */ 159 void updateTaxonMeasurementsControlDate(Collection<Integer> taxonMeasurementIds, Date controlDate); 160 161 }