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 java.io.Serializable; 032import org.apache.commons.lang3.builder.EqualsBuilder; 033import org.apache.commons.lang3.builder.HashCodeBuilder; 034 035/** 036 * Primary key class for BatchModelAppliedStrategy 037 */ 038public class BatchModelAppliedStrategyPK implements Serializable, Comparable<BatchModelAppliedStrategyPK> 039{ 040 /** 041 * The serial version UID of this class. Needed for serialization. 042 */ 043 private static final long serialVersionUID = -24071804155122521L; 044 045 public BatchModelAppliedStrategyPK() 046 { 047 } 048 049 public BatchModelAppliedStrategyPK(AcquisitionLevelImpl acquisitionLevel, AppliedStrategyImpl appliedStrategy) 050 { 051 this.acquisitionLevel = acquisitionLevel; 052 this.appliedStrategy = appliedStrategy; 053 } 054 055 private AcquisitionLevelImpl acquisitionLevel; 056 057 public AcquisitionLevelImpl getAcquisitionLevel() 058 { 059 return this.acquisitionLevel; 060 } 061 062 public void setAcquisitionLevel(AcquisitionLevelImpl acquisitionLevel) 063 { 064 this.acquisitionLevel = acquisitionLevel; 065 } 066 067 private AppliedStrategyImpl appliedStrategy; 068 069 public AppliedStrategyImpl getAppliedStrategy() 070 { 071 return this.appliedStrategy; 072 } 073 074 public void setAppliedStrategy(AppliedStrategyImpl appliedStrategy) 075 { 076 this.appliedStrategy = appliedStrategy; 077 } 078 079 @Override 080 public boolean equals(Object object) 081 { 082 if (this == object) 083 { 084 return true; 085 } 086 if (!(object instanceof BatchModelAppliedStrategyPK)) 087 { 088 return false; 089 } 090 final BatchModelAppliedStrategyPK that = (BatchModelAppliedStrategyPK)object; 091 return new EqualsBuilder() 092 .append(this.getAcquisitionLevel(),that.getAcquisitionLevel()) 093 .append(this.getAppliedStrategy(),that.getAppliedStrategy()) 094 .isEquals(); 095 } 096 097 @Override 098 public int hashCode() 099 { 100 return new HashCodeBuilder() 101 .append(getAcquisitionLevel()) 102 .append(getAppliedStrategy()) 103 .toHashCode(); 104 } 105 106 /** 107 * @see Comparable#compareTo 108 */ 109 @Override 110 public int compareTo(BatchModelAppliedStrategyPK o) 111 { 112 int cmp = 0; 113 return cmp; 114 } 115}