public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof Person4)) return false; Person4 p0 = (Person4) o; PersonId4 id0 = p0.getId(); if (!id.equals(id0)) return false; MedicalHistory4 medical0 = p0.getMedical(); if (medical != null && !medical.patient.getId().equals(medical0.patient.getId())) return false; if (medical == null && medical0 != null) return false; return true; }
public int hashCode() { int ret = 0; ret = ret * 31 + id.hashCode(); if (medical != null) ret = ret * 31 + medical.hashCode(); return ret; }