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.administration.programStrategy;
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.vessel.VesselImpl;
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 Program2PersonException
038 */
039public class Program2PersonExceptionPK implements Serializable, Comparable<Program2PersonExceptionPK>
040{
041    /**
042     * The serial version UID of this class. Needed for serialization.
043     */
044    private static final long serialVersionUID = -8636551040145566196L;
045
046    public Program2PersonExceptionPK()
047    {
048    }
049
050    public Program2PersonExceptionPK(VesselImpl vessel, Program2PersonImpl program2Person)
051    {
052        this.vessel = vessel;
053        this.program2Person = program2Person;
054    }
055
056    private VesselImpl vessel;
057
058    public VesselImpl getVessel()
059    {
060        return this.vessel;
061    }
062
063    public void setVessel(VesselImpl vessel)
064    {
065        this.vessel = vessel;
066    }
067
068    private Program2PersonImpl program2Person;
069
070    public Program2PersonImpl getProgram2Person()
071    {
072        return this.program2Person;
073    }
074
075    public void setProgram2Person(Program2PersonImpl program2Person)
076    {
077        this.program2Person = program2Person;
078    }
079
080    @Override
081    public boolean equals(Object object)
082    {
083        if (this == object)
084        {
085            return true;
086        }
087        if (!(object instanceof Program2PersonExceptionPK))
088        {
089            return false;
090        }
091        final Program2PersonExceptionPK that = (Program2PersonExceptionPK)object;
092        return new EqualsBuilder()
093            .append(this.getVessel(),that.getVessel())
094            .append(this.getProgram2Person(),that.getProgram2Person())
095            .isEquals();
096    }
097
098    @Override
099    public int hashCode()
100    {
101        return new HashCodeBuilder()
102            .append(getVessel())
103            .append(getProgram2Person())
104            .toHashCode();
105    }
106
107    /**
108     * @see Comparable#compareTo
109     */
110    @Override
111    public int compareTo(Program2PersonExceptionPK o)
112    {
113        int cmp = 0;
114        return cmp;
115    }
116}