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.fishingArea;
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 java.util.Collection;
034import java.util.Set;
035import org.andromda.spring.PaginationResult;
036
037/**
038 * Table de liaison entre une zone de peche effective, et une zone avec une réglementation
039 * particulière (ex : ZEE, zone d'effort, etc.).
040 * Cela permet de lister, pour une zone de peche effective, dans quelles réglementaires se trouve le
041 * navire.
042 * Utilisé dans SACAPT.
043 * Dans le cas particulier des campagnes scientifique, cette table permet d'associé au rectangle ou
044 * sous-rectangle de la zone de pêche, une localité, une strate, ou les deux, suivant ce qui a été
045 * défini dans le protocole de collecte.
046 * @see FishingArea2RegulationLocation
047 */
048public interface FishingArea2RegulationLocationDao
049{
050    /**
051     * This constant is used as a transformation flag; entities can be converted automatically into value objects
052     * or other types, different methods in a class implementing this interface support this feature: look for
053     * an <code>int</code> parameter called <code>transform</code>.
054     * <p>
055     * This specific flag denotes no transformation will occur.
056     */
057    public static final int TRANSFORM_NONE = 0;
058
059
060    /**
061     * Transforms the given results to a collection of {@link FishingArea2RegulationLocation}
062     * instances (this is useful when the returned results contains a row of data and you want just entities only).
063     *
064     * @param results the query results.
065     */
066    public void toEntities(final Collection<?> results);
067
068    /**
069     * Gets an instance of FishingArea2RegulationLocation from the persistent store.
070     * @param fishingArea2RegulationLocationPk
071     * @return FishingArea2RegulationLocation
072     */
073    public FishingArea2RegulationLocation get(FishingArea2RegulationLocationPK fishingArea2RegulationLocationPk);
074
075    /**
076     * <p>
077     * Does the same thing as {@link #get(FishingArea2RegulationLocationPK)} with an
078     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
079     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
080     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
081     * optionally transform the entity (into a value object for example). By default, transformation does
082     * not occur.
083     * </p>
084     *
085     * @param transform flag to determine transformation type.
086     * @param fishingArea2RegulationLocationPk the identifier of the entity to get.
087     * @return either the entity or the object transformed from the entity.
088     */
089    public Object get(int transform, FishingArea2RegulationLocationPK fishingArea2RegulationLocationPk);
090
091    /**
092     * Loads an instance of FishingArea2RegulationLocation from the persistent store.
093     * @param fishingArea2RegulationLocationPk
094     * @return FishingArea2RegulationLocation
095     */
096    public FishingArea2RegulationLocation load(FishingArea2RegulationLocationPK fishingArea2RegulationLocationPk);
097
098    /**
099     * <p>
100     * Does the same thing as {@link #load(FishingArea2RegulationLocationPK)} 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 fishingArea2RegulationLocationPk the identifier of the entity to load.
110     * @return either the entity or the object transformed from the entity.
111     */
112    public Object load(int transform, FishingArea2RegulationLocationPK fishingArea2RegulationLocationPk);
113
114    /**
115     * Loads all entities of type {@link FishingArea2RegulationLocation}.
116     *
117     * @return the loaded entities.
118     */
119    public Collection<FishingArea2RegulationLocation> loadAll();
120
121    /**
122     * <p>
123     * Does the same thing as {@link #loadAll()} 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 here then the result <strong>WILL BE</strong> passed through an operation which can optionally
127     * transform the entity (into a value object for example). By default, transformation does
128     * not occur.
129     * </p>
130     *
131     * @param transform the flag indicating what transformation to use.
132     * @return the loaded entities.
133     */
134    public Collection<?> loadAll(final int transform);
135
136    /**
137     * <p>
138     * Does the same thing as {@link #loadAll()} with an
139     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
140     * 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
141     * page retrieved.
142     * </p>
143     *
144     * @param pageNumber the page number to retrieve when paging results.
145     * @param pageSize the size of the page to retrieve when paging results.
146     * @return the loaded entities.
147     */
148    public Collection<?> loadAll(final int pageNumber, final int pageSize);
149
150    /**
151     * <p>
152     * Does the same thing as {@link #loadAll(int)} with an
153     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
154     * 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
155     * page retrieved.
156     * </p>
157     *
158     * @param transform the flag indicating what transformation to use.
159     * @param pageNumber the page number to retrieve when paging results.
160     * @param pageSize the size of the page to retrieve when paging results.
161     * @return the loaded entities.
162     */
163    public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize);
164
165    /**
166     * Creates an instance of FishingArea2RegulationLocation and adds it to the persistent store.
167     * @param fishingArea2RegulationLocation
168     * @return FishingArea2RegulationLocation
169     */
170    public FishingArea2RegulationLocation create(FishingArea2RegulationLocation fishingArea2RegulationLocation);
171
172    /**
173     * <p>
174     * Does the same thing as {@link #create(FishingArea2RegulationLocation)} with an
175     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
176     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
177     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
178     * transform the entity (into a value object for example). By default, transformation does
179     * not occur.
180     * </p>
181     * @param transform
182     * @param fishingArea2RegulationLocation
183     * @return Object
184     */
185    public Object create(int transform, FishingArea2RegulationLocation fishingArea2RegulationLocation);
186
187    /**
188     * Creates a new instance of FishingArea2RegulationLocation and adds
189     * from the passed in <code>entities</code> collection
190     *
191     * @param entities the collection of FishingArea2RegulationLocation
192     * instances to create.
193     *
194     * @return the created instances.
195     */
196    public Collection<FishingArea2RegulationLocation> create(Collection<FishingArea2RegulationLocation> entities);
197
198    /**
199     * <p>
200     * Does the same thing as {@link #create(FishingArea2RegulationLocation)} with an
201     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
202     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
203     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
204     * transform the entities (into value objects for example). By default, transformation does
205     * not occur.
206     * </p>
207     * @param transform
208     * @param entities
209     * @return Collection
210     */
211    public Collection<?> create(int transform, Collection<FishingArea2RegulationLocation> entities);
212
213    /**
214     * <p>
215     * Creates a new <code>FishingArea2RegulationLocation</code>
216     * instance from only <strong>required</strong> properties (attributes
217     * and association ends) and adds it to the persistent store.
218     * </p>
219     * @param fishingArea
220     * @param location
221     * @return FishingArea2RegulationLocation
222     */
223    public FishingArea2RegulationLocation create(
224        FishingArea fishingArea,
225        Location location);
226
227    /**
228     * <p>
229     * Does the same thing as {@link #create()} with an
230     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
231     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
232     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
233     * transform the entity (into a value object for example). By default, transformation does
234     * not occur.
235     * </p>
236     * @param transform flag to determine transformation type.
237     * @param fishingArea
238     * @param location
239     * @return Object
240     */
241    public Object create(
242        int transform,
243        FishingArea fishingArea,
244        Location location);
245
246    /**
247     * Updates the <code>fishingArea2RegulationLocation</code> instance in the persistent store.
248     * @param fishingArea2RegulationLocation
249     */
250    public void update(FishingArea2RegulationLocation fishingArea2RegulationLocation);
251
252    /**
253     * Updates all instances in the <code>entities</code> collection in the persistent store.
254     * @param entities
255     */
256    public void update(Collection<FishingArea2RegulationLocation> entities);
257
258    /**
259     * Removes the instance of FishingArea2RegulationLocation from the persistent store.
260     * @param fishingArea2RegulationLocation
261     */
262    public void remove(FishingArea2RegulationLocation fishingArea2RegulationLocation);
263
264    /**
265     * Removes the instance of FishingArea2RegulationLocation having the given
266     * <code>identifier</code> from the persistent store.
267     * @param fishingArea2RegulationLocationPk
268     */
269    public void remove(FishingArea2RegulationLocationPK fishingArea2RegulationLocationPk);
270
271    /**
272     * Removes all entities in the given <code>entities</code> collection.
273     * @param entities
274     */
275    public void remove(Collection<FishingArea2RegulationLocation> entities);
276
277
278    /**
279     * Does the same thing as {@link #search(int, Search)} but with an
280     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
281     * limit your data to a specified page number and size.
282     *
283     * @param transform the transformation flag.
284     * @param pageNumber the page number in the data to retrieve
285     * @param pageSize the size of the page to retrieve.
286     * @param search the search object which provides the search parameters and pagination specification.
287     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
288     */
289    public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search);
290
291    /**
292     * Does the same thing as {@link #search(Search)} but with an
293     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
294     * limit your data to a specified page number and size.
295     *
296     * @param pageNumber the page number in the data to retrieve
297     * @param pageSize the size of the page to retrieve.
298     * @param search the search object which provides the search parameters and pagination specification.
299     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
300     */
301    public PaginationResult search(final int pageNumber, final int pageSize, final Search search);
302
303    /**
304     * Does the same thing as {@link #search(Search)} but with an
305     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
306     * finder results will <strong>NOT</strong> be transformed during retrieval.
307     * If this flag is any of the other constants defined here
308     * then results <strong>WILL BE</strong> passed through an operation which can optionally
309     * transform the entities (into value objects for example). By default, transformation does
310     * not occur.
311     *
312     * @param transform the transformation flag.
313     * @param search the search object which provides the search parameters and pagination specification.
314     * @return any found results from the search.
315     */
316    public Set<?> search(final int transform, final Search search);
317
318    /**
319     * Performs a search using the parameters specified in the given <code>search</code> object.
320     *
321     * @param search the search object which provides the search parameters and pagination specification.
322     * @return any found results from the search.
323     */
324    public Set<FishingArea2RegulationLocation> search(final Search search);
325
326    /**
327     * Allows transformation of entities into value objects
328     * (or something else for that matter), when the <code>transform</code>
329     * flag is set to one of the constants defined in <code>FishingArea2RegulationLocationDao</code>, please note
330     * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself
331     * will be returned.
332     *
333     * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed.
334     *
335     * @param transform one of the constants declared in {@link FishingArea2RegulationLocationDao}
336     * @param entity an entity that was found
337     * @return the transformed entity (i.e. new value object, etc)
338     * @see #transformEntities(int,Collection)
339     */
340    public Object transformEntity(final int transform, final FishingArea2RegulationLocation entity);
341
342    /**
343     * Transforms a collection of entities using the
344     * {@link #transformEntity(int,FishingArea2RegulationLocation)}
345     * method. This method does not instantiate a new collection.
346     * <p>
347     * This method is to be used internally only.
348     *
349     * @param transform one of the constants declared in <code>FishingArea2RegulationLocationDao</code>
350     * @param entities the collection of entities to transform
351     * @see #transformEntity(int,FishingArea2RegulationLocation)
352     */
353    public void transformEntities(final int transform, final Collection<?> entities);
354
355    // spring-dao merge-point
356}