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