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.measure;
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.vessel.feature.physical.VesselPhysicalFeatures;
033import fr.ifremer.adagio.core.dao.referential.QualityFlag;
034import fr.ifremer.adagio.core.dao.referential.pmfm.Pmfm;
035import java.util.Collection;
036import java.util.Date;
037import java.util.Set;
038import org.andromda.spring.PaginationResult;
039
040/**
041 *
042 * @see VesselPhysicalMeasurement
043 */
044public interface VesselPhysicalMeasurementDao
045{
046    /**
047     * This constant is used as a transformation flag; entities can be converted automatically into value objects
048     * or other types, different methods in a class implementing this interface support this feature: look for
049     * an <code>int</code> parameter called <code>transform</code>.
050     * <p>
051     * This specific flag denotes no transformation will occur.
052     */
053    public static final int TRANSFORM_NONE = 0;
054
055
056    /**
057     * Transforms the given results to a collection of {@link VesselPhysicalMeasurement}
058     * instances (this is useful when the returned results contains a row of data and you want just entities only).
059     *
060     * @param results the query results.
061     */
062    public void toEntities(final Collection<?> results);
063
064    /**
065     * Gets an instance of VesselPhysicalMeasurement from the persistent store.
066     * @param id
067     * @return VesselPhysicalMeasurement
068     */
069    public VesselPhysicalMeasurement get(Integer id);
070
071    /**
072     * <p>
073     * Does the same thing as {@link #get(Integer)} with an
074     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
075     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
076     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
077     * optionally transform the entity (into a value object for example). By default, transformation does
078     * not occur.
079     * </p>
080     *
081     * @param transform flag to determine transformation type.
082     * @param id the identifier of the entity to get.
083     * @return either the entity or the object transformed from the entity.
084     */
085    public Object get(int transform, Integer id);
086
087    /**
088     * Loads an instance of VesselPhysicalMeasurement from the persistent store.
089     * @param id
090     * @return VesselPhysicalMeasurement
091     */
092    public VesselPhysicalMeasurement load(Integer id);
093
094    /**
095     * <p>
096     * Does the same thing as {@link #load(Integer)} with an
097     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
098     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
099     * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can
100     * optionally transform the entity (into a value object for example). By default, transformation does
101     * not occur.
102     * </p>
103     *
104     * @param transform flag to determine transformation type.
105     * @param id the identifier of the entity to load.
106     * @return either the entity or the object transformed from the entity.
107     */
108    public Object load(int transform, Integer id);
109
110    /**
111     * Loads all entities of type {@link VesselPhysicalMeasurement}.
112     *
113     * @return the loaded entities.
114     */
115    public Collection<VesselPhysicalMeasurement> loadAll();
116
117    /**
118     * <p>
119     * Does the same thing as {@link #loadAll()} with an
120     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
121     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
122     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
123     * transform the entity (into a value object for example). By default, transformation does
124     * not occur.
125     * </p>
126     *
127     * @param transform the flag indicating what transformation to use.
128     * @return the loaded entities.
129     */
130    public Collection<?> loadAll(final int transform);
131
132    /**
133     * <p>
134     * Does the same thing as {@link #loadAll()} with an
135     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
136     * 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
137     * page retrieved.
138     * </p>
139     *
140     * @param pageNumber the page number to retrieve when paging results.
141     * @param pageSize the size of the page to retrieve when paging results.
142     * @return the loaded entities.
143     */
144    public Collection<?> loadAll(final int pageNumber, final int pageSize);
145
146    /**
147     * <p>
148     * Does the same thing as {@link #loadAll(int)} with an
149     * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code>
150     * 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
151     * page retrieved.
152     * </p>
153     *
154     * @param transform the flag indicating what transformation to use.
155     * @param pageNumber the page number to retrieve when paging results.
156     * @param pageSize the size of the page to retrieve when paging results.
157     * @return the loaded entities.
158     */
159    public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize);
160
161    /**
162     * Creates an instance of VesselPhysicalMeasurement and adds it to the persistent store.
163     * @param vesselPhysicalMeasurement
164     * @return VesselPhysicalMeasurement
165     */
166    public VesselPhysicalMeasurement create(VesselPhysicalMeasurement vesselPhysicalMeasurement);
167
168    /**
169     * <p>
170     * Does the same thing as {@link #create(VesselPhysicalMeasurement)} with an
171     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
172     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
173     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
174     * transform the entity (into a value object for example). By default, transformation does
175     * not occur.
176     * </p>
177     * @param transform
178     * @param vesselPhysicalMeasurement
179     * @return Object
180     */
181    public Object create(int transform, VesselPhysicalMeasurement vesselPhysicalMeasurement);
182
183    /**
184     * Creates a new instance of VesselPhysicalMeasurement and adds
185     * from the passed in <code>entities</code> collection
186     *
187     * @param entities the collection of VesselPhysicalMeasurement
188     * instances to create.
189     *
190     * @return the created instances.
191     */
192    public Collection<VesselPhysicalMeasurement> create(Collection<VesselPhysicalMeasurement> entities);
193
194    /**
195     * <p>
196     * Does the same thing as {@link #create(VesselPhysicalMeasurement)} 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 entities (into value objects for example). By default, transformation does
201     * not occur.
202     * </p>
203     * @param transform
204     * @param entities
205     * @return Collection
206     */
207    public Collection<?> create(int transform, Collection<VesselPhysicalMeasurement> entities);
208
209    /**
210     * <p>
211     * Creates a new <code>VesselPhysicalMeasurement</code>
212     * instance from <strong>all</strong> attributes and adds it to
213     * the persistent store.
214     * </p>
215     * @param numericalValue <html>
216<head>
217<title>V    </title>
218</head>
219<body>
220valeur num&#233;rique de la mesure.<br>Elle est n&#233;cessairement exprim&#233;e
221dans l'unit&#233; associ&#233; au PSFM de la mesure.
222<br>
223Renseign&#233; uniquement pour un PSFM num&#233;rique
224(PMFM.parameter.isQualitative=false)
225</body>
226</html>
227     * @param alphanumericalValue <html>
228<head>
229</head>
230<body>
231<p>
232Valeur alphanum&#233;rique de la mesure.
233<br>    </p>
234<p>
235<br>
236<u>Attention :</u> <b>Utilisation &#224; &#233;viter</b>. A utiliser
237uniquement dans des cas ou les valeurs qualitatives ne peuvent pas
238convenir (format non fixe, etc.).
239</p>
240<p>
241</p>
242<p>
243Exemples :<br>* Num&#233;ros de contrat (Ventre ERS)<br>* Type de
244dimension d'engin (logbook - flux SACAPT) &quot;2X60&quot;, &quot;2x6 dragues 75&quot;,
245&quot;13.9x2&quot;, &quot;2x7m&#178;&quot;, &quot;2x17.50&quot;, &quot;2m x 2&quot;, etc
246</p>
247</body>
248</html>
249     * @param digitCount <html>
250<head>
251</head>
252<body>
253<p>
254Nombre de digits saisis dans la valeur num&#233;rique de la mesure.
255</p>
256<p>
257</p>
258<p>
259Cela permet de stocker &quot;10.00&quot; (numericalvalue=10 et digitCount=2) et de
260pouvoir restituer la valeur sous la meme forme.
261</p>
262</body>
263</html>
264     * @param precisionValue <html>
265<head>
266</head>
267<body>
268<p>
269Pr&#233;cision de la mesure. Par exemple : precisioNValue=0.5 pour indiquer
270une pr&#233;cision &#224; + ou - &quot;0.5&quot;.
271<br>    </p>
272<p>
273</p>
274<p>
275Valeur exprim&#233;e soit dans l'unite de la mesure (ex : &quot;mm&quot;), soit en
276poucentage de la mesure (suivant la valeur de <i>PrecisionType</i>).
277</p>
278</body>
279</html>
280     * @param controlDate Date du controle de la donnée.
281Le controle est la première phase de validation de la donnée.
282Exemple :
283- Dans Allegro, ce controle est effectué lorsque l'utilisateur a achevé sa saisie et qu'il souhaite
284"Terminer la saisie", dans le but de transmettre ses données au système centrale. Les controle
285effectué par Allegro sur le poste client sont des vérifications sur les champs obligatoires, ou
286encore sur la cohérence des données (cas d'un arbre d'échantillonnage).
287     * @param validationDate Date de validation de la donnée.
288La validation est typiquement effectué par un thématicien responsable des données. Dans Allegro, il
289s'agit du superviseur du portefeuille de données qui en est responsable.
290     * @param qualificationDate Date de qualification de la donnée.
291L'étape de qualification est liée à l'affectation d'un flag qualité (bon, mauvais, etc.) sur la
292donnée.
293- la qualification n'est pas encore gérée dans Allegro, dans le sens ou il n'existe pass encore
294d'interface pour affecter le flag qualité. Par défaut, le niveau de qualité est donc à "non
295qualifiée"
296     * @param qualificationComments 
297     * @return VesselPhysicalMeasurement
298     */
299    public VesselPhysicalMeasurement create(
300        Float numericalValue,
301        String alphanumericalValue,
302        Integer digitCount,
303        Float precisionValue,
304        Date controlDate,
305        Date validationDate,
306        Date qualificationDate,
307        String qualificationComments);
308
309    /**
310     * <p>
311     * Does the same thing as {@link #create(Float, String, Integer, Float, Date, Date, Date, String)} with an
312     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
313     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
314     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
315     * transform the entity (into a value object for example). By default, transformation does
316     * not occur.
317     * </p>
318     * @param transform
319     * @param numericalValue <html>
320<head>
321<title>V    </title>
322</head>
323<body>
324valeur num&#233;rique de la mesure.<br>Elle est n&#233;cessairement exprim&#233;e
325dans l'unit&#233; associ&#233; au PSFM de la mesure.
326<br>
327Renseign&#233; uniquement pour un PSFM num&#233;rique
328(PMFM.parameter.isQualitative=false)
329</body>
330</html>
331     * @param alphanumericalValue <html>
332<head>
333</head>
334<body>
335<p>
336Valeur alphanum&#233;rique de la mesure.
337<br>    </p>
338<p>
339<br>
340<u>Attention :</u> <b>Utilisation &#224; &#233;viter</b>. A utiliser
341uniquement dans des cas ou les valeurs qualitatives ne peuvent pas
342convenir (format non fixe, etc.).
343</p>
344<p>
345</p>
346<p>
347Exemples :<br>* Num&#233;ros de contrat (Ventre ERS)<br>* Type de
348dimension d'engin (logbook - flux SACAPT) &quot;2X60&quot;, &quot;2x6 dragues 75&quot;,
349&quot;13.9x2&quot;, &quot;2x7m&#178;&quot;, &quot;2x17.50&quot;, &quot;2m x 2&quot;, etc
350</p>
351</body>
352</html>
353     * @param digitCount <html>
354<head>
355</head>
356<body>
357<p>
358Nombre de digits saisis dans la valeur num&#233;rique de la mesure.
359</p>
360<p>
361</p>
362<p>
363Cela permet de stocker &quot;10.00&quot; (numericalvalue=10 et digitCount=2) et de
364pouvoir restituer la valeur sous la meme forme.
365</p>
366</body>
367</html>
368     * @param precisionValue <html>
369<head>
370</head>
371<body>
372<p>
373Pr&#233;cision de la mesure. Par exemple : precisioNValue=0.5 pour indiquer
374une pr&#233;cision &#224; + ou - &quot;0.5&quot;.
375<br>    </p>
376<p>
377</p>
378<p>
379Valeur exprim&#233;e soit dans l'unite de la mesure (ex : &quot;mm&quot;), soit en
380poucentage de la mesure (suivant la valeur de <i>PrecisionType</i>).
381</p>
382</body>
383</html>
384     * @param controlDate Date du controle de la donnée.
385Le controle est la première phase de validation de la donnée.
386Exemple :
387- Dans Allegro, ce controle est effectué lorsque l'utilisateur a achevé sa saisie et qu'il souhaite
388"Terminer la saisie", dans le but de transmettre ses données au système centrale. Les controle
389effectué par Allegro sur le poste client sont des vérifications sur les champs obligatoires, ou
390encore sur la cohérence des données (cas d'un arbre d'échantillonnage).
391     * @param validationDate Date de validation de la donnée.
392La validation est typiquement effectué par un thématicien responsable des données. Dans Allegro, il
393s'agit du superviseur du portefeuille de données qui en est responsable.
394     * @param qualificationDate Date de qualification de la donnée.
395L'étape de qualification est liée à l'affectation d'un flag qualité (bon, mauvais, etc.) sur la
396donnée.
397- la qualification n'est pas encore gérée dans Allegro, dans le sens ou il n'existe pass encore
398d'interface pour affecter le flag qualité. Par défaut, le niveau de qualité est donc à "non
399qualifiée"
400     * @param qualificationComments 
401     * @return VesselPhysicalMeasurement
402     */
403    public Object create(
404        int transform,
405        Float numericalValue,
406        String alphanumericalValue,
407        Integer digitCount,
408        Float precisionValue,
409        Date controlDate,
410        Date validationDate,
411        Date qualificationDate,
412        String qualificationComments);
413
414    /**
415     * <p>
416     * Creates a new <code>VesselPhysicalMeasurement</code>
417     * instance from only <strong>required</strong> properties (attributes
418     * and association ends) and adds it to the persistent store.
419     * </p>
420     * @param pmfm
421     * @param qualityFlag
422     * @param vesselPhysicalFeatures
423     * @return VesselPhysicalMeasurement
424     */
425    public VesselPhysicalMeasurement create(
426        Pmfm pmfm,
427        QualityFlag qualityFlag,
428        VesselPhysicalFeatures vesselPhysicalFeatures);
429
430    /**
431     * <p>
432     * Does the same thing as {@link #create()} with an
433     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
434     * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants
435     * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally
436     * transform the entity (into a value object for example). By default, transformation does
437     * not occur.
438     * </p>
439     * @param transform flag to determine transformation type.
440     * @param pmfm
441     * @param qualityFlag
442     * @param vesselPhysicalFeatures
443     * @return Object
444     */
445    public Object create(
446        int transform,
447        Pmfm pmfm,
448        QualityFlag qualityFlag,
449        VesselPhysicalFeatures vesselPhysicalFeatures);
450
451    /**
452     * Updates the <code>vesselPhysicalMeasurement</code> instance in the persistent store.
453     * @param vesselPhysicalMeasurement
454     */
455    public void update(VesselPhysicalMeasurement vesselPhysicalMeasurement);
456
457    /**
458     * Updates all instances in the <code>entities</code> collection in the persistent store.
459     * @param entities
460     */
461    public void update(Collection<VesselPhysicalMeasurement> entities);
462
463    /**
464     * Removes the instance of VesselPhysicalMeasurement from the persistent store.
465     * @param vesselPhysicalMeasurement
466     */
467    public void remove(VesselPhysicalMeasurement vesselPhysicalMeasurement);
468
469    /**
470     * Removes the instance of VesselPhysicalMeasurement having the given
471     * <code>identifier</code> from the persistent store.
472     * @param id
473     */
474    public void remove(Integer id);
475
476    /**
477     * Removes all entities in the given <code>entities</code> collection.
478     * @param entities
479     */
480    public void remove(Collection<VesselPhysicalMeasurement> entities);
481
482
483    /**
484     * Does the same thing as {@link #search(int, Search)} but with an
485     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
486     * limit your data to a specified page number and size.
487     *
488     * @param transform the transformation flag.
489     * @param pageNumber the page number in the data to retrieve
490     * @param pageSize the size of the page to retrieve.
491     * @param search the search object which provides the search parameters and pagination specification.
492     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
493     */
494    public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search);
495
496    /**
497     * Does the same thing as {@link #search(Search)} but with an
498     * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to
499     * limit your data to a specified page number and size.
500     *
501     * @param pageNumber the page number in the data to retrieve
502     * @param pageSize the size of the page to retrieve.
503     * @param search the search object which provides the search parameters and pagination specification.
504     * @return any found results from the search wrapped in a {@link PaginationResult} instance.
505     */
506    public PaginationResult search(final int pageNumber, final int pageSize, final Search search);
507
508    /**
509     * Does the same thing as {@link #search(Search)} but with an
510     * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then
511     * finder results will <strong>NOT</strong> be transformed during retrieval.
512     * If this flag is any of the other constants defined here
513     * then results <strong>WILL BE</strong> passed through an operation which can optionally
514     * transform the entities (into value objects for example). By default, transformation does
515     * not occur.
516     *
517     * @param transform the transformation flag.
518     * @param search the search object which provides the search parameters and pagination specification.
519     * @return any found results from the search.
520     */
521    public Set<?> search(final int transform, final Search search);
522
523    /**
524     * Performs a search using the parameters specified in the given <code>search</code> object.
525     *
526     * @param search the search object which provides the search parameters and pagination specification.
527     * @return any found results from the search.
528     */
529    public Set<VesselPhysicalMeasurement> search(final Search search);
530
531    /**
532     * Allows transformation of entities into value objects
533     * (or something else for that matter), when the <code>transform</code>
534     * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.data.measure.VesselPhysicalMeasurementDao</code>, please note
535     * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself
536     * will be returned.
537     *
538     * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed.
539     *
540     * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.data.measure.VesselPhysicalMeasurementDao}
541     * @param entity an entity that was found
542     * @return the transformed entity (i.e. new value object, etc)
543     * @see #transformEntities(int,Collection)
544     */
545    public Object transformEntity(final int transform, final VesselPhysicalMeasurement entity);
546
547    /**
548     * Transforms a collection of entities using the
549     * {@link #transformEntity(int,VesselPhysicalMeasurement)}
550     * method. This method does not instantiate a new collection.
551     * <p>
552     * This method is to be used internally only.
553     *
554     * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.data.measure.VesselPhysicalMeasurementDao</code>
555     * @param entities the collection of entities to transform
556     * @see #transformEntity(int,VesselPhysicalMeasurement)
557     */
558    public void transformEntities(final int transform, final Collection<?> entities);
559
560    // spring-dao merge-point
561}