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.samplingoperation; 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.administration.user.Department; 30 import fr.ifremer.quadrige3.core.dao.data.survey.Survey; 31 import fr.ifremer.quadrige3.core.dao.referential.QualityFlag; 32 import fr.ifremer.quadrige3.core.dao.referential.SamplingEquipment; 33 import java.sql.Timestamp; 34 import java.util.Collection; 35 import java.util.Date; 36 import java.util.Set; 37 import org.andromda.spring.PaginationResult; 38 39 /** 40 * Liste les prélévements effectués lors d'un passage. 41 * @see SamplingOperation 42 */ 43 public interface SamplingOperationDao 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 SamplingOperation} 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 SamplingOperation from the persistent store. 65 * @param samplingOperId 66 * @return SamplingOperation 67 */ 68 public SamplingOperation get(Integer samplingOperId); 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 samplingOperId 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 samplingOperId); 85 86 /** 87 * Loads an instance of SamplingOperation from the persistent store. 88 * @param samplingOperId 89 * @return SamplingOperation 90 */ 91 public SamplingOperation load(Integer samplingOperId); 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 samplingOperId 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 samplingOperId); 108 109 /** 110 * Loads all entities of type {@link SamplingOperation}. 111 * 112 * @return the loaded entities. 113 */ 114 public Collection<SamplingOperation> 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 SamplingOperation and adds it to the persistent store. 162 * @param samplingOperation 163 * @return SamplingOperation 164 */ 165 public SamplingOperation create(SamplingOperation samplingOperation); 166 167 /** 168 * <p> 169 * Does the same thing as {@link #create(SamplingOperation)} 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 samplingOperation 178 * @return Object 179 */ 180 public Object create(int transform, SamplingOperation samplingOperation); 181 182 /** 183 * Creates a new instance of SamplingOperation and adds 184 * from the passed in <code>entities</code> collection 185 * 186 * @param entities the collection of SamplingOperation 187 * instances to create. 188 * 189 * @return the created instances. 190 */ 191 public Collection<SamplingOperation> create(Collection<SamplingOperation> entities); 192 193 /** 194 * <p> 195 * Does the same thing as {@link #create(SamplingOperation)} 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<SamplingOperation> entities); 207 208 /** 209 * <p> 210 * Creates a new <code>SamplingOperation</code> 211 * instance from <strong>all</strong> attributes and adds it to 212 * the persistent store. 213 * </p> 214 * @param samplingOperLb Mnémonique du prélèvement. 215 * @param samplingOperDepth Immersion du prélèvement. Cette valeur est exclusive de la fourchette min max d'immersion. Elle 216 n'est pas obligatoire. 217 * @param samplingOperMaxDepth Valeur max de la fourchette d'immersion 218 * @param samplingOperMinDepth Valeur min de la fourchette d'immersion 219 * @param samplingOperSize Taille du prélèvement (surface, volume, poids, ¿ prélevé). 220 * @param samplingOperTime Heure à laquelle le prélèvement est effectué (HH24:MM). Pas de seconde a priori, mais exprimé en 221 seconde pour être homogène. 222 * @param samplingOperNumberIndiv Nombre d'individus, par exemple il y a une vingtaine d'huitre dans le prélèvement. 223 Il est à noter que cette quantité n'est pas redondante avec la somme des individus des résultats de 224 mesures. 225 * @param samplingOperCm Commentaire sur le prélèvement 226 * @param samplingOperUtFormat Format UT de l'heure pour le prélèvement [-12;12] 227 * @param samplingOperQualifDt Date de qualification du prélèvement 228 * @param samplingOperQualifCm Commentaire sur la qualification du prélèvement 229 * @param samplingOperControlDt Date de contrôle du prélèvement 230 * @param samplingOperValidDt Date de validation du prélèvement 231 * @param samplingOperActualPosition Vrai s'il s'agit dune géométrie définie par l'utilisateur, faux si la géométrie est héritée 232 * @param samplingOperPositionCm Commentaire associé à la localisation 233 * @param samplingOperGeomValidDt Date de validation de la géométrie du prélèvement 234 * @param samplingOperScope Vrai si l'étape de qualification est globale, faux si des éléments fils ou résultats n'ont pas la 235 même étape 236 * @param samplingOperHasMeas Vrai si l'élément a des résultats de mesure, dénombrement ou fichier 237 * @param updateDt Date de modification de l'objet, mise à jour par le système 238 * @param remoteId 239 * @return SamplingOperation 240 */ 241 public SamplingOperation create( 242 String samplingOperLb, 243 Float samplingOperDepth, 244 Float samplingOperMaxDepth, 245 Float samplingOperMinDepth, 246 Float samplingOperSize, 247 Integer samplingOperTime, 248 Integer samplingOperNumberIndiv, 249 String samplingOperCm, 250 Double samplingOperUtFormat, 251 Date samplingOperQualifDt, 252 String samplingOperQualifCm, 253 Date samplingOperControlDt, 254 Date samplingOperValidDt, 255 String samplingOperActualPosition, 256 String samplingOperPositionCm, 257 Date samplingOperGeomValidDt, 258 String samplingOperScope, 259 String samplingOperHasMeas, 260 Timestamp updateDt, 261 Integer remoteId); 262 263 /** 264 * <p> 265 * Does the same thing as {@link #create(String, Float, Float, Float, Float, Integer, Integer, String, Double, Date, String, Date, Date, String, String, Date, String, String, Timestamp, Integer)} with an 266 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 267 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 268 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 269 * transform the entity (into a value object for example). By default, transformation does 270 * not occur. 271 * </p> 272 * @param transform 273 * @param samplingOperLb Mnémonique du prélèvement. 274 * @param samplingOperDepth Immersion du prélèvement. Cette valeur est exclusive de la fourchette min max d'immersion. Elle 275 n'est pas obligatoire. 276 * @param samplingOperMaxDepth Valeur max de la fourchette d'immersion 277 * @param samplingOperMinDepth Valeur min de la fourchette d'immersion 278 * @param samplingOperSize Taille du prélèvement (surface, volume, poids, ¿ prélevé). 279 * @param samplingOperTime Heure à laquelle le prélèvement est effectué (HH24:MM). Pas de seconde a priori, mais exprimé en 280 seconde pour être homogène. 281 * @param samplingOperNumberIndiv Nombre d'individus, par exemple il y a une vingtaine d'huitre dans le prélèvement. 282 Il est à noter que cette quantité n'est pas redondante avec la somme des individus des résultats de 283 mesures. 284 * @param samplingOperCm Commentaire sur le prélèvement 285 * @param samplingOperUtFormat Format UT de l'heure pour le prélèvement [-12;12] 286 * @param samplingOperQualifDt Date de qualification du prélèvement 287 * @param samplingOperQualifCm Commentaire sur la qualification du prélèvement 288 * @param samplingOperControlDt Date de contrôle du prélèvement 289 * @param samplingOperValidDt Date de validation du prélèvement 290 * @param samplingOperActualPosition Vrai s'il s'agit dune géométrie définie par l'utilisateur, faux si la géométrie est héritée 291 * @param samplingOperPositionCm Commentaire associé à la localisation 292 * @param samplingOperGeomValidDt Date de validation de la géométrie du prélèvement 293 * @param samplingOperScope Vrai si l'étape de qualification est globale, faux si des éléments fils ou résultats n'ont pas la 294 même étape 295 * @param samplingOperHasMeas Vrai si l'élément a des résultats de mesure, dénombrement ou fichier 296 * @param updateDt Date de modification de l'objet, mise à jour par le système 297 * @param remoteId 298 * @return SamplingOperation 299 */ 300 public Object create( 301 int transform, 302 String samplingOperLb, 303 Float samplingOperDepth, 304 Float samplingOperMaxDepth, 305 Float samplingOperMinDepth, 306 Float samplingOperSize, 307 Integer samplingOperTime, 308 Integer samplingOperNumberIndiv, 309 String samplingOperCm, 310 Double samplingOperUtFormat, 311 Date samplingOperQualifDt, 312 String samplingOperQualifCm, 313 Date samplingOperControlDt, 314 Date samplingOperValidDt, 315 String samplingOperActualPosition, 316 String samplingOperPositionCm, 317 Date samplingOperGeomValidDt, 318 String samplingOperScope, 319 String samplingOperHasMeas, 320 Timestamp updateDt, 321 Integer remoteId); 322 323 /** 324 * <p> 325 * Creates a new <code>SamplingOperation</code> 326 * instance from only <strong>required</strong> properties (attributes 327 * and association ends) and adds it to the persistent store. 328 * </p> 329 * @param recorderDepartment 330 * @param department 331 * @param qualityFlag 332 * @param survey 333 * @param samplingEquipment 334 * @return SamplingOperation 335 */ 336 public SamplingOperation create( 337 Department recorderDepartment, 338 Department department, 339 QualityFlag qualityFlag, 340 Survey survey, 341 SamplingEquipment samplingEquipment); 342 343 /** 344 * <p> 345 * Does the same thing as {@link #create()} with an 346 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 347 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 348 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 349 * transform the entity (into a value object for example). By default, transformation does 350 * not occur. 351 * </p> 352 * @param transform flag to determine transformation type. 353 * @param recorderDepartment 354 * @param department 355 * @param qualityFlag 356 * @param survey 357 * @param samplingEquipment 358 * @return Object 359 */ 360 public Object create( 361 int transform, 362 Department recorderDepartment, 363 Department department, 364 QualityFlag qualityFlag, 365 Survey survey, 366 SamplingEquipment samplingEquipment); 367 368 /** 369 * Updates the <code>samplingOperation</code> instance in the persistent store. 370 * @param samplingOperation 371 */ 372 public void update(SamplingOperation samplingOperation); 373 374 /** 375 * Updates all instances in the <code>entities</code> collection in the persistent store. 376 * @param entities 377 */ 378 public void update(Collection<SamplingOperation> entities); 379 380 /** 381 * Removes the instance of SamplingOperation from the persistent store. 382 * @param samplingOperation 383 */ 384 public void remove(SamplingOperation samplingOperation); 385 386 /** 387 * Removes the instance of SamplingOperation having the given 388 * <code>identifier</code> from the persistent store. 389 * @param samplingOperId 390 */ 391 public void remove(Integer samplingOperId); 392 393 /** 394 * Removes all entities in the given <code>entities</code> collection. 395 * @param entities 396 */ 397 public void remove(Collection<SamplingOperation> entities); 398 399 400 /** 401 * Does the same thing as {@link #search(int, Search)} but with an 402 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 403 * limit your data to a specified page number and size. 404 * 405 * @param transform the transformation flag. 406 * @param pageNumber the page number in the data to retrieve 407 * @param pageSize the size of the page to retrieve. 408 * @param search the search object which provides the search parameters and pagination specification. 409 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 410 */ 411 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 412 413 /** 414 * Does the same thing as {@link #search(Search)} but with an 415 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 416 * limit your data to a specified page number and size. 417 * 418 * @param pageNumber the page number in the data to retrieve 419 * @param pageSize the size of the page to retrieve. 420 * @param search the search object which provides the search parameters and pagination specification. 421 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 422 */ 423 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 424 425 /** 426 * Does the same thing as {@link #search(Search)} but with an 427 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 428 * finder results will <strong>NOT</strong> be transformed during retrieval. 429 * If this flag is any of the other constants defined here 430 * then results <strong>WILL BE</strong> passed through an operation which can optionally 431 * transform the entities (into value objects for example). By default, transformation does 432 * not occur. 433 * 434 * @param transform the transformation flag. 435 * @param search the search object which provides the search parameters and pagination specification. 436 * @return any found results from the search. 437 */ 438 public Set<?> search(final int transform, final Search search); 439 440 /** 441 * Performs a search using the parameters specified in the given <code>search</code> object. 442 * 443 * @param search the search object which provides the search parameters and pagination specification. 444 * @return any found results from the search. 445 */ 446 public Set<SamplingOperation> search(final Search search); 447 448 /** 449 * Allows transformation of entities into value objects 450 * (or something else for that matter), when the <code>transform</code> 451 * flag is set to one of the constants defined in <code>fr.ifremer.quadrige3.core.dao.data.samplingoperation.SamplingOperationDao</code>, please note 452 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 453 * will be returned. 454 * 455 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 456 * 457 * @param transform one of the constants declared in {@link fr.ifremer.quadrige3.core.dao.data.samplingoperation.SamplingOperationDao} 458 * @param entity an entity that was found 459 * @return the transformed entity (i.e. new value object, etc) 460 * @see #transformEntities(int,Collection) 461 */ 462 public Object transformEntity(final int transform, final SamplingOperation entity); 463 464 /** 465 * Transforms a collection of entities using the 466 * {@link #transformEntity(int,SamplingOperation)} 467 * method. This method does not instantiate a new collection. 468 * <p> 469 * This method is to be used internally only. 470 * 471 * @param transform one of the constants declared in <code>fr.ifremer.quadrige3.core.dao.data.samplingoperation.SamplingOperationDao</code> 472 * @param entities the collection of entities to transform 473 * @see #transformEntity(int,SamplingOperation) 474 */ 475 public void transformEntities(final int transform, final Collection<?> entities); 476 477 // spring-dao merge-point 478 }