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.referential.QualityFlag; 033import fr.ifremer.adagio.core.dao.referential.pmfm.Pmfm; 034import java.util.Collection; 035import java.util.Date; 036import java.util.Set; 037import org.andromda.spring.PaginationResult; 038 039/** 040 * 041 * @see SurveyMeasurement 042 */ 043public interface SurveyMeasurementDao 044{ 045 /** 046 * This constant is used as a transformation flag; entities can be converted automatically into value objects 047 * or other types, different methods in a class implementing this interface support this feature: look for 048 * an <code>int</code> parameter called <code>transform</code>. 049 * <p> 050 * This specific flag denotes no transformation will occur. 051 */ 052 public static final int TRANSFORM_NONE = 0; 053 054 055 /** 056 * Transforms the given results to a collection of {@link SurveyMeasurement} 057 * instances (this is useful when the returned results contains a row of data and you want just entities only). 058 * 059 * @param results the query results. 060 */ 061 public void toEntities(final Collection<?> results); 062 063 /** 064 * Gets an instance of SurveyMeasurement from the persistent store. 065 * @param id 066 * @return SurveyMeasurement 067 */ 068 public SurveyMeasurement get(Integer id); 069 070 /** 071 * <p> 072 * Does the same thing as {@link #get(Integer)} with an 073 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 074 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 075 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 076 * optionally transform the entity (into a value object for example). By default, transformation does 077 * not occur. 078 * </p> 079 * 080 * @param transform flag to determine transformation type. 081 * @param id the identifier of the entity to get. 082 * @return either the entity or the object transformed from the entity. 083 */ 084 public Object get(int transform, Integer id); 085 086 /** 087 * Loads an instance of SurveyMeasurement from the persistent store. 088 * @param id 089 * @return SurveyMeasurement 090 */ 091 public SurveyMeasurement load(Integer id); 092 093 /** 094 * <p> 095 * Does the same thing as {@link #load(Integer)} with an 096 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 097 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 098 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 099 * 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 id 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 id); 108 109 /** 110 * Loads all entities of type {@link SurveyMeasurement}. 111 * 112 * @return the loaded entities. 113 */ 114 public Collection<SurveyMeasurement> 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 SurveyMeasurement and adds it to the persistent store. 162 * @param surveyMeasurement 163 * @return SurveyMeasurement 164 */ 165 public SurveyMeasurement create(SurveyMeasurement surveyMeasurement); 166 167 /** 168 * <p> 169 * Does the same thing as {@link #create(SurveyMeasurement)} 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 surveyMeasurement 178 * @return Object 179 */ 180 public Object create(int transform, SurveyMeasurement surveyMeasurement); 181 182 /** 183 * Creates a new instance of SurveyMeasurement and adds 184 * from the passed in <code>entities</code> collection 185 * 186 * @param entities the collection of SurveyMeasurement 187 * instances to create. 188 * 189 * @return the created instances. 190 */ 191 public Collection<SurveyMeasurement> create(Collection<SurveyMeasurement> entities); 192 193 /** 194 * <p> 195 * Does the same thing as {@link #create(SurveyMeasurement)} 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<SurveyMeasurement> entities); 207 208 /** 209 * <p> 210 * Creates a new <code>SurveyMeasurement</code> 211 * instance from <strong>all</strong> attributes and adds it to 212 * the persistent store. 213 * </p> 214 * @param numericalValue <html> 215<head> 216<title>V </title> 217</head> 218<body> 219valeur numérique de la mesure.<br>Elle est nécessairement exprimée 220dans l'unité associé au PSFM de la mesure. 221<br> 222Renseigné uniquement pour un PSFM numérique 223(PMFM.parameter.isQualitative=false) 224</body> 225</html> 226 * @param alphanumericalValue <html> 227<head> 228</head> 229<body> 230<p> 231Valeur alphanumérique de la mesure. 232<br> </p> 233<p> 234<br> 235<u>Attention :</u> <b>Utilisation à éviter</b>. A utiliser 236uniquement dans des cas ou les valeurs qualitatives ne peuvent pas 237convenir (format non fixe, etc.). 238</p> 239<p> 240</p> 241<p> 242Exemples :<br>* Numéros de contrat (Ventre ERS)<br>* Type de 243dimension d'engin (logbook - flux SACAPT) "2X60", "2x6 dragues 75", 244"13.9x2", "2x7m²", "2x17.50", "2m x 2", etc 245</p> 246</body> 247</html> 248 * @param digitCount <html> 249<head> 250</head> 251<body> 252<p> 253Nombre de digits saisis dans la valeur numérique de la mesure. 254</p> 255<p> 256</p> 257<p> 258Cela permet de stocker "10.00" (numericalvalue=10 et digitCount=2) et de 259pouvoir restituer la valeur sous la meme forme. 260</p> 261</body> 262</html> 263 * @param precisionValue <html> 264<head> 265</head> 266<body> 267<p> 268Précision de la mesure. Par exemple : precisioNValue=0.5 pour indiquer 269une précision à + ou - "0.5". 270<br> </p> 271<p> 272</p> 273<p> 274Valeur exprimée soit dans l'unite de la mesure (ex : "mm"), soit en 275poucentage de la mesure (suivant la valeur de <i>PrecisionType</i>). 276</p> 277</body> 278</html> 279 * @param controlDate Date du controle de la donnée. 280Le controle est la première phase de validation de la donnée. 281Exemple : 282- Dans Allegro, ce controle est effectué lorsque l'utilisateur a achevé sa saisie et qu'il souhaite 283"Terminer la saisie", dans le but de transmettre ses données au système centrale. Les controle 284effectué par Allegro sur le poste client sont des vérifications sur les champs obligatoires, ou 285encore sur la cohérence des données (cas d'un arbre d'échantillonnage). 286 * @param validationDate Date de validation de la donnée. 287La validation est typiquement effectué par un thématicien responsable des données. Dans Allegro, il 288s'agit du superviseur du portefeuille de données qui en est responsable. 289 * @param qualificationDate Date de qualification de la donnée. 290L'étape de qualification est liée à l'affectation d'un flag qualité (bon, mauvais, etc.) sur la 291donnée. 292- la qualification n'est pas encore gérée dans Allegro, dans le sens ou il n'existe pass encore 293d'interface pour affecter le flag qualité. Par défaut, le niveau de qualité est donc à "non 294qualifiée" 295 * @param qualificationComments 296 * @return SurveyMeasurement 297 */ 298 public SurveyMeasurement create( 299 Float numericalValue, 300 String alphanumericalValue, 301 Integer digitCount, 302 Float precisionValue, 303 Date controlDate, 304 Date validationDate, 305 Date qualificationDate, 306 String qualificationComments); 307 308 /** 309 * <p> 310 * Does the same thing as {@link #create(Float, String, Integer, Float, Date, Date, Date, String)} with an 311 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 312 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 313 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 314 * transform the entity (into a value object for example). By default, transformation does 315 * not occur. 316 * </p> 317 * @param transform 318 * @param numericalValue <html> 319<head> 320<title>V </title> 321</head> 322<body> 323valeur numérique de la mesure.<br>Elle est nécessairement exprimée 324dans l'unité associé au PSFM de la mesure. 325<br> 326Renseigné uniquement pour un PSFM numérique 327(PMFM.parameter.isQualitative=false) 328</body> 329</html> 330 * @param alphanumericalValue <html> 331<head> 332</head> 333<body> 334<p> 335Valeur alphanumérique de la mesure. 336<br> </p> 337<p> 338<br> 339<u>Attention :</u> <b>Utilisation à éviter</b>. A utiliser 340uniquement dans des cas ou les valeurs qualitatives ne peuvent pas 341convenir (format non fixe, etc.). 342</p> 343<p> 344</p> 345<p> 346Exemples :<br>* Numéros de contrat (Ventre ERS)<br>* Type de 347dimension d'engin (logbook - flux SACAPT) "2X60", "2x6 dragues 75", 348"13.9x2", "2x7m²", "2x17.50", "2m x 2", etc 349</p> 350</body> 351</html> 352 * @param digitCount <html> 353<head> 354</head> 355<body> 356<p> 357Nombre de digits saisis dans la valeur numérique de la mesure. 358</p> 359<p> 360</p> 361<p> 362Cela permet de stocker "10.00" (numericalvalue=10 et digitCount=2) et de 363pouvoir restituer la valeur sous la meme forme. 364</p> 365</body> 366</html> 367 * @param precisionValue <html> 368<head> 369</head> 370<body> 371<p> 372Précision de la mesure. Par exemple : precisioNValue=0.5 pour indiquer 373une précision à + ou - "0.5". 374<br> </p> 375<p> 376</p> 377<p> 378Valeur exprimée soit dans l'unite de la mesure (ex : "mm"), soit en 379poucentage de la mesure (suivant la valeur de <i>PrecisionType</i>). 380</p> 381</body> 382</html> 383 * @param controlDate Date du controle de la donnée. 384Le controle est la première phase de validation de la donnée. 385Exemple : 386- Dans Allegro, ce controle est effectué lorsque l'utilisateur a achevé sa saisie et qu'il souhaite 387"Terminer la saisie", dans le but de transmettre ses données au système centrale. Les controle 388effectué par Allegro sur le poste client sont des vérifications sur les champs obligatoires, ou 389encore sur la cohérence des données (cas d'un arbre d'échantillonnage). 390 * @param validationDate Date de validation de la donnée. 391La validation est typiquement effectué par un thématicien responsable des données. Dans Allegro, il 392s'agit du superviseur du portefeuille de données qui en est responsable. 393 * @param qualificationDate Date de qualification de la donnée. 394L'étape de qualification est liée à l'affectation d'un flag qualité (bon, mauvais, etc.) sur la 395donnée. 396- la qualification n'est pas encore gérée dans Allegro, dans le sens ou il n'existe pass encore 397d'interface pour affecter le flag qualité. Par défaut, le niveau de qualité est donc à "non 398qualifiée" 399 * @param qualificationComments 400 * @return SurveyMeasurement 401 */ 402 public Object create( 403 int transform, 404 Float numericalValue, 405 String alphanumericalValue, 406 Integer digitCount, 407 Float precisionValue, 408 Date controlDate, 409 Date validationDate, 410 Date qualificationDate, 411 String qualificationComments); 412 413 /** 414 * <p> 415 * Creates a new <code>SurveyMeasurement</code> 416 * instance from only <strong>required</strong> properties (attributes 417 * and association ends) and adds it to the persistent store. 418 * </p> 419 * @param pmfm 420 * @param qualityFlag 421 * @return SurveyMeasurement 422 */ 423 public SurveyMeasurement create( 424 Pmfm pmfm, 425 QualityFlag qualityFlag); 426 427 /** 428 * <p> 429 * Does the same thing as {@link #create()} with an 430 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 431 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 432 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 433 * transform the entity (into a value object for example). By default, transformation does 434 * not occur. 435 * </p> 436 * @param transform flag to determine transformation type. 437 * @param pmfm 438 * @param qualityFlag 439 * @return Object 440 */ 441 public Object create( 442 int transform, 443 Pmfm pmfm, 444 QualityFlag qualityFlag); 445 446 /** 447 * Updates the <code>surveyMeasurement</code> instance in the persistent store. 448 * @param surveyMeasurement 449 */ 450 public void update(SurveyMeasurement surveyMeasurement); 451 452 /** 453 * Updates all instances in the <code>entities</code> collection in the persistent store. 454 * @param entities 455 */ 456 public void update(Collection<SurveyMeasurement> entities); 457 458 /** 459 * Removes the instance of SurveyMeasurement from the persistent store. 460 * @param surveyMeasurement 461 */ 462 public void remove(SurveyMeasurement surveyMeasurement); 463 464 /** 465 * Removes the instance of SurveyMeasurement having the given 466 * <code>identifier</code> from the persistent store. 467 * @param id 468 */ 469 public void remove(Integer id); 470 471 /** 472 * Removes all entities in the given <code>entities</code> collection. 473 * @param entities 474 */ 475 public void remove(Collection<SurveyMeasurement> entities); 476 477 478 /** 479 * Does the same thing as {@link #search(int, Search)} but with an 480 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 481 * limit your data to a specified page number and size. 482 * 483 * @param transform the transformation flag. 484 * @param pageNumber the page number in the data to retrieve 485 * @param pageSize the size of the page to retrieve. 486 * @param search the search object which provides the search parameters and pagination specification. 487 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 488 */ 489 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 490 491 /** 492 * Does the same thing as {@link #search(Search)} but with an 493 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 494 * limit your data to a specified page number and size. 495 * 496 * @param pageNumber the page number in the data to retrieve 497 * @param pageSize the size of the page to retrieve. 498 * @param search the search object which provides the search parameters and pagination specification. 499 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 500 */ 501 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 502 503 /** 504 * Does the same thing as {@link #search(Search)} but with an 505 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 506 * finder results will <strong>NOT</strong> be transformed during retrieval. 507 * If this flag is any of the other constants defined here 508 * then results <strong>WILL BE</strong> passed through an operation which can optionally 509 * transform the entities (into value objects for example). By default, transformation does 510 * not occur. 511 * 512 * @param transform the transformation flag. 513 * @param search the search object which provides the search parameters and pagination specification. 514 * @return any found results from the search. 515 */ 516 public Set<?> search(final int transform, final Search search); 517 518 /** 519 * Performs a search using the parameters specified in the given <code>search</code> object. 520 * 521 * @param search the search object which provides the search parameters and pagination specification. 522 * @return any found results from the search. 523 */ 524 public Set<SurveyMeasurement> search(final Search search); 525 526 /** 527 * Allows transformation of entities into value objects 528 * (or something else for that matter), when the <code>transform</code> 529 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.data.measure.SurveyMeasurementDao</code>, please note 530 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 531 * will be returned. 532 * 533 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 534 * 535 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.data.measure.SurveyMeasurementDao} 536 * @param entity an entity that was found 537 * @return the transformed entity (i.e. new value object, etc) 538 * @see #transformEntities(int,Collection) 539 */ 540 public Object transformEntity(final int transform, final SurveyMeasurement entity); 541 542 /** 543 * Transforms a collection of entities using the 544 * {@link #transformEntity(int,SurveyMeasurement)} 545 * method. This method does not instantiate a new collection. 546 * <p> 547 * This method is to be used internally only. 548 * 549 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.data.measure.SurveyMeasurementDao</code> 550 * @param entities the collection of entities to transform 551 * @see #transformEntity(int,SurveyMeasurement) 552 */ 553 public void transformEntities(final int transform, final Collection<?> entities); 554 555 // spring-dao merge-point 556}