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.playground;
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.data.survey.fishingTrip.FishingTrip;
033import java.util.Collection;
034import java.util.Set;
035import org.andromda.spring.PaginationResult;
036
037/**
038 * Capitaine (patron) de navire pour la marée, et ordre de hiérarchie.
039 * A interpreter (une fois les données connues) et remodeliser.
040 * ref : flux SACAPT
041 * @see PlaygroundFishingTripVesselMaster
042 */
043public interface PlaygroundFishingTripVesselMasterDao
044{
045    /**
046     * This constant is used as a transformation flag; entities can be converted automatically into value objects
047     * or other types, different methods in a class implementing this interface support this feature: look for
048     * an <code>int</code> parameter called <code>transform</code>.
049     * <p>
050     * This specific flag denotes no transformation will occur.
051     */
052    public static final int TRANSFORM_NONE = 0;
053
054
055    /**
056     * Transforms the given results to a collection of {@link PlaygroundFishingTripVesselMaster}
057     * instances (this is useful when the returned results contains a row of data and you want just entities only).
058     *
059     * @param results the query results.
060     */
061    public void toEntities(final Collection<?> results);
062
063    /**
064     * Gets an instance of PlaygroundFishingTripVesselMaster from the persistent store.
065     * @param playgroundFishingTripVesselMasterPk
066     * @return PlaygroundFishingTripVesselMaster
067     */
068    public PlaygroundFishingTripVesselMaster get(PlaygroundFishingTripVesselMasterPK playgroundFishingTripVesselMasterPk);
069
070    /**
071     * <p>
072     * Does the same thing as {@link #get(PlaygroundFishingTripVesselMasterPK)} with an
073     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
074     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
075     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
076     * optionally transform the entity (into a value object for example). By default, transformation does
077     * not occur.
078     * </p>
079     *
080     * @param transform flag to determine transformation type.
081     * @param playgroundFishingTripVesselMasterPk the identifier of the entity to get.
082     * @return either the entity or the object transformed from the entity.
083     */
084    public Object get(int transform, PlaygroundFishingTripVesselMasterPK playgroundFishingTripVesselMasterPk);
085
086    /**
087     * Loads an instance of PlaygroundFishingTripVesselMaster from the persistent store.
088     * @param playgroundFishingTripVesselMasterPk
089     * @return PlaygroundFishingTripVesselMaster
090     */
091    public PlaygroundFishingTripVesselMaster load(PlaygroundFishingTripVesselMasterPK playgroundFishingTripVesselMasterPk);
092
093    /**
094     * <p>
095     * Does the same thing as {@link #load(PlaygroundFishingTripVesselMasterPK)} with an
096     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
097     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
098     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
099     * 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 playgroundFishingTripVesselMasterPk 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, PlaygroundFishingTripVesselMasterPK playgroundFishingTripVesselMasterPk);
108
109    /**
110     * Loads all entities of type {@link PlaygroundFishingTripVesselMaster}.
111     *
112     * @return the loaded entities.
113     */
114    public Collection<PlaygroundFishingTripVesselMaster> 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 PlaygroundFishingTripVesselMaster and adds it to the persistent store.
162     * @param playgroundFishingTripVesselMaster
163     * @return PlaygroundFishingTripVesselMaster
164     */
165    public PlaygroundFishingTripVesselMaster create(PlaygroundFishingTripVesselMaster playgroundFishingTripVesselMaster);
166
167    /**
168     * <p>
169     * Does the same thing as {@link #create(PlaygroundFishingTripVesselMaster)} 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 playgroundFishingTripVesselMaster
178     * @return Object
179     */
180    public Object create(int transform, PlaygroundFishingTripVesselMaster playgroundFishingTripVesselMaster);
181
182    /**
183     * Creates a new instance of PlaygroundFishingTripVesselMaster and adds
184     * from the passed in <code>entities</code> collection
185     *
186     * @param entities the collection of PlaygroundFishingTripVesselMaster
187     * instances to create.
188     *
189     * @return the created instances.
190     */
191    public Collection<PlaygroundFishingTripVesselMaster> create(Collection<PlaygroundFishingTripVesselMaster> entities);
192
193    /**
194     * <p>
195     * Does the same thing as {@link #create(PlaygroundFishingTripVesselMaster)} 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<PlaygroundFishingTripVesselMaster> entities);
207
208    /**
209     * <p>
210     * Creates a new <code>PlaygroundFishingTripVesselMaster</code>
211     * instance from <strong>all</strong> attributes and adds it to
212     * the persistent store.
213     * </p>
214     * @param rank Numéro d'ordre du patron de peche, dans la marée.
215     * @return PlaygroundFishingTripVesselMaster
216     */
217    public PlaygroundFishingTripVesselMaster create(
218        Integer rank);
219
220    /**
221     * <p>
222     * Does the same thing as {@link #create()} 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 entity (into a value object for example). By default, transformation does
227     * not occur.
228     * </p>
229     * @param transform
230     * @param rank Numéro d'ordre du patron de peche, dans la marée.
231     * @return PlaygroundFishingTripVesselMaster
232     */
233    public Object create(
234        int transform,
235        Integer rank);
236
237    /**
238     * <p>
239     * Creates a new <code>PlaygroundFishingTripVesselMaster</code>
240     * instance from only <strong>required</strong> properties (attributes
241     * and association ends) and adds it to the persistent store.
242     * </p>
243     * @param fishingTrip
244     * @param playgroundVesselMaster
245     * @return PlaygroundFishingTripVesselMaster
246     */
247    public PlaygroundFishingTripVesselMaster create(
248        FishingTrip fishingTrip,
249        PlaygroundVesselMaster playgroundVesselMaster);
250
251    /**
252     * <p>
253     * Does the same thing as {@link #create()} with an
254     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
255     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
256     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
257     * transform the entity (into a value object for example). By default, transformation does
258     * not occur.
259     * </p>
260     * @param transform flag to determine transformation type.
261     * @param fishingTrip
262     * @param playgroundVesselMaster
263     * @return Object
264     */
265    public Object create(
266        int transform,
267        FishingTrip fishingTrip,
268        PlaygroundVesselMaster playgroundVesselMaster);
269
270    /**
271     * Updates the <code>playgroundFishingTripVesselMaster</code> instance in the persistent store.
272     * @param playgroundFishingTripVesselMaster
273     */
274    public void update(PlaygroundFishingTripVesselMaster playgroundFishingTripVesselMaster);
275
276    /**
277     * Updates all instances in the <code>entities</code> collection in the persistent store.
278     * @param entities
279     */
280    public void update(Collection<PlaygroundFishingTripVesselMaster> entities);
281
282    /**
283     * Removes the instance of PlaygroundFishingTripVesselMaster from the persistent store.
284     * @param playgroundFishingTripVesselMaster
285     */
286    public void remove(PlaygroundFishingTripVesselMaster playgroundFishingTripVesselMaster);
287
288    /**
289     * Removes the instance of PlaygroundFishingTripVesselMaster having the given
290     * <code>identifier</code> from the persistent store.
291     * @param playgroundFishingTripVesselMasterPk
292     */
293    public void remove(PlaygroundFishingTripVesselMasterPK playgroundFishingTripVesselMasterPk);
294
295    /**
296     * Removes all entities in the given <code>entities</code> collection.
297     * @param entities
298     */
299    public void remove(Collection<PlaygroundFishingTripVesselMaster> entities);
300
301
302    /**
303     * Does the same thing as {@link #search(int, Search)} but with an
304     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
305     * limit your data to a specified page number and size.
306     *
307     * @param transform the transformation flag.
308     * @param pageNumber the page number in the data to retrieve
309     * @param pageSize the size of the page to retrieve.
310     * @param search the search object which provides the search parameters and pagination specification.
311     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
312     */
313    public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search);
314
315    /**
316     * Does the same thing as {@link #search(Search)} but with an
317     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
318     * limit your data to a specified page number and size.
319     *
320     * @param pageNumber the page number in the data to retrieve
321     * @param pageSize the size of the page to retrieve.
322     * @param search the search object which provides the search parameters and pagination specification.
323     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
324     */
325    public PaginationResult search(final int pageNumber, final int pageSize, final Search search);
326
327    /**
328     * Does the same thing as {@link #search(Search)} but with an
329     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
330     * finder results will <strong>NOT</strong> be transformed during retrieval.
331     * If this flag is any of the other constants defined here
332     * then results <strong>WILL BE</strong> passed through an operation which can optionally
333     * transform the entities (into value objects for example). By default, transformation does
334     * not occur.
335     *
336     * @param transform the transformation flag.
337     * @param search the search object which provides the search parameters and pagination specification.
338     * @return any found results from the search.
339     */
340    public Set<?> search(final int transform, final Search search);
341
342    /**
343     * Performs a search using the parameters specified in the given <code>search</code> object.
344     *
345     * @param search the search object which provides the search parameters and pagination specification.
346     * @return any found results from the search.
347     */
348    public Set<PlaygroundFishingTripVesselMaster> search(final Search search);
349
350    /**
351     * Allows transformation of entities into value objects
352     * (or something else for that matter), when the <code>transform</code>
353     * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.playground.PlaygroundFishingTripVesselMasterDao</code>, please note
354     * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself
355     * will be returned.
356     *
357     * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed.
358     *
359     * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.playground.PlaygroundFishingTripVesselMasterDao}
360     * @param entity an entity that was found
361     * @return the transformed entity (i.e. new value object, etc)
362     * @see #transformEntities(int,Collection)
363     */
364    public Object transformEntity(final int transform, final PlaygroundFishingTripVesselMaster entity);
365
366    /**
367     * Transforms a collection of entities using the
368     * {@link #transformEntity(int,PlaygroundFishingTripVesselMaster)}
369     * method. This method does not instantiate a new collection.
370     * <p>
371     * This method is to be used internally only.
372     *
373     * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.playground.PlaygroundFishingTripVesselMasterDao</code>
374     * @param entities the collection of entities to transform
375     * @see #transformEntity(int,PlaygroundFishingTripVesselMaster)
376     */
377    public void transformEntities(final int transform, final Collection<?> entities);
378
379    // spring-dao merge-point
380}