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.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.data.survey.fishingTrip.FishingTrip;
032import java.io.Serializable;
033
034/**
035 * Capitaine (patron) de navire pour la marée, et ordre de hiérarchie.
036 * A interpreter (une fois les données connues) et remodeliser.
037 * ref : flux SACAPT
038 */
039// HibernateEntity.vsl annotations merge-point
040public abstract class PlaygroundFishingTripVesselMaster
041    implements Serializable, Comparable<PlaygroundFishingTripVesselMaster>
042{
043    /**
044     * The serial version UID of this class. Needed for serialization.
045     */
046    private static final long serialVersionUID = 7009089534124415157L;
047
048    private PlaygroundFishingTripVesselMasterPK playgroundFishingTripVesselMasterPk;
049
050    /**
051     * Get the composite primary key identifier class
052     * @return playgroundFishingTripVesselMasterPk
053     */
054    public PlaygroundFishingTripVesselMasterPK getPlaygroundFishingTripVesselMasterPk()
055    {
056        return this.playgroundFishingTripVesselMasterPk;
057    }
058
059    /**
060     * Set the composite primary key identifier class
061     * @param playgroundFishingTripVesselMasterPkIn
062     */
063    public void setPlaygroundFishingTripVesselMasterPk(PlaygroundFishingTripVesselMasterPK playgroundFishingTripVesselMasterPkIn) {
064        this.playgroundFishingTripVesselMasterPk = playgroundFishingTripVesselMasterPkIn;
065    }
066
067    // Generate 1 attributes
068    /**
069     * Numéro d'ordre du patron de peche, dans la marée.
070     * @return this.rank Integer
071     */
072    public Integer getRank()
073    {
074        return this.getPlaygroundFishingTripVesselMasterPk().getRank();
075    }
076
077    /**
078     * Numéro d'ordre du patron de peche, dans la marée.
079     * @param rankIn Integer
080     */
081    public void setRank(Integer rankIn)
082    {
083        this.getPlaygroundFishingTripVesselMasterPk().setRank(rankIn);
084    }
085
086    // Generate 2 associations
087    private FishingTrip fishingTrip;
088
089    /**
090     * Voyage en mer, ayant pour vocation une activité de peche (peut etre une campagnes halieutique
091     * ou une
092     * marée d'un navire professionnel, etc.)
093     * Un voyage peut représenter type de données :
094     * - Une marée observée (en mer, au débarquement), qui désigne une marée de pêche
095     * professionnelle au
096     * cours de laquelle des relevés sont effectués par un observateur.
097     * - Une marée déclarée. Principalement issue du log book électronique (flux SACAPT). Une marée
098     * déclarée peut etre un ensemble de marée ou de sous-ensembles de marée (Exemple de la fiche de
099     * peche)
100     * - une sortie effectuée lors d"une campagne scientifique
101     * @return this.fishingTrip FishingTrip
102     */
103    public FishingTrip getFishingTrip()
104    {
105        return this.fishingTrip;
106    }
107
108    /**
109     * Voyage en mer, ayant pour vocation une activité de peche (peut etre une campagnes halieutique
110     * ou une
111     * marée d'un navire professionnel, etc.)
112     * Un voyage peut représenter type de données :
113     * - Une marée observée (en mer, au débarquement), qui désigne une marée de pêche
114     * professionnelle au
115     * cours de laquelle des relevés sont effectués par un observateur.
116     * - Une marée déclarée. Principalement issue du log book électronique (flux SACAPT). Une marée
117     * déclarée peut etre un ensemble de marée ou de sous-ensembles de marée (Exemple de la fiche de
118     * peche)
119     * - une sortie effectuée lors d"une campagne scientifique
120     * @param fishingTripIn FishingTrip
121     */
122    public void setFishingTrip(FishingTrip fishingTripIn)
123    {
124        this.fishingTrip = fishingTripIn;
125    }
126
127    private PlaygroundVesselMaster playgroundVesselMaster;
128
129    /**
130     * Capitaine (patron) de navire.
131     * A interpreter (une fois les données connues) et remodeliser.
132     * ref : flux SACAPT
133     * @return this.playgroundVesselMaster PlaygroundVesselMaster
134     */
135    public PlaygroundVesselMaster getPlaygroundVesselMaster()
136    {
137        return this.playgroundVesselMaster;
138    }
139
140    /**
141     * Capitaine (patron) de navire.
142     * A interpreter (une fois les données connues) et remodeliser.
143     * ref : flux SACAPT
144     * @param playgroundVesselMasterIn PlaygroundVesselMaster
145     */
146    public void setPlaygroundVesselMaster(PlaygroundVesselMaster playgroundVesselMasterIn)
147    {
148        this.playgroundVesselMaster = playgroundVesselMasterIn;
149    }
150
151    /**
152     * Returns <code>true</code> if the argument is an PlaygroundFishingTripVesselMaster instance and all identifiers for this entity
153     * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
154     */
155    @Override
156    public boolean equals(Object object)
157    {
158        if (this == object)
159        {
160            return true;
161        }
162        if (!(object instanceof PlaygroundFishingTripVesselMaster))
163        {
164            return false;
165        }
166        final PlaygroundFishingTripVesselMaster that = (PlaygroundFishingTripVesselMaster)object;
167        if (this.playgroundFishingTripVesselMasterPk == null || that.playgroundFishingTripVesselMasterPk == null || !this.playgroundFishingTripVesselMasterPk.equals(that.playgroundFishingTripVesselMasterPk))
168        {
169            return false;
170        }
171        return true;
172    }
173
174    /**
175     * Returns a hash code based on this entity's identifiers.
176     */
177    @Override
178    public int hashCode()
179    {
180        int hashCode = 0;
181        hashCode = 29 * hashCode + (this.playgroundFishingTripVesselMasterPk == null ? 0 : this.playgroundFishingTripVesselMasterPk.hashCode());
182
183        return hashCode;
184    }
185
186    /**
187     * Constructs new instances of {@link PlaygroundFishingTripVesselMaster}.
188     */
189    public static final class Factory
190    {
191        /**
192         * Constructs a new instance of {@link PlaygroundFishingTripVesselMaster}.
193         * @return new PlaygroundFishingTripVesselMasterImpl()
194         */
195        public static PlaygroundFishingTripVesselMaster newInstance()
196        {
197            return new PlaygroundFishingTripVesselMasterImpl();
198        }
199
200
201        /**
202         * Constructs a new instance of {@link PlaygroundFishingTripVesselMaster}, taking all possible properties
203         * (except the identifier(s))as arguments.
204         * @param fishingTrip FishingTrip
205         * @param playgroundVesselMaster PlaygroundVesselMaster
206         * @return newInstance PlaygroundFishingTripVesselMaster
207         */
208        public static PlaygroundFishingTripVesselMaster newInstance(FishingTrip fishingTrip, PlaygroundVesselMaster playgroundVesselMaster)
209        {
210            final PlaygroundFishingTripVesselMaster entity = new PlaygroundFishingTripVesselMasterImpl();
211            entity.setFishingTrip(fishingTrip);
212            entity.setPlaygroundVesselMaster(playgroundVesselMaster);
213            return entity;
214        }
215    }
216
217    /**
218     * @see Comparable#compareTo
219     */
220    public int compareTo(PlaygroundFishingTripVesselMaster o)
221    {
222        int cmp = 0;
223        if (this.getPlaygroundFishingTripVesselMasterPk() != null)
224        {
225            cmp = this.getPlaygroundFishingTripVesselMasterPk().compareTo(o.getPlaygroundFishingTripVesselMasterPk());
226        }
227        
228        return cmp;
229    }
230// HibernateEntity.vsl merge-point
231// PlaygroundFishingTripVesselMaster.java merge-point
232}