1 package org.hibernate.test.legacy; 3 4 import java.io.Serializable ; 5 6 9 public class Up implements Serializable { 10 11 private String id1; 12 private long id2; 13 14 public String getId1() { 15 return id1; 16 } 17 18 public long getId2() { 19 return id2; 20 } 21 22 public void setId1(String string) { 23 id1 = string; 24 } 25 26 public void setId2(long l) { 27 id2 = l; 28 } 29 30 public boolean equals(Object other) { 31 if ( !(other instanceof Up) ) return false; 32 Up that = (Up) other; 33 return this.id1.equals(that.id1) && this.id2==that.id2; 34 } 35 public int hashCode() { 36 return id1.hashCode(); 37 } 38 39 } 40 | Popular Tags |