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.referential.conversion; 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.location.Location; 033import fr.ifremer.adagio.core.dao.referential.pmfm.QualitativeValue; 034import fr.ifremer.adagio.core.dao.referential.taxon.TaxonGroup; 035import java.sql.Timestamp; 036import java.util.Collection; 037import java.util.Date; 038import java.util.Set; 039import org.andromda.spring.PaginationResult; 040 041/** 042 * <html> 043 * <head> 044 * </head> 045 * <body> 046 * <p> 047 * <b>Equivalent poids vif </b>:<br><br> 048 * </p> 049 * <p> 050 * Le calcul se fait par multiplication du poids total du lot par un 051 * coefficient multiplicateur (convCoeff) . Ce coefficient est obtenu à 052 * partir des caractéristiques suivantes :<br>- espèce commerciale : 053 * TaxonGroup<br>- présentation du poisson: fishPresentation (ex : 054 * "Entier", "Vidé", "Étêté, vidé, 055 * équeuté", "Décortiqué", ...).<br>- 056 * Etat du poisson : fishState (ex : "frais", "congelé", 057 * "salé", 058 * "séché"...).<br>- Pays dans lequel s’est effectuée 059 * la capture. 060 * </p> 061 * <p> 062 * <u>Definition FAO :</u> "Round Weigth" : the weight of the whole fish 063 * before processing or removal of any part.<br>FAO (1998): Guidelines for 064 * the routine collection of capture fishery data. FAO Fish. Tech. Pap, 065 * 382: 113 p. 066 * </p> 067 * </body> 068 * </html> 069 * @see RoundWeightConversion 070 */ 071public interface RoundWeightConversionDao 072{ 073 /** 074 * This constant is used as a transformation flag; entities can be converted automatically into value objects 075 * or other types, different methods in a class implementing this interface support this feature: look for 076 * an <code>int</code> parameter called <code>transform</code>. 077 * <p> 078 * This specific flag denotes no transformation will occur. 079 */ 080 public static final int TRANSFORM_NONE = 0; 081 082 083 /** 084 * Transforms the given results to a collection of {@link RoundWeightConversion} 085 * instances (this is useful when the returned results contains a row of data and you want just entities only). 086 * 087 * @param results the query results. 088 */ 089 public void toEntities(final Collection<?> results); 090 091 /** 092 * Gets an instance of RoundWeightConversion from the persistent store. 093 * @param id 094 * @return RoundWeightConversion 095 */ 096 public RoundWeightConversion get(Integer id); 097 098 /** 099 * <p> 100 * Does the same thing as {@link #get(Integer)} with an 101 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 102 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 103 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 104 * optionally transform the entity (into a value object for example). By default, transformation does 105 * not occur. 106 * </p> 107 * 108 * @param transform flag to determine transformation type. 109 * @param id the identifier of the entity to get. 110 * @return either the entity or the object transformed from the entity. 111 */ 112 public Object get(int transform, Integer id); 113 114 /** 115 * Loads an instance of RoundWeightConversion from the persistent store. 116 * @param id 117 * @return RoundWeightConversion 118 */ 119 public RoundWeightConversion load(Integer id); 120 121 /** 122 * <p> 123 * Does the same thing as {@link #load(Integer)} with an 124 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 125 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 126 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 127 * optionally transform the entity (into a value object for example). By default, transformation does 128 * not occur. 129 * </p> 130 * 131 * @param transform flag to determine transformation type. 132 * @param id the identifier of the entity to load. 133 * @return either the entity or the object transformed from the entity. 134 */ 135 public Object load(int transform, Integer id); 136 137 /** 138 * Loads all entities of type {@link RoundWeightConversion}. 139 * 140 * @return the loaded entities. 141 */ 142 public Collection<RoundWeightConversion> loadAll(); 143 144 /** 145 * <p> 146 * Does the same thing as {@link #loadAll()} with an 147 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 148 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 149 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 150 * transform the entity (into a value object for example). By default, transformation does 151 * not occur. 152 * </p> 153 * 154 * @param transform the flag indicating what transformation to use. 155 * @return the loaded entities. 156 */ 157 public Collection<?> loadAll(final int transform); 158 159 /** 160 * <p> 161 * Does the same thing as {@link #loadAll()} with an 162 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 163 * 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 164 * page retrieved. 165 * </p> 166 * 167 * @param pageNumber the page number to retrieve when paging results. 168 * @param pageSize the size of the page to retrieve when paging results. 169 * @return the loaded entities. 170 */ 171 public Collection<?> loadAll(final int pageNumber, final int pageSize); 172 173 /** 174 * <p> 175 * Does the same thing as {@link #loadAll(int)} with an 176 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 177 * 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 178 * page retrieved. 179 * </p> 180 * 181 * @param transform the flag indicating what transformation to use. 182 * @param pageNumber the page number to retrieve when paging results. 183 * @param pageSize the size of the page to retrieve when paging results. 184 * @return the loaded entities. 185 */ 186 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 187 188 /** 189 * Creates an instance of RoundWeightConversion and adds it to the persistent store. 190 * @param roundWeightConversion 191 * @return RoundWeightConversion 192 */ 193 public RoundWeightConversion create(RoundWeightConversion roundWeightConversion); 194 195 /** 196 * <p> 197 * Does the same thing as {@link #create(RoundWeightConversion)} with an 198 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 199 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 200 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 201 * transform the entity (into a value object for example). By default, transformation does 202 * not occur. 203 * </p> 204 * @param transform 205 * @param roundWeightConversion 206 * @return Object 207 */ 208 public Object create(int transform, RoundWeightConversion roundWeightConversion); 209 210 /** 211 * Creates a new instance of RoundWeightConversion and adds 212 * from the passed in <code>entities</code> collection 213 * 214 * @param entities the collection of RoundWeightConversion 215 * instances to create. 216 * 217 * @return the created instances. 218 */ 219 public Collection<RoundWeightConversion> create(Collection<RoundWeightConversion> entities); 220 221 /** 222 * <p> 223 * Does the same thing as {@link #create(RoundWeightConversion)} with an 224 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 225 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 226 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 227 * transform the entities (into value objects for example). By default, transformation does 228 * not occur. 229 * </p> 230 * @param transform 231 * @param entities 232 * @return Collection 233 */ 234 public Collection<?> create(int transform, Collection<RoundWeightConversion> entities); 235 236 /** 237 * <p> 238 * Creates a new <code>RoundWeightConversion</code> 239 * instance from <strong>all</strong> attributes and adds it to 240 * the persistent store. 241 * </p> 242 * @param conversionCoefficient Coefficient de conversion pour l'équivalent poids vif. 243 * @param startDate Date de début de validité de l'équivalent poids vif 244 * @param endDate Date de fin de validité de l'équivalent poids vif. 245Si vide : toujours actif. 246 * @param description 247 * @param comments 248 * @param updateDate 249 * @return RoundWeightConversion 250 */ 251 public RoundWeightConversion create( 252 Float conversionCoefficient, 253 Date startDate, 254 Date endDate, 255 String description, 256 String comments, 257 Timestamp updateDate); 258 259 /** 260 * <p> 261 * Does the same thing as {@link #create(Float, Date, Date, String, String, Timestamp)} with an 262 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 263 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 264 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 265 * transform the entity (into a value object for example). By default, transformation does 266 * not occur. 267 * </p> 268 * @param transform 269 * @param conversionCoefficient Coefficient de conversion pour l'équivalent poids vif. 270 * @param startDate Date de début de validité de l'équivalent poids vif 271 * @param endDate Date de fin de validité de l'équivalent poids vif. 272Si vide : toujours actif. 273 * @param description 274 * @param comments 275 * @param updateDate 276 * @return RoundWeightConversion 277 */ 278 public Object create( 279 int transform, 280 Float conversionCoefficient, 281 Date startDate, 282 Date endDate, 283 String description, 284 String comments, 285 Timestamp updateDate); 286 287 /** 288 * <p> 289 * Creates a new <code>RoundWeightConversion</code> 290 * instance from only <strong>required</strong> properties (attributes 291 * and association ends) and adds it to the persistent store. 292 * </p> 293 * @param conversionCoefficient 294 * @param dressing 295 * @param location 296 * @param preserving 297 * @param startDate 298 * @param taxonGroup 299 * @param updateDate 300 * @return RoundWeightConversion 301 */ 302 public RoundWeightConversion create( 303 Float conversionCoefficient, 304 QualitativeValue dressing, 305 Location location, 306 QualitativeValue preserving, 307 Date startDate, 308 TaxonGroup taxonGroup, 309 Timestamp updateDate); 310 311 /** 312 * <p> 313 * Does the same thing as {@link #create(Float, Date, Timestamp)} with an 314 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 315 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 316 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 317 * transform the entity (into a value object for example). By default, transformation does 318 * not occur. 319 * </p> 320 * @param transform flag to determine transformation type. 321 * @param conversionCoefficient 322 * @param dressing 323 * @param location 324 * @param preserving 325 * @param startDate 326 * @param taxonGroup 327 * @param updateDate 328 * @return Object 329 */ 330 public Object create( 331 int transform, 332 Float conversionCoefficient, 333 QualitativeValue dressing, 334 Location location, 335 QualitativeValue preserving, 336 Date startDate, 337 TaxonGroup taxonGroup, 338 Timestamp updateDate); 339 340 /** 341 * Updates the <code>roundWeightConversion</code> instance in the persistent store. 342 * @param roundWeightConversion 343 */ 344 public void update(RoundWeightConversion roundWeightConversion); 345 346 /** 347 * Updates all instances in the <code>entities</code> collection in the persistent store. 348 * @param entities 349 */ 350 public void update(Collection<RoundWeightConversion> entities); 351 352 /** 353 * Removes the instance of RoundWeightConversion from the persistent store. 354 * @param roundWeightConversion 355 */ 356 public void remove(RoundWeightConversion roundWeightConversion); 357 358 /** 359 * Removes the instance of RoundWeightConversion having the given 360 * <code>identifier</code> from the persistent store. 361 * @param id 362 */ 363 public void remove(Integer id); 364 365 /** 366 * Removes all entities in the given <code>entities</code> collection. 367 * @param entities 368 */ 369 public void remove(Collection<RoundWeightConversion> entities); 370 371 372 /** 373 * Does the same thing as {@link #search(int, Search)} but with an 374 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 375 * limit your data to a specified page number and size. 376 * 377 * @param transform the transformation flag. 378 * @param pageNumber the page number in the data to retrieve 379 * @param pageSize the size of the page to retrieve. 380 * @param search the search object which provides the search parameters and pagination specification. 381 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 382 */ 383 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 384 385 /** 386 * Does the same thing as {@link #search(Search)} but with an 387 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 388 * limit your data to a specified page number and size. 389 * 390 * @param pageNumber the page number in the data to retrieve 391 * @param pageSize the size of the page to retrieve. 392 * @param search the search object which provides the search parameters and pagination specification. 393 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 394 */ 395 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 396 397 /** 398 * Does the same thing as {@link #search(Search)} but with an 399 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 400 * finder results will <strong>NOT</strong> be transformed during retrieval. 401 * If this flag is any of the other constants defined here 402 * then results <strong>WILL BE</strong> passed through an operation which can optionally 403 * transform the entities (into value objects for example). By default, transformation does 404 * not occur. 405 * 406 * @param transform the transformation flag. 407 * @param search the search object which provides the search parameters and pagination specification. 408 * @return any found results from the search. 409 */ 410 public Set<?> search(final int transform, final Search search); 411 412 /** 413 * Performs a search using the parameters specified in the given <code>search</code> object. 414 * 415 * @param search the search object which provides the search parameters and pagination specification. 416 * @return any found results from the search. 417 */ 418 public Set<RoundWeightConversion> search(final Search search); 419 420 /** 421 * Allows transformation of entities into value objects 422 * (or something else for that matter), when the <code>transform</code> 423 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.referential.conversion.RoundWeightConversionDao</code>, please note 424 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 425 * will be returned. 426 * 427 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 428 * 429 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.referential.conversion.RoundWeightConversionDao} 430 * @param entity an entity that was found 431 * @return the transformed entity (i.e. new value object, etc) 432 * @see #transformEntities(int,Collection) 433 */ 434 public Object transformEntity(final int transform, final RoundWeightConversion entity); 435 436 /** 437 * Transforms a collection of entities using the 438 * {@link #transformEntity(int,RoundWeightConversion)} 439 * method. This method does not instantiate a new collection. 440 * <p> 441 * This method is to be used internally only. 442 * 443 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.referential.conversion.RoundWeightConversionDao</code> 444 * @param entities the collection of entities to transform 445 * @see #transformEntity(int,RoundWeightConversion) 446 */ 447 public void transformEntities(final int transform, final Collection<?> entities); 448 449 // spring-dao merge-point 450}