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.administration.programStrategy.Program;
033import java.sql.Timestamp;
034import java.util.Collection;
035import java.util.Date;
036import java.util.Set;
037import org.andromda.spring.PaginationResult;
038
039/**
040 * <html>
041 * <head>
042 * </head>
043 * <body>
044 * <p>
045 * Armateur (ou propri&#233;taire) de navire(s). Personne physique ou morale.
046 * </p>
047 * <p>
048 * </p>
049 * <p>
050 * Dans le cas de pecheur &#224; pied ou groupement de navires, <i>VesselOwner</i>
051 * permet aussi de porter les informations sur le pecheur &#224; pied, ou sur le
052 * responsable du groupement de navire.
053 * </p>
054 * <p>
055 * </p>
056 * <p>
057 * Nombre de lignes : 20900
058 * </p>
059 * </body>
060 * </html>
061 * @see VesselOwner
062 */
063public interface VesselOwnerDao
064{
065    /**
066     * This constant is used as a transformation flag; entities can be converted automatically into value objects
067     * or other types, different methods in a class implementing this interface support this feature: look for
068     * an <code>int</code> parameter called <code>transform</code>.
069     * <p>
070     * This specific flag denotes no transformation will occur.
071     */
072    public static final int TRANSFORM_NONE = 0;
073
074
075    /**
076     * Transforms the given results to a collection of {@link VesselOwner}
077     * instances (this is useful when the returned results contains a row of data and you want just entities only).
078     *
079     * @param results the query results.
080     */
081    public void toEntities(final Collection<?> results);
082
083    /**
084     * Gets an instance of VesselOwner from the persistent store.
085     * @param id
086     * @return VesselOwner
087     */
088    public VesselOwner get(Integer id);
089
090    /**
091     * <p>
092     * Does the same thing as {@link #get(Integer)} with an
093     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
094     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
095     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
096     * optionally transform the entity (into a value object for example). By default, transformation does
097     * not occur.
098     * </p>
099     *
100     * @param transform flag to determine transformation type.
101     * @param id the identifier of the entity to get.
102     * @return either the entity or the object transformed from the entity.
103     */
104    public Object get(int transform, Integer id);
105
106    /**
107     * Loads an instance of VesselOwner from the persistent store.
108     * @param id
109     * @return VesselOwner
110     */
111    public VesselOwner load(Integer id);
112
113    /**
114     * <p>
115     * Does the same thing as {@link #load(Integer)} with an
116     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
117     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
118     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
119     * optionally transform the entity (into a value object for example). By default, transformation does
120     * not occur.
121     * </p>
122     *
123     * @param transform flag to determine transformation type.
124     * @param id the identifier of the entity to load.
125     * @return either the entity or the object transformed from the entity.
126     */
127    public Object load(int transform, Integer id);
128
129    /**
130     * Loads all entities of type {@link VesselOwner}.
131     *
132     * @return the loaded entities.
133     */
134    public Collection<VesselOwner> loadAll();
135
136    /**
137     * <p>
138     * Does the same thing as {@link #loadAll()} with an
139     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
140     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
141     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
142     * transform the entity (into a value object for example). By default, transformation does
143     * not occur.
144     * </p>
145     *
146     * @param transform the flag indicating what transformation to use.
147     * @return the loaded entities.
148     */
149    public Collection<?> loadAll(final int transform);
150
151    /**
152     * <p>
153     * Does the same thing as {@link #loadAll()} with an
154     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
155     * 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
156     * page retrieved.
157     * </p>
158     *
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 pageNumber, final int pageSize);
164
165    /**
166     * <p>
167     * Does the same thing as {@link #loadAll(int)} with an
168     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
169     * 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
170     * page retrieved.
171     * </p>
172     *
173     * @param transform the flag indicating what transformation to use.
174     * @param pageNumber the page number to retrieve when paging results.
175     * @param pageSize the size of the page to retrieve when paging results.
176     * @return the loaded entities.
177     */
178    public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize);
179
180    /**
181     * Creates an instance of VesselOwner and adds it to the persistent store.
182     * @param vesselOwner
183     * @return VesselOwner
184     */
185    public VesselOwner create(VesselOwner vesselOwner);
186
187    /**
188     * <p>
189     * Does the same thing as {@link #create(VesselOwner)} with an
190     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
191     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
192     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
193     * transform the entity (into a value object for example). By default, transformation does
194     * not occur.
195     * </p>
196     * @param transform
197     * @param vesselOwner
198     * @return Object
199     */
200    public Object create(int transform, VesselOwner vesselOwner);
201
202    /**
203     * Creates a new instance of VesselOwner and adds
204     * from the passed in <code>entities</code> collection
205     *
206     * @param entities the collection of VesselOwner
207     * instances to create.
208     *
209     * @return the created instances.
210     */
211    public Collection<VesselOwner> create(Collection<VesselOwner> entities);
212
213    /**
214     * <p>
215     * Does the same thing as {@link #create(VesselOwner)} with an
216     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
217     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
218     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
219     * transform the entities (into value objects for example). By default, transformation does
220     * not occur.
221     * </p>
222     * @param transform
223     * @param entities
224     * @return Collection
225     */
226    public Collection<?> create(int transform, Collection<VesselOwner> entities);
227
228    /**
229     * <p>
230     * Creates a new <code>VesselOwner</code>
231     * instance from <strong>all</strong> attributes and adds it to
232     * the persistent store.
233     * </p>
234     * @param registrationCode Code administratif identifiant le propriétaire. Généralement unique par pays.
235En france : code affecté par la direction des peche.
236Dans certains pays, cela peut etre le numéro de la carte d'identité (ID card number).
237     * @param lastname 
238     * @param firstname 
239     * @param street Rue de l'armateur
240     * @param zipCode code postale de l'armateur
241     * @param city Ville de l'armateur
242     * @param address <html>
243<head>
244</head>
245<body>
246<p>
247Adresse de l'armateur (<u>calcul&#233;</u> automatiquement &#224; partir de
248street, zipCode et city)
249</p>
250</body>
251</html>
252     * @param dateOfBirth Date de naissance de l'armateur
253     * @param retirementDate Date du dernier jour d'activité (retraite)
254     * @param isInRetirement L'armateur est il en retraite, à la date du système (calculé à partir de la date retirementDate)
255     * @param updateDate 
256     * @param phoneNumber 
257     * @param mobileNumber 
258     * @param faxNumber 
259     * @param email 
260     * @param activityStartDate Date de début d'activité de la personne, en tant qu'armateur.
261     * @return VesselOwner
262     */
263    public VesselOwner create(
264        String registrationCode,
265        String lastname,
266        String firstname,
267        String street,
268        String zipCode,
269        String city,
270        String address,
271        Date dateOfBirth,
272        Date retirementDate,
273        Boolean isInRetirement,
274        Timestamp updateDate,
275        String phoneNumber,
276        String mobileNumber,
277        String faxNumber,
278        String email,
279        Date activityStartDate);
280
281    /**
282     * <p>
283     * Does the same thing as {@link #create(String, String, String, String, String, String, String, Date, Date, Boolean, Timestamp, String, String, String, String, Date)} with an
284     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
285     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
286     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
287     * transform the entity (into a value object for example). By default, transformation does
288     * not occur.
289     * </p>
290     * @param transform
291     * @param registrationCode Code administratif identifiant le propriétaire. Généralement unique par pays.
292En france : code affecté par la direction des peche.
293Dans certains pays, cela peut etre le numéro de la carte d'identité (ID card number).
294     * @param lastname 
295     * @param firstname 
296     * @param street Rue de l'armateur
297     * @param zipCode code postale de l'armateur
298     * @param city Ville de l'armateur
299     * @param address <html>
300<head>
301</head>
302<body>
303<p>
304Adresse de l'armateur (<u>calcul&#233;</u> automatiquement &#224; partir de
305street, zipCode et city)
306</p>
307</body>
308</html>
309     * @param dateOfBirth Date de naissance de l'armateur
310     * @param retirementDate Date du dernier jour d'activité (retraite)
311     * @param isInRetirement L'armateur est il en retraite, à la date du système (calculé à partir de la date retirementDate)
312     * @param updateDate 
313     * @param phoneNumber 
314     * @param mobileNumber 
315     * @param faxNumber 
316     * @param email 
317     * @param activityStartDate Date de début d'activité de la personne, en tant qu'armateur.
318     * @return VesselOwner
319     */
320    public Object create(
321        int transform,
322        String registrationCode,
323        String lastname,
324        String firstname,
325        String street,
326        String zipCode,
327        String city,
328        String address,
329        Date dateOfBirth,
330        Date retirementDate,
331        Boolean isInRetirement,
332        Timestamp updateDate,
333        String phoneNumber,
334        String mobileNumber,
335        String faxNumber,
336        String email,
337        Date activityStartDate);
338
339    /**
340     * <p>
341     * Creates a new <code>VesselOwner</code>
342     * instance from only <strong>required</strong> properties (attributes
343     * and association ends) and adds it to the persistent store.
344     * </p>
345     * @param program
346     * @param updateDate
347     * @return VesselOwner
348     */
349    public VesselOwner create(
350        Program program,
351        Timestamp updateDate);
352
353    /**
354     * <p>
355     * Does the same thing as {@link #create(Timestamp)} with an
356     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
357     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
358     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
359     * transform the entity (into a value object for example). By default, transformation does
360     * not occur.
361     * </p>
362     * @param transform flag to determine transformation type.
363     * @param program
364     * @param updateDate
365     * @return Object
366     */
367    public Object create(
368        int transform,
369        Program program,
370        Timestamp updateDate);
371
372    /**
373     * Updates the <code>vesselOwner</code> instance in the persistent store.
374     * @param vesselOwner
375     */
376    public void update(VesselOwner vesselOwner);
377
378    /**
379     * Updates all instances in the <code>entities</code> collection in the persistent store.
380     * @param entities
381     */
382    public void update(Collection<VesselOwner> entities);
383
384    /**
385     * Removes the instance of VesselOwner from the persistent store.
386     * @param vesselOwner
387     */
388    public void remove(VesselOwner vesselOwner);
389
390    /**
391     * Removes the instance of VesselOwner having the given
392     * <code>identifier</code> from the persistent store.
393     * @param id
394     */
395    public void remove(Integer id);
396
397    /**
398     * Removes all entities in the given <code>entities</code> collection.
399     * @param entities
400     */
401    public void remove(Collection<VesselOwner> entities);
402
403
404    /**
405     * Does the same thing as {@link #search(int, Search)} but with an
406     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
407     * limit your data to a specified page number and size.
408     *
409     * @param transform the transformation flag.
410     * @param pageNumber the page number in the data to retrieve
411     * @param pageSize the size of the page to retrieve.
412     * @param search the search object which provides the search parameters and pagination specification.
413     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
414     */
415    public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search);
416
417    /**
418     * Does the same thing as {@link #search(Search)} but with an
419     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
420     * limit your data to a specified page number and size.
421     *
422     * @param pageNumber the page number in the data to retrieve
423     * @param pageSize the size of the page to retrieve.
424     * @param search the search object which provides the search parameters and pagination specification.
425     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
426     */
427    public PaginationResult search(final int pageNumber, final int pageSize, final Search search);
428
429    /**
430     * Does the same thing as {@link #search(Search)} but with an
431     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
432     * finder results will <strong>NOT</strong> be transformed during retrieval.
433     * If this flag is any of the other constants defined here
434     * then results <strong>WILL BE</strong> passed through an operation which can optionally
435     * transform the entities (into value objects for example). By default, transformation does
436     * not occur.
437     *
438     * @param transform the transformation flag.
439     * @param search the search object which provides the search parameters and pagination specification.
440     * @return any found results from the search.
441     */
442    public Set<?> search(final int transform, final Search search);
443
444    /**
445     * Performs a search using the parameters specified in the given <code>search</code> object.
446     *
447     * @param search the search object which provides the search parameters and pagination specification.
448     * @return any found results from the search.
449     */
450    public Set<VesselOwner> search(final Search search);
451
452    /**
453     * Allows transformation of entities into value objects
454     * (or something else for that matter), when the <code>transform</code>
455     * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.data.vessel.VesselOwnerDao</code>, please note
456     * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself
457     * will be returned.
458     *
459     * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed.
460     *
461     * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.data.vessel.VesselOwnerDao}
462     * @param entity an entity that was found
463     * @return the transformed entity (i.e. new value object, etc)
464     * @see #transformEntities(int,Collection)
465     */
466    public Object transformEntity(final int transform, final VesselOwner entity);
467
468    /**
469     * Transforms a collection of entities using the
470     * {@link #transformEntity(int,VesselOwner)}
471     * method. This method does not instantiate a new collection.
472     * <p>
473     * This method is to be used internally only.
474     *
475     * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.data.vessel.VesselOwnerDao</code>
476     * @param entities the collection of entities to transform
477     * @see #transformEntity(int,VesselOwner)
478     */
479    public void transformEntities(final int transform, final Collection<?> entities);
480
481    // spring-dao merge-point
482}