wilian 2016-02-18 18:58:34 +00:00
parent 323cef60aa
commit dd2bc75588
4 changed files with 48 additions and 2 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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;
}
}