001// license-header java merge-point 002// 003// Attention: Generated code! Do not modify by hand! 004// Generated by: SpringDao.vsl in andromda-spring-cartridge. 005// 006package fr.ifremer.adagio.core.dao.data.measure; 007 008/* 009 * #%L 010 * SIH-Adagio :: Core 011 * $Id:$ 012 * $HeadURL:$ 013 * %% 014 * Copyright (C) 2012 - 2014 Ifremer 015 * %% 016 * This program is free software: you can redistribute it and/or modify 017 * it under the terms of the GNU Affero General Public License as published by 018 * the Free Software Foundation, either version 3 of the License, or 019 * (at your option) any later version. 020 * 021 * This program is distributed in the hope that it will be useful, 022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 024 * GNU General Public License for more details. 025 * 026 * You should have received a copy of the GNU Affero General Public License 027 * along with this program. If not, see <http://www.gnu.org/licenses/>. 028 * #L% 029 */ 030 031import fr.ifremer.adagio.core.dao.Search; 032import fr.ifremer.adagio.core.dao.data.batch.Batch; 033import fr.ifremer.adagio.core.dao.referential.QualityFlag; 034import fr.ifremer.adagio.core.dao.referential.pmfm.Pmfm; 035import java.util.Collection; 036import java.util.Date; 037import java.util.Set; 038import org.andromda.spring.PaginationResult; 039 040/** 041 * Résultat de mesure de quantification d'un lot. 042 * Les mesures de quantification portent sur le paramètre "Poids". Elle peuvent être obtenue par 043 * différentes méthodes : 044 * - mesuré (ex : par une règle ou Ichtyomètre), 045 * - estimé (ex : jugement par un expert), 046 * - calculé par une relation taille/poids 047 * - calculé à partir de volumes (nombre d'unité de volume x Poids d'une unité de volume). Il s'agit 048 * donc d'un poids estimé, mais par le volume. 049 * - déclaré (cf SACROIS/RIC2) 050 * @see QuantificationMeasurement 051 */ 052public interface QuantificationMeasurementDao 053{ 054 /** 055 * This constant is used as a transformation flag; entities can be converted automatically into value objects 056 * or other types, different methods in a class implementing this interface support this feature: look for 057 * an <code>int</code> parameter called <code>transform</code>. 058 * <p> 059 * This specific flag denotes no transformation will occur. 060 */ 061 public static final int TRANSFORM_NONE = 0; 062 063 064 /** 065 * Transforms the given results to a collection of {@link QuantificationMeasurement} 066 * instances (this is useful when the returned results contains a row of data and you want just entities only). 067 * 068 * @param results the query results. 069 */ 070 public void toEntities(final Collection<?> results); 071 072 /** 073 * Gets an instance of QuantificationMeasurement from the persistent store. 074 * @param id 075 * @return QuantificationMeasurement 076 */ 077 public QuantificationMeasurement get(Integer id); 078 079 /** 080 * <p> 081 * Does the same thing as {@link #get(Integer)} with an 082 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 083 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 084 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 085 * optionally transform the entity (into a value object for example). By default, transformation does 086 * not occur. 087 * </p> 088 * 089 * @param transform flag to determine transformation type. 090 * @param id the identifier of the entity to get. 091 * @return either the entity or the object transformed from the entity. 092 */ 093 public Object get(int transform, Integer id); 094 095 /** 096 * Loads an instance of QuantificationMeasurement from the persistent store. 097 * @param id 098 * @return QuantificationMeasurement 099 */ 100 public QuantificationMeasurement load(Integer id); 101 102 /** 103 * <p> 104 * Does the same thing as {@link #load(Integer)} with an 105 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 106 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 107 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 108 * optionally transform the entity (into a value object for example). By default, transformation does 109 * not occur. 110 * </p> 111 * 112 * @param transform flag to determine transformation type. 113 * @param id the identifier of the entity to load. 114 * @return either the entity or the object transformed from the entity. 115 */ 116 public Object load(int transform, Integer id); 117 118 /** 119 * Loads all entities of type {@link QuantificationMeasurement}. 120 * 121 * @return the loaded entities. 122 */ 123 public Collection<QuantificationMeasurement> loadAll(); 124 125 /** 126 * <p> 127 * Does the same thing as {@link #loadAll()} with an 128 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 129 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 130 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 131 * transform the entity (into a value object for example). By default, transformation does 132 * not occur. 133 * </p> 134 * 135 * @param transform the flag indicating what transformation to use. 136 * @return the loaded entities. 137 */ 138 public Collection<?> loadAll(final int transform); 139 140 /** 141 * <p> 142 * Does the same thing as {@link #loadAll()} with an 143 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 144 * 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 145 * page retrieved. 146 * </p> 147 * 148 * @param pageNumber the page number to retrieve when paging results. 149 * @param pageSize the size of the page to retrieve when paging results. 150 * @return the loaded entities. 151 */ 152 public Collection<?> loadAll(final int pageNumber, final int pageSize); 153 154 /** 155 * <p> 156 * Does the same thing as {@link #loadAll(int)} with an 157 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 158 * 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 159 * page retrieved. 160 * </p> 161 * 162 * @param transform the flag indicating what transformation to use. 163 * @param pageNumber the page number to retrieve when paging results. 164 * @param pageSize the size of the page to retrieve when paging results. 165 * @return the loaded entities. 166 */ 167 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 168 169 /** 170 * Creates an instance of QuantificationMeasurement and adds it to the persistent store. 171 * @param quantificationMeasurement 172 * @return QuantificationMeasurement 173 */ 174 public QuantificationMeasurement create(QuantificationMeasurement quantificationMeasurement); 175 176 /** 177 * <p> 178 * Does the same thing as {@link #create(QuantificationMeasurement)} with an 179 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 180 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 181 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 182 * transform the entity (into a value object for example). By default, transformation does 183 * not occur. 184 * </p> 185 * @param transform 186 * @param quantificationMeasurement 187 * @return Object 188 */ 189 public Object create(int transform, QuantificationMeasurement quantificationMeasurement); 190 191 /** 192 * Creates a new instance of QuantificationMeasurement and adds 193 * from the passed in <code>entities</code> collection 194 * 195 * @param entities the collection of QuantificationMeasurement 196 * instances to create. 197 * 198 * @return the created instances. 199 */ 200 public Collection<QuantificationMeasurement> create(Collection<QuantificationMeasurement> entities); 201 202 /** 203 * <p> 204 * Does the same thing as {@link #create(QuantificationMeasurement)} with an 205 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 206 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 207 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 208 * transform the entities (into value objects for example). By default, transformation does 209 * not occur. 210 * </p> 211 * @param transform 212 * @param entities 213 * @return Collection 214 */ 215 public Collection<?> create(int transform, Collection<QuantificationMeasurement> entities); 216 217 /** 218 * <p> 219 * Creates a new <code>QuantificationMeasurement</code> 220 * instance from <strong>all</strong> attributes and adds it to 221 * the persistent store. 222 * </p> 223 * @param subgroupNumber Numéro du sous ensemble sur lequel porte la mesure de quantification. Si non renseigné, le mesure 224porte sur tout le lot rattaché.Une quantification d'un lot peut faire intervenir plusieurs 225sous-ensemble sur lequel des mesures sont éffectuées. Par exemple, plusieurs sous-ensembles peuvent 226être quantifié par pesée, chaque mesure est donc rattaché à un sous-ensemmble, via le numéro de sous 227ensemble. 228 * @param isReferenceQuantification S'agit t il de la mesure de référence pour la quantification du lot ? Par défaut, le poids calculé 229(par relation taille/poids) est le poids de référence. 230Doit etre NULL si subgroupNumber est NULL (un poids de référence ne peut pas porter sur une 231sous-ensemble du lot , mais sur tout le lot) 232 * @param numericalValue <html> 233<head> 234<title>V </title> 235</head> 236<body> 237valeur numérique de la mesure.<br>Elle est nécessairement exprimée 238dans l'unité associé au PSFM de la mesure. 239<br> 240Renseigné uniquement pour un PSFM numérique 241(PMFM.parameter.isQualitative=false) 242</body> 243</html> 244 * @param alphanumericalValue <html> 245<head> 246</head> 247<body> 248<p> 249Valeur alphanumérique de la mesure. 250<br> </p> 251<p> 252<br> 253<u>Attention :</u> <b>Utilisation à éviter</b>. A utiliser 254uniquement dans des cas ou les valeurs qualitatives ne peuvent pas 255convenir (format non fixe, etc.). 256</p> 257<p> 258</p> 259<p> 260Exemples :<br>* Numéros de contrat (Ventre ERS)<br>* Type de 261dimension d'engin (logbook - flux SACAPT) "2X60", "2x6 dragues 75", 262"13.9x2", "2x7m²", "2x17.50", "2m x 2", etc 263</p> 264</body> 265</html> 266 * @param digitCount <html> 267<head> 268</head> 269<body> 270<p> 271Nombre de digits saisis dans la valeur numérique de la mesure. 272</p> 273<p> 274</p> 275<p> 276Cela permet de stocker "10.00" (numericalvalue=10 et digitCount=2) et de 277pouvoir restituer la valeur sous la meme forme. 278</p> 279</body> 280</html> 281 * @param precisionValue <html> 282<head> 283</head> 284<body> 285<p> 286Précision de la mesure. Par exemple : precisioNValue=0.5 pour indiquer 287une précision à + ou - "0.5". 288<br> </p> 289<p> 290</p> 291<p> 292Valeur exprimée soit dans l'unite de la mesure (ex : "mm"), soit en 293poucentage de la mesure (suivant la valeur de <i>PrecisionType</i>). 294</p> 295</body> 296</html> 297 * @param controlDate Date du controle de la donnée. 298Le controle est la première phase de validation de la donnée. 299Exemple : 300- Dans Allegro, ce controle est effectué lorsque l'utilisateur a achevé sa saisie et qu'il souhaite 301"Terminer la saisie", dans le but de transmettre ses données au système centrale. Les controle 302effectué par Allegro sur le poste client sont des vérifications sur les champs obligatoires, ou 303encore sur la cohérence des données (cas d'un arbre d'échantillonnage). 304 * @param validationDate Date de validation de la donnée. 305La validation est typiquement effectué par un thématicien responsable des données. Dans Allegro, il 306s'agit du superviseur du portefeuille de données qui en est responsable. 307 * @param qualificationDate Date de qualification de la donnée. 308L'étape de qualification est liée à l'affectation d'un flag qualité (bon, mauvais, etc.) sur la 309donnée. 310- la qualification n'est pas encore gérée dans Allegro, dans le sens ou il n'existe pass encore 311d'interface pour affecter le flag qualité. Par défaut, le niveau de qualité est donc à "non 312qualifiée" 313 * @param qualificationComments 314 * @return QuantificationMeasurement 315 */ 316 public QuantificationMeasurement create( 317 Short subgroupNumber, 318 Boolean isReferenceQuantification, 319 Float numericalValue, 320 String alphanumericalValue, 321 Integer digitCount, 322 Float precisionValue, 323 Date controlDate, 324 Date validationDate, 325 Date qualificationDate, 326 String qualificationComments); 327 328 /** 329 * <p> 330 * Does the same thing as {@link #create(Short, Boolean, Float, String, Integer, Float, Date, Date, Date, String)} with an 331 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 332 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 333 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 334 * transform the entity (into a value object for example). By default, transformation does 335 * not occur. 336 * </p> 337 * @param transform 338 * @param subgroupNumber Numéro du sous ensemble sur lequel porte la mesure de quantification. Si non renseigné, le mesure 339porte sur tout le lot rattaché.Une quantification d'un lot peut faire intervenir plusieurs 340sous-ensemble sur lequel des mesures sont éffectuées. Par exemple, plusieurs sous-ensembles peuvent 341être quantifié par pesée, chaque mesure est donc rattaché à un sous-ensemmble, via le numéro de sous 342ensemble. 343 * @param isReferenceQuantification S'agit t il de la mesure de référence pour la quantification du lot ? Par défaut, le poids calculé 344(par relation taille/poids) est le poids de référence. 345Doit etre NULL si subgroupNumber est NULL (un poids de référence ne peut pas porter sur une 346sous-ensemble du lot , mais sur tout le lot) 347 * @param numericalValue <html> 348<head> 349<title>V </title> 350</head> 351<body> 352valeur numérique de la mesure.<br>Elle est nécessairement exprimée 353dans l'unité associé au PSFM de la mesure. 354<br> 355Renseigné uniquement pour un PSFM numérique 356(PMFM.parameter.isQualitative=false) 357</body> 358</html> 359 * @param alphanumericalValue <html> 360<head> 361</head> 362<body> 363<p> 364Valeur alphanumérique de la mesure. 365<br> </p> 366<p> 367<br> 368<u>Attention :</u> <b>Utilisation à éviter</b>. A utiliser 369uniquement dans des cas ou les valeurs qualitatives ne peuvent pas 370convenir (format non fixe, etc.). 371</p> 372<p> 373</p> 374<p> 375Exemples :<br>* Numéros de contrat (Ventre ERS)<br>* Type de 376dimension d'engin (logbook - flux SACAPT) "2X60", "2x6 dragues 75", 377"13.9x2", "2x7m²", "2x17.50", "2m x 2", etc 378</p> 379</body> 380</html> 381 * @param digitCount <html> 382<head> 383</head> 384<body> 385<p> 386Nombre de digits saisis dans la valeur numérique de la mesure. 387</p> 388<p> 389</p> 390<p> 391Cela permet de stocker "10.00" (numericalvalue=10 et digitCount=2) et de 392pouvoir restituer la valeur sous la meme forme. 393</p> 394</body> 395</html> 396 * @param precisionValue <html> 397<head> 398</head> 399<body> 400<p> 401Précision de la mesure. Par exemple : precisioNValue=0.5 pour indiquer 402une précision à + ou - "0.5". 403<br> </p> 404<p> 405</p> 406<p> 407Valeur exprimée soit dans l'unite de la mesure (ex : "mm"), soit en 408poucentage de la mesure (suivant la valeur de <i>PrecisionType</i>). 409</p> 410</body> 411</html> 412 * @param controlDate Date du controle de la donnée. 413Le controle est la première phase de validation de la donnée. 414Exemple : 415- Dans Allegro, ce controle est effectué lorsque l'utilisateur a achevé sa saisie et qu'il souhaite 416"Terminer la saisie", dans le but de transmettre ses données au système centrale. Les controle 417effectué par Allegro sur le poste client sont des vérifications sur les champs obligatoires, ou 418encore sur la cohérence des données (cas d'un arbre d'échantillonnage). 419 * @param validationDate Date de validation de la donnée. 420La validation est typiquement effectué par un thématicien responsable des données. Dans Allegro, il 421s'agit du superviseur du portefeuille de données qui en est responsable. 422 * @param qualificationDate Date de qualification de la donnée. 423L'étape de qualification est liée à l'affectation d'un flag qualité (bon, mauvais, etc.) sur la 424donnée. 425- la qualification n'est pas encore gérée dans Allegro, dans le sens ou il n'existe pass encore 426d'interface pour affecter le flag qualité. Par défaut, le niveau de qualité est donc à "non 427qualifiée" 428 * @param qualificationComments 429 * @return QuantificationMeasurement 430 */ 431 public Object create( 432 int transform, 433 Short subgroupNumber, 434 Boolean isReferenceQuantification, 435 Float numericalValue, 436 String alphanumericalValue, 437 Integer digitCount, 438 Float precisionValue, 439 Date controlDate, 440 Date validationDate, 441 Date qualificationDate, 442 String qualificationComments); 443 444 /** 445 * <p> 446 * Creates a new <code>QuantificationMeasurement</code> 447 * instance from only <strong>required</strong> properties (attributes 448 * and association ends) and adds it to the persistent store. 449 * </p> 450 * @param pmfm 451 * @param qualityFlag 452 * @param batch 453 * @return QuantificationMeasurement 454 */ 455 public QuantificationMeasurement create( 456 Pmfm pmfm, 457 QualityFlag qualityFlag, 458 Batch batch); 459 460 /** 461 * <p> 462 * Does the same thing as {@link #create()} with an 463 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 464 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 465 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 466 * transform the entity (into a value object for example). By default, transformation does 467 * not occur. 468 * </p> 469 * @param transform flag to determine transformation type. 470 * @param pmfm 471 * @param qualityFlag 472 * @param batch 473 * @return Object 474 */ 475 public Object create( 476 int transform, 477 Pmfm pmfm, 478 QualityFlag qualityFlag, 479 Batch batch); 480 481 /** 482 * Updates the <code>quantificationMeasurement</code> instance in the persistent store. 483 * @param quantificationMeasurement 484 */ 485 public void update(QuantificationMeasurement quantificationMeasurement); 486 487 /** 488 * Updates all instances in the <code>entities</code> collection in the persistent store. 489 * @param entities 490 */ 491 public void update(Collection<QuantificationMeasurement> entities); 492 493 /** 494 * Removes the instance of QuantificationMeasurement from the persistent store. 495 * @param quantificationMeasurement 496 */ 497 public void remove(QuantificationMeasurement quantificationMeasurement); 498 499 /** 500 * Removes the instance of QuantificationMeasurement having the given 501 * <code>identifier</code> from the persistent store. 502 * @param id 503 */ 504 public void remove(Integer id); 505 506 /** 507 * Removes all entities in the given <code>entities</code> collection. 508 * @param entities 509 */ 510 public void remove(Collection<QuantificationMeasurement> entities); 511 512 513 /** 514 * Does the same thing as {@link #search(int, Search)} but with an 515 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 516 * limit your data to a specified page number and size. 517 * 518 * @param transform the transformation flag. 519 * @param pageNumber the page number in the data to retrieve 520 * @param pageSize the size of the page to retrieve. 521 * @param search the search object which provides the search parameters and pagination specification. 522 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 523 */ 524 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 525 526 /** 527 * Does the same thing as {@link #search(Search)} but with an 528 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 529 * limit your data to a specified page number and size. 530 * 531 * @param pageNumber the page number in the data to retrieve 532 * @param pageSize the size of the page to retrieve. 533 * @param search the search object which provides the search parameters and pagination specification. 534 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 535 */ 536 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 537 538 /** 539 * Does the same thing as {@link #search(Search)} but with an 540 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 541 * finder results will <strong>NOT</strong> be transformed during retrieval. 542 * If this flag is any of the other constants defined here 543 * then results <strong>WILL BE</strong> passed through an operation which can optionally 544 * transform the entities (into value objects for example). By default, transformation does 545 * not occur. 546 * 547 * @param transform the transformation flag. 548 * @param search the search object which provides the search parameters and pagination specification. 549 * @return any found results from the search. 550 */ 551 public Set<?> search(final int transform, final Search search); 552 553 /** 554 * Performs a search using the parameters specified in the given <code>search</code> object. 555 * 556 * @param search the search object which provides the search parameters and pagination specification. 557 * @return any found results from the search. 558 */ 559 public Set<QuantificationMeasurement> search(final Search search); 560 561 /** 562 * Allows transformation of entities into value objects 563 * (or something else for that matter), when the <code>transform</code> 564 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.data.measure.QuantificationMeasurementDao</code>, please note 565 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 566 * will be returned. 567 * 568 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 569 * 570 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.data.measure.QuantificationMeasurementDao} 571 * @param entity an entity that was found 572 * @return the transformed entity (i.e. new value object, etc) 573 * @see #transformEntities(int,Collection) 574 */ 575 public Object transformEntity(final int transform, final QuantificationMeasurement entity); 576 577 /** 578 * Transforms a collection of entities using the 579 * {@link #transformEntity(int,QuantificationMeasurement)} 580 * method. This method does not instantiate a new collection. 581 * <p> 582 * This method is to be used internally only. 583 * 584 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.data.measure.QuantificationMeasurementDao</code> 585 * @param entities the collection of entities to transform 586 * @see #transformEntity(int,QuantificationMeasurement) 587 */ 588 public void transformEntities(final int transform, final Collection<?> entities); 589 590 // spring-dao merge-point 591}