1 // license-header java merge-point 2 // 3 // Attention: Generated code! Do not modify by hand! 4 // Generated by: SpringDao.vsl in andromda-spring-cartridge. 5 // 6 package fr.ifremer.quadrige3.core.dao.data.measurement; 7 8 /*- 9 * #%L 10 * Quadrige3 Core :: Client API 11 * %% 12 * Copyright (C) 2017 - 2024 Ifremer 13 * %% 14 * This program is free software: you can redistribute it and/or modify 15 * it under the terms of the GNU Affero General Public License as published by 16 * the Free Software Foundation, either version 3 of the License, or 17 * (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU Affero General Public License 25 * along with this program. If not, see <http://www.gnu.org/licenses/>. 26 * #L% 27 */ 28 import fr.ifremer.quadrige3.core.dao.Search; 29 import fr.ifremer.quadrige3.core.dao.referential.ObjectType; 30 import fr.ifremer.quadrige3.core.dao.referential.QualityFlag; 31 import fr.ifremer.quadrige3.core.dao.referential.pmfm.Pmfm; 32 import java.sql.Timestamp; 33 import java.util.Collection; 34 import java.util.Date; 35 import java.util.Set; 36 import org.andromda.spring.PaginationResult; 37 38 /** 39 * Résultat de mesure faisant l'objet d'une mesure unique pour un taxon, ou un regroupement de taxon 40 * particulier. 41 * @see TaxonMeasurement 42 */ 43 public interface TaxonMeasurementDao 44 { 45 /** 46 * This constant is used as a transformation flag; entities can be converted automatically into value objects 47 * or other types, different methods in a class implementing this interface support this feature: look for 48 * an <code>int</code> parameter called <code>transform</code>. 49 * <p> 50 * This specific flag denotes no transformation will occur. 51 */ 52 public static final int TRANSFORM_NONE = 0; 53 54 55 /** 56 * Transforms the given results to a collection of {@link TaxonMeasurement} 57 * instances (this is useful when the returned results contains a row of data and you want just entities only). 58 * 59 * @param results the query results. 60 */ 61 public void toEntities(final Collection<?> results); 62 63 /** 64 * Gets an instance of TaxonMeasurement from the persistent store. 65 * @param taxonMeasId 66 * @return TaxonMeasurement 67 */ 68 public TaxonMeasurement get(Integer taxonMeasId); 69 70 /** 71 * <p> 72 * Does the same thing as {@link #get(Integer)} with an 73 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 74 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 75 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 76 * optionally transform the entity (into a value object for example). By default, transformation does 77 * not occur. 78 * </p> 79 * 80 * @param transform flag to determine transformation type. 81 * @param taxonMeasId the identifier of the entity to get. 82 * @return either the entity or the object transformed from the entity. 83 */ 84 public Object get(int transform, Integer taxonMeasId); 85 86 /** 87 * Loads an instance of TaxonMeasurement from the persistent store. 88 * @param taxonMeasId 89 * @return TaxonMeasurement 90 */ 91 public TaxonMeasurement load(Integer taxonMeasId); 92 93 /** 94 * <p> 95 * Does the same thing as {@link #load(Integer)} with an 96 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 97 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 98 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 99 * optionally transform the entity (into a value object for example). By default, transformation does 100 * not occur. 101 * </p> 102 * 103 * @param transform flag to determine transformation type. 104 * @param taxonMeasId the identifier of the entity to load. 105 * @return either the entity or the object transformed from the entity. 106 */ 107 public Object load(int transform, Integer taxonMeasId); 108 109 /** 110 * Loads all entities of type {@link TaxonMeasurement}. 111 * 112 * @return the loaded entities. 113 */ 114 public Collection<TaxonMeasurement> loadAll(); 115 116 /** 117 * <p> 118 * Does the same thing as {@link #loadAll()} with an 119 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 120 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 121 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 122 * transform the entity (into a value object for example). By default, transformation does 123 * not occur. 124 * </p> 125 * 126 * @param transform the flag indicating what transformation to use. 127 * @return the loaded entities. 128 */ 129 public Collection<?> loadAll(final int transform); 130 131 /** 132 * <p> 133 * Does the same thing as {@link #loadAll()} with an 134 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 135 * argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the 136 * page retrieved. 137 * </p> 138 * 139 * @param pageNumber the page number to retrieve when paging results. 140 * @param pageSize the size of the page to retrieve when paging results. 141 * @return the loaded entities. 142 */ 143 public Collection<?> loadAll(final int pageNumber, final int pageSize); 144 145 /** 146 * <p> 147 * Does the same thing as {@link #loadAll(int)} with an 148 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 149 * argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the 150 * page retrieved. 151 * </p> 152 * 153 * @param transform the flag indicating what transformation to use. 154 * @param pageNumber the page number to retrieve when paging results. 155 * @param pageSize the size of the page to retrieve when paging results. 156 * @return the loaded entities. 157 */ 158 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 159 160 /** 161 * Creates an instance of TaxonMeasurement and adds it to the persistent store. 162 * @param taxonMeasurement 163 * @return TaxonMeasurement 164 */ 165 public TaxonMeasurement create(TaxonMeasurement taxonMeasurement); 166 167 /** 168 * <p> 169 * Does the same thing as {@link #create(TaxonMeasurement)} with an 170 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 171 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 172 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 173 * transform the entity (into a value object for example). By default, transformation does 174 * not occur. 175 * </p> 176 * @param transform 177 * @param taxonMeasurement 178 * @return Object 179 */ 180 public Object create(int transform, TaxonMeasurement taxonMeasurement); 181 182 /** 183 * Creates a new instance of TaxonMeasurement and adds 184 * from the passed in <code>entities</code> collection 185 * 186 * @param entities the collection of TaxonMeasurement 187 * instances to create. 188 * 189 * @return the created instances. 190 */ 191 public Collection<TaxonMeasurement> create(Collection<TaxonMeasurement> entities); 192 193 /** 194 * <p> 195 * Does the same thing as {@link #create(TaxonMeasurement)} with an 196 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 197 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 198 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 199 * transform the entities (into value objects for example). By default, transformation does 200 * not occur. 201 * </p> 202 * @param transform 203 * @param entities 204 * @return Collection 205 */ 206 public Collection<?> create(int transform, Collection<TaxonMeasurement> entities); 207 208 /** 209 * <p> 210 * Creates a new <code>TaxonMeasurement</code> 211 * instance from <strong>all</strong> attributes and adds it to 212 * the persistent store. 213 * </p> 214 * @param objectId Identifiant interne de donnnée in situ de référence (passage, prélèvement, prélèvement) 215 * @param taxonMeasIndivId Le numéro de l'individu mesuré pour les résultats sur taxon ayant plusieurs individus 216 * @param taxonMeasNumerValue La valeur du résultat si elle n'est pas qualitative 217 * @param taxonMeasPrecisionValue La valeur de l'incertitude. Ex : 2 (%) ou 0,01 (dégrés) 218 * @param taxonMeasDigitNumber Nombre de chiffre après la virgule du résulat. Ex : si on saisit 10.00, il faut conserver 2 comme 219 information 220 * @param taxonMeasControlDt Date de contrôle 221 * @param taxonMeasValidDt Date de validation 222 * @param taxonMeasQualifDt Date de la qualification du résultat 223 * @param taxonMeasQualifCm Commentaire sur la qualification du résultat 224 Un commentaire de qualification est obligatoire si la mesure est douteuse ou mauvaise. 225 * @param taxonMeasCm Commentaire sur le résultat sur taxon 226 * @param updateDt Date de modification de l'objet, mise à jour par le système 227 * @param taxonNameId Identifiant interne du taxon cité (Utilisé par BD Recif pour stocker l'identifiant du taxon saisi 228 par l'utilisateur) 229 * @param taxonNameNm Nom scientifique du taxon cité (Utilisé par BD Recif pour stocker le libellé du taxon saisi par 230 l'utilisateur) 231 * @param remoteId 232 * @return TaxonMeasurement 233 */ 234 public TaxonMeasurement create( 235 Integer objectId, 236 Integer taxonMeasIndivId, 237 Float taxonMeasNumerValue, 238 Float taxonMeasPrecisionValue, 239 Integer taxonMeasDigitNumber, 240 Date taxonMeasControlDt, 241 Date taxonMeasValidDt, 242 Date taxonMeasQualifDt, 243 String taxonMeasQualifCm, 244 String taxonMeasCm, 245 Timestamp updateDt, 246 Integer taxonNameId, 247 String taxonNameNm, 248 Integer remoteId); 249 250 /** 251 * <p> 252 * Does the same thing as {@link #create(Integer, Integer, Float, Float, Integer, Date, Date, Date, String, String, Timestamp, Integer, String, Integer)} with an 253 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 254 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 255 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 256 * transform the entity (into a value object for example). By default, transformation does 257 * not occur. 258 * </p> 259 * @param transform 260 * @param objectId Identifiant interne de donnnée in situ de référence (passage, prélèvement, prélèvement) 261 * @param taxonMeasIndivId Le numéro de l'individu mesuré pour les résultats sur taxon ayant plusieurs individus 262 * @param taxonMeasNumerValue La valeur du résultat si elle n'est pas qualitative 263 * @param taxonMeasPrecisionValue La valeur de l'incertitude. Ex : 2 (%) ou 0,01 (dégrés) 264 * @param taxonMeasDigitNumber Nombre de chiffre après la virgule du résulat. Ex : si on saisit 10.00, il faut conserver 2 comme 265 information 266 * @param taxonMeasControlDt Date de contrôle 267 * @param taxonMeasValidDt Date de validation 268 * @param taxonMeasQualifDt Date de la qualification du résultat 269 * @param taxonMeasQualifCm Commentaire sur la qualification du résultat 270 Un commentaire de qualification est obligatoire si la mesure est douteuse ou mauvaise. 271 * @param taxonMeasCm Commentaire sur le résultat sur taxon 272 * @param updateDt Date de modification de l'objet, mise à jour par le système 273 * @param taxonNameId Identifiant interne du taxon cité (Utilisé par BD Recif pour stocker l'identifiant du taxon saisi 274 par l'utilisateur) 275 * @param taxonNameNm Nom scientifique du taxon cité (Utilisé par BD Recif pour stocker le libellé du taxon saisi par 276 l'utilisateur) 277 * @param remoteId 278 * @return TaxonMeasurement 279 */ 280 public Object create( 281 int transform, 282 Integer objectId, 283 Integer taxonMeasIndivId, 284 Float taxonMeasNumerValue, 285 Float taxonMeasPrecisionValue, 286 Integer taxonMeasDigitNumber, 287 Date taxonMeasControlDt, 288 Date taxonMeasValidDt, 289 Date taxonMeasQualifDt, 290 String taxonMeasQualifCm, 291 String taxonMeasCm, 292 Timestamp updateDt, 293 Integer taxonNameId, 294 String taxonNameNm, 295 Integer remoteId); 296 297 /** 298 * <p> 299 * Creates a new <code>TaxonMeasurement</code> 300 * instance from only <strong>required</strong> properties (attributes 301 * and association ends) and adds it to the persistent store. 302 * </p> 303 * @param objectId 304 * @param objectType 305 * @param pmfm 306 * @param qualityFlag 307 * @return TaxonMeasurement 308 */ 309 public TaxonMeasurement create( 310 Integer objectId, 311 ObjectType objectType, 312 Pmfm pmfm, 313 QualityFlag qualityFlag); 314 315 /** 316 * <p> 317 * Does the same thing as {@link #create(Integer)} with an 318 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 319 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 320 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 321 * transform the entity (into a value object for example). By default, transformation does 322 * not occur. 323 * </p> 324 * @param transform flag to determine transformation type. 325 * @param objectId 326 * @param objectType 327 * @param pmfm 328 * @param qualityFlag 329 * @return Object 330 */ 331 public Object create( 332 int transform, 333 Integer objectId, 334 ObjectType objectType, 335 Pmfm pmfm, 336 QualityFlag qualityFlag); 337 338 /** 339 * Updates the <code>taxonMeasurement</code> instance in the persistent store. 340 * @param taxonMeasurement 341 */ 342 public void update(TaxonMeasurement taxonMeasurement); 343 344 /** 345 * Updates all instances in the <code>entities</code> collection in the persistent store. 346 * @param entities 347 */ 348 public void update(Collection<TaxonMeasurement> entities); 349 350 /** 351 * Removes the instance of TaxonMeasurement from the persistent store. 352 * @param taxonMeasurement 353 */ 354 public void remove(TaxonMeasurement taxonMeasurement); 355 356 /** 357 * Removes the instance of TaxonMeasurement having the given 358 * <code>identifier</code> from the persistent store. 359 * @param taxonMeasId 360 */ 361 public void remove(Integer taxonMeasId); 362 363 /** 364 * Removes all entities in the given <code>entities</code> collection. 365 * @param entities 366 */ 367 public void remove(Collection<TaxonMeasurement> entities); 368 369 370 /** 371 * Does the same thing as {@link #search(int, Search)} but with an 372 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 373 * limit your data to a specified page number and size. 374 * 375 * @param transform the transformation flag. 376 * @param pageNumber the page number in the data to retrieve 377 * @param pageSize the size of the page to retrieve. 378 * @param search the search object which provides the search parameters and pagination specification. 379 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 380 */ 381 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 382 383 /** 384 * Does the same thing as {@link #search(Search)} but with an 385 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 386 * limit your data to a specified page number and size. 387 * 388 * @param pageNumber the page number in the data to retrieve 389 * @param pageSize the size of the page to retrieve. 390 * @param search the search object which provides the search parameters and pagination specification. 391 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 392 */ 393 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 394 395 /** 396 * Does the same thing as {@link #search(Search)} but with an 397 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 398 * finder results will <strong>NOT</strong> be transformed during retrieval. 399 * If this flag is any of the other constants defined here 400 * then results <strong>WILL BE</strong> passed through an operation which can optionally 401 * transform the entities (into value objects for example). By default, transformation does 402 * not occur. 403 * 404 * @param transform the transformation flag. 405 * @param search the search object which provides the search parameters and pagination specification. 406 * @return any found results from the search. 407 */ 408 public Set<?> search(final int transform, final Search search); 409 410 /** 411 * Performs a search using the parameters specified in the given <code>search</code> object. 412 * 413 * @param search the search object which provides the search parameters and pagination specification. 414 * @return any found results from the search. 415 */ 416 public Set<TaxonMeasurement> search(final Search search); 417 418 /** 419 * Allows transformation of entities into value objects 420 * (or something else for that matter), when the <code>transform</code> 421 * flag is set to one of the constants defined in <code>fr.ifremer.quadrige3.core.dao.data.measurement.TaxonMeasurementDao</code>, please note 422 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 423 * will be returned. 424 * 425 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 426 * 427 * @param transform one of the constants declared in {@link fr.ifremer.quadrige3.core.dao.data.measurement.TaxonMeasurementDao} 428 * @param entity an entity that was found 429 * @return the transformed entity (i.e. new value object, etc) 430 * @see #transformEntities(int,Collection) 431 */ 432 public Object transformEntity(final int transform, final TaxonMeasurement entity); 433 434 /** 435 * Transforms a collection of entities using the 436 * {@link #transformEntity(int,TaxonMeasurement)} 437 * method. This method does not instantiate a new collection. 438 * <p> 439 * This method is to be used internally only. 440 * 441 * @param transform one of the constants declared in <code>fr.ifremer.quadrige3.core.dao.data.measurement.TaxonMeasurementDao</code> 442 * @param entities the collection of entities to transform 443 * @see #transformEntity(int,TaxonMeasurement) 444 */ 445 public void transformEntities(final int transform, final Collection<?> entities); 446 447 // spring-dao merge-point 448 }