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.vessel;
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.pmfm.QualitativeValue;
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 * Evènement d'entrée ou sortie de flotte (entrée ou sortie du registre des
047 * navires).
048 * </p>
049 * <p>
050 * </p>
051 * <p>
052 * Par exemple :
053 * </p>
054 * <ul>
055 * <li>
056 * Pour le flux FPC :
057 * </li>
058 * </ul>
059 * <!--StartFragment-->
060 * <div style="color:rgb(0, 0,
061 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255,
062 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;">
063 * <p style="margin-left:50.0px;">
064 * IMP<span style="white-space:pre-wrap;"> </span>Importation
065 * </p>
066 * </div>
067 * <div style="color:rgb(0, 0,
068 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255,
069 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;">
070 * <p style="margin-left:50.0px;">
071 * CHA<span style="white-space:pre-wrap;"> </span>Entrée dans le FPC
072 * </p>
073 * </div>
074 * <div style="color:rgb(0, 0,
075 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255,
076 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;">
077 * <p style="margin-left:50.0px;">
078 * CST<span style="white-space:pre-wrap;"> </span>Construction
079 * </p>
080 * </div>
081 * <div style="color:rgb(0, 0,
082 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255,
083 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;">
084 * <p style="margin-left:50.0px;">
085 * EXP<span style="white-space:pre-wrap;"> </span>Exportation
086 * </p>
087 * </div>
088 * <div style="color:rgb(0, 0,
089 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255,
090 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;">
091 * <p style="margin-left:50.0px;">
092 * COR<span style="white-space:pre-wrap;"> </span>Correction
093 * </p>
094 * </div>
095 * <div style="color:rgb(0, 0,
096 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255,
097 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;">
098 * <p style="margin-left:50.0px;">
099 * RET<span style="white-space:pre-wrap;"> </span>Retrait du FPC
100 * </p>
101 * </div>
102 * <div style="color:rgb(0, 0,
103 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255,
104 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;">
105 * <p style="margin-left:50.0px;">
106 * DES<span style="white-space:pre-wrap;"> </span>Destruction
107 * </p>
108 * </div>
109 * <div style="font-size:13px;font-style:normal;font-variant:normal;color:rgb(0, 0,
110 * 0);font-family:arial, sans-serif;">
111 * </div>
112 * </body>
113 * </html>
114 * @see VesselFleetEvent
115 */
116public interface VesselFleetEventDao
117{
118    /**
119     * This constant is used as a transformation flag; entities can be converted automatically into value objects
120     * or other types, different methods in a class implementing this interface support this feature: look for
121     * an <code>int</code> parameter called <code>transform</code>.
122     * <p>
123     * This specific flag denotes no transformation will occur.
124     */
125    public static final int TRANSFORM_NONE = 0;
126
127
128    /**
129     * Transforms the given results to a collection of {@link VesselFleetEvent}
130     * instances (this is useful when the returned results contains a row of data and you want just entities only).
131     *
132     * @param results the query results.
133     */
134    public void toEntities(final Collection<?> results);
135
136    /**
137     * Gets an instance of VesselFleetEvent from the persistent store.
138     * @param vesselFleetEventPk
139     * @return VesselFleetEvent
140     */
141    public VesselFleetEvent get(VesselFleetEventPK vesselFleetEventPk);
142
143    /**
144     * <p>
145     * Does the same thing as {@link #get(VesselFleetEventPK)} 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 in this class then the result <strong>WILL BE</strong> passed through an operation which can
149     * optionally transform the entity (into a value object for example). By default, transformation does
150     * not occur.
151     * </p>
152     *
153     * @param transform flag to determine transformation type.
154     * @param vesselFleetEventPk the identifier of the entity to get.
155     * @return either the entity or the object transformed from the entity.
156     */
157    public Object get(int transform, VesselFleetEventPK vesselFleetEventPk);
158
159    /**
160     * Loads an instance of VesselFleetEvent from the persistent store.
161     * @param vesselFleetEventPk
162     * @return VesselFleetEvent
163     */
164    public VesselFleetEvent load(VesselFleetEventPK vesselFleetEventPk);
165
166    /**
167     * <p>
168     * Does the same thing as {@link #load(VesselFleetEventPK)} with an
169     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
170     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
171     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
172     * optionally transform the entity (into a value object for example). By default, transformation does
173     * not occur.
174     * </p>
175     *
176     * @param transform flag to determine transformation type.
177     * @param vesselFleetEventPk the identifier of the entity to load.
178     * @return either the entity or the object transformed from the entity.
179     */
180    public Object load(int transform, VesselFleetEventPK vesselFleetEventPk);
181
182    /**
183     * Loads all entities of type {@link VesselFleetEvent}.
184     *
185     * @return the loaded entities.
186     */
187    public Collection<VesselFleetEvent> loadAll();
188
189    /**
190     * <p>
191     * Does the same thing as {@link #loadAll()} with an
192     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
193     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
194     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
195     * transform the entity (into a value object for example). By default, transformation does
196     * not occur.
197     * </p>
198     *
199     * @param transform the flag indicating what transformation to use.
200     * @return the loaded entities.
201     */
202    public Collection<?> loadAll(final int transform);
203
204    /**
205     * <p>
206     * Does the same thing as {@link #loadAll()} with an
207     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
208     * 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
209     * page retrieved.
210     * </p>
211     *
212     * @param pageNumber the page number to retrieve when paging results.
213     * @param pageSize the size of the page to retrieve when paging results.
214     * @return the loaded entities.
215     */
216    public Collection<?> loadAll(final int pageNumber, final int pageSize);
217
218    /**
219     * <p>
220     * Does the same thing as {@link #loadAll(int)} with an
221     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
222     * 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
223     * page retrieved.
224     * </p>
225     *
226     * @param transform the flag indicating what transformation to use.
227     * @param pageNumber the page number to retrieve when paging results.
228     * @param pageSize the size of the page to retrieve when paging results.
229     * @return the loaded entities.
230     */
231    public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize);
232
233    /**
234     * Creates an instance of VesselFleetEvent and adds it to the persistent store.
235     * @param vesselFleetEvent
236     * @return VesselFleetEvent
237     */
238    public VesselFleetEvent create(VesselFleetEvent vesselFleetEvent);
239
240    /**
241     * <p>
242     * Does the same thing as {@link #create(VesselFleetEvent)} with an
243     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
244     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
245     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
246     * transform the entity (into a value object for example). By default, transformation does
247     * not occur.
248     * </p>
249     * @param transform
250     * @param vesselFleetEvent
251     * @return Object
252     */
253    public Object create(int transform, VesselFleetEvent vesselFleetEvent);
254
255    /**
256     * Creates a new instance of VesselFleetEvent and adds
257     * from the passed in <code>entities</code> collection
258     *
259     * @param entities the collection of VesselFleetEvent
260     * instances to create.
261     *
262     * @return the created instances.
263     */
264    public Collection<VesselFleetEvent> create(Collection<VesselFleetEvent> entities);
265
266    /**
267     * <p>
268     * Does the same thing as {@link #create(VesselFleetEvent)} with an
269     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
270     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
271     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
272     * transform the entities (into value objects for example). By default, transformation does
273     * not occur.
274     * </p>
275     * @param transform
276     * @param entities
277     * @return Collection
278     */
279    public Collection<?> create(int transform, Collection<VesselFleetEvent> entities);
280
281    /**
282     * <p>
283     * Creates a new <code>VesselFleetEvent</code>
284     * instance from only <strong>required</strong> properties (attributes
285     * and association ends) and adds it to the persistent store.
286     * </p>
287     * @param eventType
288     * @param vessel
289     * @return VesselFleetEvent
290     */
291    public VesselFleetEvent create(
292        QualitativeValue eventType,
293        Vessel vessel);
294
295    /**
296     * <p>
297     * Does the same thing as {@link #create()} with an
298     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
299     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
300     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
301     * transform the entity (into a value object for example). By default, transformation does
302     * not occur.
303     * </p>
304     * @param transform flag to determine transformation type.
305     * @param eventType
306     * @param vessel
307     * @return Object
308     */
309    public Object create(
310        int transform,
311        QualitativeValue eventType,
312        Vessel vessel);
313
314    /**
315     * Updates the <code>vesselFleetEvent</code> instance in the persistent store.
316     * @param vesselFleetEvent
317     */
318    public void update(VesselFleetEvent vesselFleetEvent);
319
320    /**
321     * Updates all instances in the <code>entities</code> collection in the persistent store.
322     * @param entities
323     */
324    public void update(Collection<VesselFleetEvent> entities);
325
326    /**
327     * Removes the instance of VesselFleetEvent from the persistent store.
328     * @param vesselFleetEvent
329     */
330    public void remove(VesselFleetEvent vesselFleetEvent);
331
332    /**
333     * Removes the instance of VesselFleetEvent having the given
334     * <code>identifier</code> from the persistent store.
335     * @param vesselFleetEventPk
336     */
337    public void remove(VesselFleetEventPK vesselFleetEventPk);
338
339    /**
340     * Removes all entities in the given <code>entities</code> collection.
341     * @param entities
342     */
343    public void remove(Collection<VesselFleetEvent> entities);
344
345
346    /**
347     * Does the same thing as {@link #search(int, 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 transform the transformation flag.
352     * @param pageNumber the page number in the data to retrieve
353     * @param pageSize the size of the page to retrieve.
354     * @param search the search object which provides the search parameters and pagination specification.
355     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
356     */
357    public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search);
358
359    /**
360     * Does the same thing as {@link #search(Search)} but with an
361     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
362     * limit your data to a specified page number and size.
363     *
364     * @param pageNumber the page number in the data to retrieve
365     * @param pageSize the size of the page to retrieve.
366     * @param search the search object which provides the search parameters and pagination specification.
367     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
368     */
369    public PaginationResult search(final int pageNumber, final int pageSize, final Search search);
370
371    /**
372     * Does the same thing as {@link #search(Search)} but with an
373     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
374     * finder results will <strong>NOT</strong> be transformed during retrieval.
375     * If this flag is any of the other constants defined here
376     * then results <strong>WILL BE</strong> passed through an operation which can optionally
377     * transform the entities (into value objects for example). By default, transformation does
378     * not occur.
379     *
380     * @param transform the transformation flag.
381     * @param search the search object which provides the search parameters and pagination specification.
382     * @return any found results from the search.
383     */
384    public Set<?> search(final int transform, final Search search);
385
386    /**
387     * Performs a search using the parameters specified in the given <code>search</code> object.
388     *
389     * @param search the search object which provides the search parameters and pagination specification.
390     * @return any found results from the search.
391     */
392    public Set<VesselFleetEvent> search(final Search search);
393
394    /**
395     * Allows transformation of entities into value objects
396     * (or something else for that matter), when the <code>transform</code>
397     * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.data.vessel.VesselFleetEventDao</code>, please note
398     * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself
399     * will be returned.
400     *
401     * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed.
402     *
403     * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.data.vessel.VesselFleetEventDao}
404     * @param entity an entity that was found
405     * @return the transformed entity (i.e. new value object, etc)
406     * @see #transformEntities(int,Collection)
407     */
408    public Object transformEntity(final int transform, final VesselFleetEvent entity);
409
410    /**
411     * Transforms a collection of entities using the
412     * {@link #transformEntity(int,VesselFleetEvent)}
413     * method. This method does not instantiate a new collection.
414     * <p>
415     * This method is to be used internally only.
416     *
417     * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.data.vessel.VesselFleetEventDao</code>
418     * @param entities the collection of entities to transform
419     * @see #transformEntity(int,VesselFleetEvent)
420     */
421    public void transformEntities(final int transform, final Collection<?> entities);
422
423    // spring-dao merge-point
424}