1 package org.hibernate.test.legacy; 2 3 import java.io.Serializable ; 4 5 8 public class InnerKey implements Serializable { 9 private String akey; 10 private String bkey; 11 12 public String getAkey() { 13 return akey; 14 } 15 16 public void setAkey(String akey) { 17 this.akey = akey; 18 } 19 20 public String getBkey() { 21 return bkey; 22 } 23 24 public void setBkey(String bkey) { 25 this.bkey = bkey; 26 } 27 28 public boolean equals(Object o) { 29 if (this == o) return true; 30 if (!(o instanceof InnerKey)) return false; 31 32 final InnerKey cidSuperID = (InnerKey) o; 33 34 if (akey != null ? !akey.equals(cidSuperID.akey) : cidSuperID.akey != null) return false; 35 if (bkey != null ? !bkey.equals(cidSuperID.bkey) : cidSuperID.bkey != null) return false; 36 37 return true; 38 } 39 40 public int hashCode() { 41 int result; 42 result = (akey != null ? akey.hashCode() : 0); 43 result = 29 * result + (bkey != null ? bkey.hashCode() : 0); 44 return result; 45 } 46 } 47 | Popular Tags |