001// license-header java merge-point
002//
003// Attention: Generated code! Do not modify by hand!
004// Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge.
005//
006package fr.ifremer.adagio.core.dao.referential.regulation;
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.referential.metier.Metier;
032import java.io.Serializable;
033
034/**
035 * 
036 */
037// HibernateEntity.vsl annotations merge-point
038public abstract class Fishery2Metier
039    implements Serializable, Comparable<Fishery2Metier>
040{
041    /**
042     * The serial version UID of this class. Needed for serialization.
043     */
044    private static final long serialVersionUID = 1863806625719933362L;
045
046    private Fishery2MetierPK fishery2MetierPk;
047
048    /**
049     * Get the composite primary key identifier class
050     * @return fishery2MetierPk
051     */
052    public Fishery2MetierPK getFishery2MetierPk()
053    {
054        return this.fishery2MetierPk;
055    }
056
057    /**
058     * Set the composite primary key identifier class
059     * @param fishery2MetierPkIn
060     */
061    public void setFishery2MetierPk(Fishery2MetierPK fishery2MetierPkIn) {
062        this.fishery2MetierPk = fishery2MetierPkIn;
063    }
064
065    // Generate 0 attributes
066    // Generate 2 associations
067    private Fishery fishery;
068
069    /**
070     * <html>
071     * <head>
072     * </head>
073     * <body>
074     * Un pecherie, peut etre, si elle n'a pas d'engin, similaire &#224; un
075     * stock.<br><br><u>D&#233;finition
076     * </u>:<br>A unit determined by an authority or other entity that isengaged
077     * in raising and/or harvesting fish. Typically, the unit is defined in terms
078     * of some or all of the following: people involved, species or type of fish,
079     * area of water or seabed, method of fishing, class of boats and purpose of
080     * the activities.<br><br><font size="-2">Fletcher, W.J., Chesson, J. Fisher,
081     * M., Sainsbury K.J., Hundloe, T. Smith A.D.M., and B. Whitworth (2002):
082     * National ESD reporting framework for Australian fisheries: The &quot;How To&quot;
083     * guide for wild capture fisheries. FRDC Project 2000/145. Canberra,
084     * Australia</font>
085     * </body>
086     * </html>
087     * @return this.fishery Fishery
088     */
089    public Fishery getFishery()
090    {
091        return this.fishery;
092    }
093
094    /**
095     * <html>
096     * <head>
097     * </head>
098     * <body>
099     * Un pecherie, peut etre, si elle n'a pas d'engin, similaire &#224; un
100     * stock.<br><br><u>D&#233;finition
101     * </u>:<br>A unit determined by an authority or other entity that isengaged
102     * in raising and/or harvesting fish. Typically, the unit is defined in terms
103     * of some or all of the following: people involved, species or type of fish,
104     * area of water or seabed, method of fishing, class of boats and purpose of
105     * the activities.<br><br><font size="-2">Fletcher, W.J., Chesson, J. Fisher,
106     * M., Sainsbury K.J., Hundloe, T. Smith A.D.M., and B. Whitworth (2002):
107     * National ESD reporting framework for Australian fisheries: The &quot;How To&quot;
108     * guide for wild capture fisheries. FRDC Project 2000/145. Canberra,
109     * Australia</font>
110     * </body>
111     * </html>
112     * @param fisheryIn Fishery
113     */
114    public void setFishery(Fishery fisheryIn)
115    {
116        this.fishery = fisheryIn;
117    }
118
119    private Metier metier;
120
121    /**
122     * <html>
123     * <head>
124     * </head>
125     * <body>
126     * <p>
127     * M&#233;tier, qui peut etre un m&#233;tier de peche ou non.<br><br>Un
128     * m&#233;tier de peche a obligatoirement une esp&#232;ce cible (TaxonGroup) de
129     * d&#233;fini, et &#233;ventuellement un engin (Gear).
130     * </p>
131     * <p>
132     * Dans ce cas, le nom (name) et le mn&#233;monique (label) pourront etre
133     * d&#233;termin&#233; par la concat&#233;nation de l'engin et de l'esp&#232;ce cible.
134     * </p>
135     * <p>
136     * <br>
137     * <br>
138     * </p>
139     * <p>
140     * <u>V2.1 </u>: modification de la gestion des m&#233;tiers : suppression des
141     * classes FishingMetierGearType et MetierSpecies : un m&#233;tier est
142     * maintenant d&#233;fini directement par Gear et TaxonGroup.<br><br>=&gt; Le
143     * r&#233;f&#233;rentiel des engin du m&#233;tier (FishingMetierGearType) est maintenent
144     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des engins<br>
145     * </p>
146     * <p>
147     * </p>
148     * <p>
149     * =&gt; Le r&#233;f&#233;rentiel des esp&#232;ces m&#233;tier (MetierSpecies) est maintenent
150     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des groupes de taxon<br><br>
151     * </p>
152     * <p>
153     * <u>V3 </u>:<br>- Le m&#233;tier de peche n'a pas forc&#233;ment d'engin
154     * (optionnel) Ex : AQUNEP
155     * </p>
156     * <p>
157     * (Aquaculture)<br>- le mn&#233;monique et le libell&#233; ne sont plus calcul&#233;s &#224;
158     * la vol&#233;e par concat&#233;nation, pour permettre l'utilisation de libell&#233; plus
159     * court..
160     * </p>
161     * </body>
162     * </html>
163     * @return this.metier Metier
164     */
165    public Metier getMetier()
166    {
167        return this.metier;
168    }
169
170    /**
171     * <html>
172     * <head>
173     * </head>
174     * <body>
175     * <p>
176     * M&#233;tier, qui peut etre un m&#233;tier de peche ou non.<br><br>Un
177     * m&#233;tier de peche a obligatoirement une esp&#232;ce cible (TaxonGroup) de
178     * d&#233;fini, et &#233;ventuellement un engin (Gear).
179     * </p>
180     * <p>
181     * Dans ce cas, le nom (name) et le mn&#233;monique (label) pourront etre
182     * d&#233;termin&#233; par la concat&#233;nation de l'engin et de l'esp&#232;ce cible.
183     * </p>
184     * <p>
185     * <br>
186     * <br>
187     * </p>
188     * <p>
189     * <u>V2.1 </u>: modification de la gestion des m&#233;tiers : suppression des
190     * classes FishingMetierGearType et MetierSpecies : un m&#233;tier est
191     * maintenant d&#233;fini directement par Gear et TaxonGroup.<br><br>=&gt; Le
192     * r&#233;f&#233;rentiel des engin du m&#233;tier (FishingMetierGearType) est maintenent
193     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des engins<br>
194     * </p>
195     * <p>
196     * </p>
197     * <p>
198     * =&gt; Le r&#233;f&#233;rentiel des esp&#232;ces m&#233;tier (MetierSpecies) est maintenent
199     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des groupes de taxon<br><br>
200     * </p>
201     * <p>
202     * <u>V3 </u>:<br>- Le m&#233;tier de peche n'a pas forc&#233;ment d'engin
203     * (optionnel) Ex : AQUNEP
204     * </p>
205     * <p>
206     * (Aquaculture)<br>- le mn&#233;monique et le libell&#233; ne sont plus calcul&#233;s &#224;
207     * la vol&#233;e par concat&#233;nation, pour permettre l'utilisation de libell&#233; plus
208     * court..
209     * </p>
210     * </body>
211     * </html>
212     * @param metierIn Metier
213     */
214    public void setMetier(Metier metierIn)
215    {
216        this.metier = metierIn;
217    }
218
219    /**
220     * This entity does not have any identifiers
221     * and is not extending any other entity,
222     * so this method will only return <code>true</code> if the argument reference and <code>this</code>
223     * refer to the same object.
224     */
225    @Override
226    public boolean equals(Object object)
227    {
228        return super.equals(object);
229    }
230
231    /**
232     * This entity does not have any identifiers
233     * and is not extending any other entity,
234     * so this method will only take the identifiers of this entity into account when calculating the hash code.
235     */
236    @Override
237    public int hashCode()
238    {
239        return super.hashCode();
240    }
241
242    /**
243     * Constructs new instances of {@link Fishery2Metier}.
244     */
245    public static final class Factory
246    {
247        /**
248         * Constructs a new instance of {@link Fishery2Metier}.
249         * @return new Fishery2MetierImpl()
250         */
251        public static Fishery2Metier newInstance()
252        {
253            return new Fishery2MetierImpl();
254        }
255
256
257        /**
258         * Constructs a new instance of {@link Fishery2Metier}, taking all possible properties
259         * (except the identifier(s))as arguments.
260         * @param fishery Fishery
261         * @param metier Metier
262         * @return newInstance Fishery2Metier
263         */
264        public static Fishery2Metier newInstance(Fishery fishery, Metier metier)
265        {
266            final Fishery2Metier entity = new Fishery2MetierImpl();
267            entity.setFishery(fishery);
268            entity.setMetier(metier);
269            return entity;
270        }
271    }
272
273    /**
274     * @see Comparable#compareTo
275     */
276    public int compareTo(Fishery2Metier o)
277    {
278        int cmp = 0;
279        if (this.getFishery2MetierPk() != null)
280        {
281            cmp = this.getFishery2MetierPk().compareTo(o.getFishery2MetierPk());
282        }
283        return cmp;
284    }
285// HibernateEntity.vsl merge-point
286// Fishery2Metier.java merge-point
287}