001// license-header java merge-point
002//
003// Attention: Generated code! Do not modify by hand!
004// Generated by: hibernate/HibernateEntityPK.vsl in andromda-hibernate-cartridge.
005//
006package fr.ifremer.adagio.core.dao.data.samplingScheme;
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.regulation.FisheryImpl;
032import java.io.Serializable;
033import org.apache.commons.lang3.builder.EqualsBuilder;
034import org.apache.commons.lang3.builder.HashCodeBuilder;
035
036/**
037 * Primary key class for SamplingStrata2Fishery
038 */
039public class SamplingStrata2FisheryPK implements Serializable, Comparable<SamplingStrata2FisheryPK>
040{
041    /**
042     * The serial version UID of this class. Needed for serialization.
043     */
044    private static final long serialVersionUID = -7920775948918526969L;
045
046    public SamplingStrata2FisheryPK()
047    {
048    }
049
050    public SamplingStrata2FisheryPK(FisheryImpl fishery, SamplingStrataImpl samplingStrata)
051    {
052        this.fishery = fishery;
053        this.samplingStrata = samplingStrata;
054    }
055
056    private FisheryImpl fishery;
057
058    public FisheryImpl getFishery()
059    {
060        return this.fishery;
061    }
062
063    public void setFishery(FisheryImpl fishery)
064    {
065        this.fishery = fishery;
066    }
067
068    private SamplingStrataImpl samplingStrata;
069
070    public SamplingStrataImpl getSamplingStrata()
071    {
072        return this.samplingStrata;
073    }
074
075    public void setSamplingStrata(SamplingStrataImpl samplingStrata)
076    {
077        this.samplingStrata = samplingStrata;
078    }
079
080    @Override
081    public boolean equals(Object object)
082    {
083        if (this == object)
084        {
085            return true;
086        }
087        if (!(object instanceof SamplingStrata2FisheryPK))
088        {
089            return false;
090        }
091        final SamplingStrata2FisheryPK that = (SamplingStrata2FisheryPK)object;
092        return new EqualsBuilder()
093            .append(this.getFishery(),that.getFishery())
094            .append(this.getSamplingStrata(),that.getSamplingStrata())
095            .isEquals();
096    }
097
098    @Override
099    public int hashCode()
100    {
101        return new HashCodeBuilder()
102            .append(getFishery())
103            .append(getSamplingStrata())
104            .toHashCode();
105    }
106
107    /**
108     * @see Comparable#compareTo
109     */
110    @Override
111    public int compareTo(SamplingStrata2FisheryPK o)
112    {
113        int cmp = 0;
114        return cmp;
115    }
116}