Exemplo n.º 1
0
 @Override
 public synchronized boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Solicitacao other = (Solicitacao) obj;
   if (destinoCaronaSolicitacao == null) {
     if (other.destinoCaronaSolicitacao != null) return false;
   } else if (!destinoCaronaSolicitacao.equals(other.destinoCaronaSolicitacao)) return false;
   if (donoDaCaronaSolicitacao == null) {
     if (other.donoDaCaronaSolicitacao != null) return false;
   } else if (!donoDaCaronaSolicitacao.equals(other.donoDaCaronaSolicitacao)) return false;
   if (donoDaSolicitacao == null) {
     if (other.donoDaSolicitacao != null) return false;
   } else if (!donoDaSolicitacao.equals(other.donoDaSolicitacao)) return false;
   if (estado == null) {
     if (other.estado != null) return false;
   } else if (!estado.equals(other.estado)) return false;
   if (idCarona == null) {
     if (other.idCarona != null) return false;
   } else if (!idCarona.equals(other.idCarona)) return false;
   if (idSolicitacao == null) {
     if (other.idSolicitacao != null) return false;
   } else if (!idSolicitacao.equals(other.idSolicitacao)) return false;
   if (origemCaronaSolicitacao == null) {
     if (other.origemCaronaSolicitacao != null) return false;
   } else if (!origemCaronaSolicitacao.equals(other.origemCaronaSolicitacao)) return false;
   if (sugestaoDePontoEncontro == null) {
     if (other.sugestaoDePontoEncontro != null) return false;
   } else if (!sugestaoDePontoEncontro.equals(other.sugestaoDePontoEncontro)) return false;
   if (tipoSolicitacao != other.tipoSolicitacao) return false;
   return true;
 }
Exemplo n.º 2
0
 @Override
 public synchronized int hashCode() {
   final int prime = 31;
   int result = 1;
   result =
       prime * result
           + ((destinoCaronaSolicitacao == null) ? 0 : destinoCaronaSolicitacao.hashCode());
   result =
       prime * result
           + ((donoDaCaronaSolicitacao == null) ? 0 : donoDaCaronaSolicitacao.hashCode());
   result = prime * result + ((donoDaSolicitacao == null) ? 0 : donoDaSolicitacao.hashCode());
   result = prime * result + ((estado == null) ? 0 : estado.hashCode());
   result = prime * result + ((idCarona == null) ? 0 : idCarona.hashCode());
   result = prime * result + ((idSolicitacao == null) ? 0 : idSolicitacao.hashCode());
   result =
       prime * result
           + ((origemCaronaSolicitacao == null) ? 0 : origemCaronaSolicitacao.hashCode());
   result =
       prime * result
           + ((sugestaoDePontoEncontro == null) ? 0 : sugestaoDePontoEncontro.hashCode());
   result = prime * result + ((tipoSolicitacao == null) ? 0 : tipoSolicitacao.hashCode());
   return result;
 }
Exemplo n.º 3
0
 /**
  * Configura resposta do ponto de encontro sugerido.
  *
  * @param respostaPontoEncontro
  */
 public synchronized void setRespostaPontoEncontro(String respostaPontoEncontro) {
   sugestaoDePontoEncontro.setResposta(respostaPontoEncontro);
 }
Exemplo n.º 4
0
 /**
  * Retorna resposta do ponto de encontro sugerido.
  *
  * @return respostaPontoEncontro
  */
 public synchronized String getRespostaPontoEncontro() {
   return sugestaoDePontoEncontro.getResposta();
 }
Exemplo n.º 5
0
 /**
  * Retorna ponto de encontro.
  *
  * @return ponto de encontro
  */
 public synchronized String getPontoEncontro() {
   return sugestaoDePontoEncontro.getPontoSugerido();
 }