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