From dd2bc75588b807442141feab2a225d866b45d751 Mon Sep 17 00:00:00 2001 From: wilian Date: Thu, 18 Feb 2016 18:58:34 +0000 Subject: [PATCH] fixes bug #7138 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@53052 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/entidad/Ciudad.java | 2 +- .../ventaboletos/entidad/Colonia.java | 2 +- .../ventaboletos/entidad/Hotel.java | 23 +++++++++++++++++++ .../ventaboletos/entidad/PrecoApanhe.java | 23 +++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/entidad/Ciudad.java b/src/com/rjconsultores/ventaboletos/entidad/Ciudad.java index 0a655e032..3ef539834 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/Ciudad.java +++ b/src/com/rjconsultores/ventaboletos/entidad/Ciudad.java @@ -164,7 +164,7 @@ public class Ciudad implements Serializable { return false; } Ciudad other = (Ciudad) object; - if ((this.ciudadId == null && other.ciudadId != null) || (this.ciudadId != null && !this.ciudadId.equals(other.ciudadId))) { + if ((this.getCiudadId() == null && other.getCiudadId() != null) || (this.getCiudadId() != null && !this.getCiudadId().equals(other.getCiudadId()))) { return false; } return true; diff --git a/src/com/rjconsultores/ventaboletos/entidad/Colonia.java b/src/com/rjconsultores/ventaboletos/entidad/Colonia.java index d236e630f..738508969 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/Colonia.java +++ b/src/com/rjconsultores/ventaboletos/entidad/Colonia.java @@ -138,7 +138,7 @@ public class Colonia implements Serializable { return false; } Colonia other = (Colonia) object; - if ((this.coloniaId == null && other.coloniaId != null) || (this.coloniaId != null && !this.coloniaId.equals(other.coloniaId))) { + if ((this.getColoniaId() == null && other.getColoniaId() != null) || (this.getColoniaId() != null && !this.getColoniaId().equals(other.getColoniaId()))) { return false; } return true; diff --git a/src/com/rjconsultores/ventaboletos/entidad/Hotel.java b/src/com/rjconsultores/ventaboletos/entidad/Hotel.java index eac7a283c..b1fd4b9ac 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/Hotel.java +++ b/src/com/rjconsultores/ventaboletos/entidad/Hotel.java @@ -173,4 +173,27 @@ public class Hotel implements Serializable { this.desctelefone = desctelefone; } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((hotelId == null) ? 0 : hotelId.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + Hotel other = (Hotel) obj; + if (hotelId == null) { + if (other.hotelId != null) + return false; + } else if (!hotelId.equals(other.hotelId)) + return false; + return true; + } + } diff --git a/src/com/rjconsultores/ventaboletos/entidad/PrecoApanhe.java b/src/com/rjconsultores/ventaboletos/entidad/PrecoApanhe.java index dd3598b4b..541dbfa73 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/PrecoApanhe.java +++ b/src/com/rjconsultores/ventaboletos/entidad/PrecoApanhe.java @@ -120,4 +120,27 @@ public class PrecoApanhe implements Serializable { this.usuarioId = usuarioId; } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((precoapanheId == null) ? 0 : precoapanheId.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + PrecoApanhe other = (PrecoApanhe) obj; + if (precoapanheId == null) { + if (other.precoapanheId != null) + return false; + } else if (!precoapanheId.equals(other.precoapanheId)) + return false; + return true; + } + }