1 package org.hibernate.test.legacy; 2 3 import java.io.Serializable ; 4 5 8 public class Outer implements Serializable { 9 private OuterKey id; 10 private String bubu; 11 12 public OuterKey getId() { 13 return id; 14 } 15 16 public void setId(OuterKey id) { 17 this.id = id; 18 } 19 20 public String getBubu() { 21 return bubu; 22 } 23 24 public void setBubu(String bubu) { 25 this.bubu = bubu; 26 } 27 28 public boolean equals(Object o) { 29 if (this == o) return true; 30 if (!(o instanceof Outer)) return false; 31 32 final Outer cidDetail = (Outer) o; 33 34 if (id != null ? !id.equals(cidDetail.id) : cidDetail.id != null) return false; 35 36 return true; 37 } 38 39 public int hashCode() { 40 return (id != null ? id.hashCode() : 0); 41 } 42 } 43 | Popular Tags |