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.gear; 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 java.sql.Timestamp; 033import java.util.Collection; 034import java.util.Set; 035import org.andromda.spring.PaginationResult; 036 037/** 038 * <html> 039 * <head> 040 * <style> 041 * p {padding:0px; margin:0px;} 042 * </style> 043 * </head> 044 * <body> 045 * <p> 046 * @deprecated NE PLUS UTILISER - Utiliser plutot <i>Grouping</i> 047 * </p> 048 * <p> 049 *   050 * </p> 051 * <p> 052 * Défini les coresspondances d'un engin avec des engins d'autres classifications. 053 * </p> 054 * <p> 055 * [Regle de gestion] <b>Les correspondances au sein d'une meme classification sont interdites. 056 * </b><br>[Regle de gestion] <b>La correspondance vers une classification doit avoir été autorisée 057 * au préalable, au niveau de "GearClassificationSynonym" 058 * </b><br> 059 * </p> 060 * <p> 061 * Si la coresspondance est exacte (les engins des deux classifications sont synonymes), alors 062 * chaque engin doit avoir une correspondance vers l'autre. 063 * </p> 064 * <p> 065 * Si la coresspondance n'est pas exacte (un engin A correspond à un engin B, mais l'inverse n'est 066 * pas vrai), alors une seule correspondance de A vers B est définie. 067 * <br> 068 * </p> 069 * <p> 070 * <br> 071 * </p> 072 * </body> 073 * </html> 074 * @see GearAssociation 075 */ 076public interface GearAssociationDao 077{ 078 /** 079 * This constant is used as a transformation flag; entities can be converted automatically into value objects 080 * or other types, different methods in a class implementing this interface support this feature: look for 081 * an <code>int</code> parameter called <code>transform</code>. 082 * <p> 083 * This specific flag denotes no transformation will occur. 084 */ 085 public static final int TRANSFORM_NONE = 0; 086 087 088 /** 089 * Transforms the given results to a collection of {@link GearAssociation} 090 * instances (this is useful when the returned results contains a row of data and you want just entities only). 091 * 092 * @param results the query results. 093 */ 094 public void toEntities(final Collection<?> results); 095 096 /** 097 * Gets an instance of GearAssociation from the persistent store. 098 * @param gearAssociationPk 099 * @return GearAssociation 100 */ 101 public GearAssociation get(GearAssociationPK gearAssociationPk); 102 103 /** 104 * <p> 105 * Does the same thing as {@link #get(GearAssociationPK)} with an 106 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 107 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 108 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 109 * optionally transform the entity (into a value object for example). By default, transformation does 110 * not occur. 111 * </p> 112 * 113 * @param transform flag to determine transformation type. 114 * @param gearAssociationPk the identifier of the entity to get. 115 * @return either the entity or the object transformed from the entity. 116 */ 117 public Object get(int transform, GearAssociationPK gearAssociationPk); 118 119 /** 120 * Loads an instance of GearAssociation from the persistent store. 121 * @param gearAssociationPk 122 * @return GearAssociation 123 */ 124 public GearAssociation load(GearAssociationPK gearAssociationPk); 125 126 /** 127 * <p> 128 * Does the same thing as {@link #load(GearAssociationPK)} with an 129 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 130 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 131 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 132 * optionally transform the entity (into a value object for example). By default, transformation does 133 * not occur. 134 * </p> 135 * 136 * @param transform flag to determine transformation type. 137 * @param gearAssociationPk the identifier of the entity to load. 138 * @return either the entity or the object transformed from the entity. 139 */ 140 public Object load(int transform, GearAssociationPK gearAssociationPk); 141 142 /** 143 * Loads all entities of type {@link GearAssociation}. 144 * 145 * @return the loaded entities. 146 */ 147 public Collection<GearAssociation> loadAll(); 148 149 /** 150 * <p> 151 * Does the same thing as {@link #loadAll()} with an 152 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 153 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 154 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 155 * transform the entity (into a value object for example). By default, transformation does 156 * not occur. 157 * </p> 158 * 159 * @param transform the flag indicating what transformation to use. 160 * @return the loaded entities. 161 */ 162 public Collection<?> loadAll(final int transform); 163 164 /** 165 * <p> 166 * Does the same thing as {@link #loadAll()} with an 167 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 168 * 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 169 * page retrieved. 170 * </p> 171 * 172 * @param pageNumber the page number to retrieve when paging results. 173 * @param pageSize the size of the page to retrieve when paging results. 174 * @return the loaded entities. 175 */ 176 public Collection<?> loadAll(final int pageNumber, final int pageSize); 177 178 /** 179 * <p> 180 * Does the same thing as {@link #loadAll(int)} with an 181 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 182 * 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 183 * page retrieved. 184 * </p> 185 * 186 * @param transform the flag indicating what transformation to use. 187 * @param pageNumber the page number to retrieve when paging results. 188 * @param pageSize the size of the page to retrieve when paging results. 189 * @return the loaded entities. 190 */ 191 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 192 193 /** 194 * Creates an instance of GearAssociation and adds it to the persistent store. 195 * @param gearAssociation 196 * @return GearAssociation 197 */ 198 public GearAssociation create(GearAssociation gearAssociation); 199 200 /** 201 * <p> 202 * Does the same thing as {@link #create(GearAssociation)} with an 203 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 204 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 205 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 206 * transform the entity (into a value object for example). By default, transformation does 207 * not occur. 208 * </p> 209 * @param transform 210 * @param gearAssociation 211 * @return Object 212 */ 213 public Object create(int transform, GearAssociation gearAssociation); 214 215 /** 216 * Creates a new instance of GearAssociation and adds 217 * from the passed in <code>entities</code> collection 218 * 219 * @param entities the collection of GearAssociation 220 * instances to create. 221 * 222 * @return the created instances. 223 */ 224 public Collection<GearAssociation> create(Collection<GearAssociation> entities); 225 226 /** 227 * <p> 228 * Does the same thing as {@link #create(GearAssociation)} with an 229 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 230 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 231 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 232 * transform the entities (into value objects for example). By default, transformation does 233 * not occur. 234 * </p> 235 * @param transform 236 * @param entities 237 * @return Collection 238 */ 239 public Collection<?> create(int transform, Collection<GearAssociation> entities); 240 241 /** 242 * <p> 243 * Creates a new <code>GearAssociation</code> 244 * instance from <strong>all</strong> attributes and adds it to 245 * the persistent store. 246 * </p> 247 * @param updateDate 248 * @return GearAssociation 249 */ 250 public GearAssociation create( 251 Timestamp updateDate); 252 253 /** 254 * <p> 255 * Does the same thing as {@link #create(Timestamp)} with an 256 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 257 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 258 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 259 * transform the entity (into a value object for example). By default, transformation does 260 * not occur. 261 * </p> 262 * @param transform 263 * @param updateDate 264 * @return GearAssociation 265 */ 266 public Object create( 267 int transform, 268 Timestamp updateDate); 269 270 /** 271 * <p> 272 * Creates a new <code>GearAssociation</code> 273 * instance from only <strong>required</strong> properties (attributes 274 * and association ends) and adds it to the persistent store. 275 * </p> 276 * @param fromGear 277 * @param toGear 278 * @param updateDate 279 * @return GearAssociation 280 */ 281 public GearAssociation create( 282 Gear fromGear, 283 Gear toGear, 284 Timestamp updateDate); 285 286 /** 287 * <p> 288 * Does the same thing as {@link #create(Timestamp)} with an 289 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 290 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 291 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 292 * transform the entity (into a value object for example). By default, transformation does 293 * not occur. 294 * </p> 295 * @param transform flag to determine transformation type. 296 * @param fromGear 297 * @param toGear 298 * @param updateDate 299 * @return Object 300 */ 301 public Object create( 302 int transform, 303 Gear fromGear, 304 Gear toGear, 305 Timestamp updateDate); 306 307 /** 308 * Updates the <code>gearAssociation</code> instance in the persistent store. 309 * @param gearAssociation 310 */ 311 public void update(GearAssociation gearAssociation); 312 313 /** 314 * Updates all instances in the <code>entities</code> collection in the persistent store. 315 * @param entities 316 */ 317 public void update(Collection<GearAssociation> entities); 318 319 /** 320 * Removes the instance of GearAssociation from the persistent store. 321 * @param gearAssociation 322 */ 323 public void remove(GearAssociation gearAssociation); 324 325 /** 326 * Removes the instance of GearAssociation having the given 327 * <code>identifier</code> from the persistent store. 328 * @param gearAssociationPk 329 */ 330 public void remove(GearAssociationPK gearAssociationPk); 331 332 /** 333 * Removes all entities in the given <code>entities</code> collection. 334 * @param entities 335 */ 336 public void remove(Collection<GearAssociation> entities); 337 338 339 /** 340 * Does the same thing as {@link #search(int, Search)} but with an 341 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 342 * limit your data to a specified page number and size. 343 * 344 * @param transform the transformation flag. 345 * @param pageNumber the page number in the data to retrieve 346 * @param pageSize the size of the page to retrieve. 347 * @param search the search object which provides the search parameters and pagination specification. 348 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 349 */ 350 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 351 352 /** 353 * Does the same thing as {@link #search(Search)} but with an 354 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 355 * limit your data to a specified page number and size. 356 * 357 * @param pageNumber the page number in the data to retrieve 358 * @param pageSize the size of the page to retrieve. 359 * @param search the search object which provides the search parameters and pagination specification. 360 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 361 */ 362 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 363 364 /** 365 * Does the same thing as {@link #search(Search)} but with an 366 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 367 * finder results will <strong>NOT</strong> be transformed during retrieval. 368 * If this flag is any of the other constants defined here 369 * then results <strong>WILL BE</strong> passed through an operation which can optionally 370 * transform the entities (into value objects for example). By default, transformation does 371 * not occur. 372 * 373 * @param transform the transformation flag. 374 * @param search the search object which provides the search parameters and pagination specification. 375 * @return any found results from the search. 376 */ 377 public Set<?> search(final int transform, final Search search); 378 379 /** 380 * Performs a search using the parameters specified in the given <code>search</code> object. 381 * 382 * @param search the search object which provides the search parameters and pagination specification. 383 * @return any found results from the search. 384 */ 385 public Set<GearAssociation> search(final Search search); 386 387 /** 388 * Allows transformation of entities into value objects 389 * (or something else for that matter), when the <code>transform</code> 390 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.referential.gear.GearAssociationDao</code>, please note 391 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 392 * will be returned. 393 * 394 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 395 * 396 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.referential.gear.GearAssociationDao} 397 * @param entity an entity that was found 398 * @return the transformed entity (i.e. new value object, etc) 399 * @see #transformEntities(int,Collection) 400 */ 401 public Object transformEntity(final int transform, final GearAssociation entity); 402 403 /** 404 * Transforms a collection of entities using the 405 * {@link #transformEntity(int,GearAssociation)} 406 * method. This method does not instantiate a new collection. 407 * <p> 408 * This method is to be used internally only. 409 * 410 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.referential.gear.GearAssociationDao</code> 411 * @param entities the collection of entities to transform 412 * @see #transformEntity(int,GearAssociation) 413 */ 414 public void transformEntities(final int transform, final Collection<?> entities); 415 416 // spring-dao merge-point 417}