@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((banca == null) ? 0 : banca.hashCode()); result = prime * result + ((grau == null) ? 0 : grau.hashCode()); result = prime * result + idProva; result = prime * result + ((instituicao == null) ? 0 : instituicao.hashCode()); result = prime * result + ((nome == null) ? 0 : nome.hashCode()); result = prime * result + ((questaos == null) ? 0 : questaos.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Prova other = (Prova) obj; if (banca == null) { if (other.banca != null) return false; } else if (!banca.equals(other.banca)) return false; if (grau == null) { if (other.grau != null) return false; } else if (!grau.equals(other.grau)) return false; if (idProva != other.idProva) return false; if (instituicao == null) { if (other.instituicao != null) return false; } else if (!instituicao.equals(other.instituicao)) return false; if (nome == null) { if (other.nome != null) return false; } else if (!nome.equals(other.nome)) return false; if (questaos == null) { if (other.questaos != null) return false; } else if (!questaos.equals(other.questaos)) return false; return true; }