diff --git a/src/com/rjconsultores/ventaboletos/entidad/MarcaAutobus.java b/src/com/rjconsultores/ventaboletos/entidad/MarcaAutobus.java index 89778251a..ba08b7d71 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/MarcaAutobus.java +++ b/src/com/rjconsultores/ventaboletos/entidad/MarcaAutobus.java @@ -71,4 +71,17 @@ public class MarcaAutobus implements Serializable { public String toString(){ return this.descmarca; } + + @Override + public boolean equals(Object object) { + // TODO: Warning - this method won't work in the case the id fields are not set + if (!(object instanceof MarcaAutobus)) { + return false; + } + MarcaAutobus other = (MarcaAutobus) object; + if ((this.marcaAutobusId == null && other.marcaAutobusId != null) || (this.marcaAutobusId != null && !this.marcaAutobusId.equals(other.marcaAutobusId))) { + return false; + } + return true; + } }