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.location.Location;
032import java.io.Serializable;
033
034/**
035 * 
036 */
037// HibernateEntity.vsl annotations merge-point
038public abstract class RegulationArea2RegulationLocation
039    implements Serializable, Comparable<RegulationArea2RegulationLocation>
040{
041    /**
042     * The serial version UID of this class. Needed for serialization.
043     */
044    private static final long serialVersionUID = -6439642326740917143L;
045
046    private RegulationArea2RegulationLocationPK regulationArea2RegulationLocationPk;
047
048    /**
049     * Get the composite primary key identifier class
050     * @return regulationArea2RegulationLocationPk
051     */
052    public RegulationArea2RegulationLocationPK getRegulationArea2RegulationLocationPk()
053    {
054        return this.regulationArea2RegulationLocationPk;
055    }
056
057    /**
058     * Set the composite primary key identifier class
059     * @param regulationArea2RegulationLocationPkIn
060     */
061    public void setRegulationArea2RegulationLocationPk(RegulationArea2RegulationLocationPK regulationArea2RegulationLocationPkIn) {
062        this.regulationArea2RegulationLocationPk = regulationArea2RegulationLocationPkIn;
063    }
064
065    // Generate 0 attributes
066    // Generate 2 associations
067    private Location location;
068
069    /**
070     * Représente un lieu au sens général du terme. Il peut s'agir d'un lieu ponctuel, linéaire ou
071     * surfacique.
072     * Suivant sa classification et son niveau, il peut s'agir d'un secteur FAO, un port de pêche,
073     * un
074     * quartier maritime, une criée, etc.
075     * Nombre de lignes : lieux terrestre : 4500 + secteurs : 11210 + strates : 1000 + localités :
076     * 200
077     * @return this.location Location
078     */
079    public Location getLocation()
080    {
081        return this.location;
082    }
083
084    /**
085     * Représente un lieu au sens général du terme. Il peut s'agir d'un lieu ponctuel, linéaire ou
086     * surfacique.
087     * Suivant sa classification et son niveau, il peut s'agir d'un secteur FAO, un port de pêche,
088     * un
089     * quartier maritime, une criée, etc.
090     * Nombre de lignes : lieux terrestre : 4500 + secteurs : 11210 + strates : 1000 + localités :
091     * 200
092     * @param locationIn Location
093     */
094    public void setLocation(Location locationIn)
095    {
096        this.location = locationIn;
097    }
098
099    private RegulationArea regulationArea;
100
101    /**
102     * 
103     * @return this.regulationArea RegulationArea
104     */
105    public RegulationArea getRegulationArea()
106    {
107        return this.regulationArea;
108    }
109
110    /**
111     * 
112     * @param regulationAreaIn RegulationArea
113     */
114    public void setRegulationArea(RegulationArea regulationAreaIn)
115    {
116        this.regulationArea = regulationAreaIn;
117    }
118
119    /**
120     * This entity does not have any identifiers
121     * and is not extending any other entity,
122     * so this method will only return <code>true</code> if the argument reference and <code>this</code>
123     * refer to the same object.
124     */
125    @Override
126    public boolean equals(Object object)
127    {
128        return super.equals(object);
129    }
130
131    /**
132     * This entity does not have any identifiers
133     * and is not extending any other entity,
134     * so this method will only take the identifiers of this entity into account when calculating the hash code.
135     */
136    @Override
137    public int hashCode()
138    {
139        return super.hashCode();
140    }
141
142    /**
143     * Constructs new instances of {@link RegulationArea2RegulationLocation}.
144     */
145    public static final class Factory
146    {
147        /**
148         * Constructs a new instance of {@link RegulationArea2RegulationLocation}.
149         * @return new RegulationArea2RegulationLocationImpl()
150         */
151        public static RegulationArea2RegulationLocation newInstance()
152        {
153            return new RegulationArea2RegulationLocationImpl();
154        }
155
156
157        /**
158         * Constructs a new instance of {@link RegulationArea2RegulationLocation}, taking all possible properties
159         * (except the identifier(s))as arguments.
160         * @param location Location
161         * @param regulationArea RegulationArea
162         * @return newInstance RegulationArea2RegulationLocation
163         */
164        public static RegulationArea2RegulationLocation newInstance(Location location, RegulationArea regulationArea)
165        {
166            final RegulationArea2RegulationLocation entity = new RegulationArea2RegulationLocationImpl();
167            entity.setLocation(location);
168            entity.setRegulationArea(regulationArea);
169            return entity;
170        }
171    }
172
173    /**
174     * @see Comparable#compareTo
175     */
176    public int compareTo(RegulationArea2RegulationLocation o)
177    {
178        int cmp = 0;
179        if (this.getRegulationArea2RegulationLocationPk() != null)
180        {
181            cmp = this.getRegulationArea2RegulationLocationPk().compareTo(o.getRegulationArea2RegulationLocationPk());
182        }
183        return cmp;
184    }
185// HibernateEntity.vsl merge-point
186// RegulationArea2RegulationLocation.java merge-point
187}