diff --git a/src/com/rjconsultores/ventaboletos/entidad/FiscalFormapagoEmpresa.java b/src/com/rjconsultores/ventaboletos/entidad/FiscalFormapagoEmpresa.java index 35754c7e8..e31279070 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/FiscalFormapagoEmpresa.java +++ b/src/com/rjconsultores/ventaboletos/entidad/FiscalFormapagoEmpresa.java @@ -10,7 +10,6 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; -import javax.persistence.OneToOne; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Temporal; @@ -92,5 +91,35 @@ public class FiscalFormapagoEmpresa { } public void setTipoformapago(String tipoformapago) { this.tipoformapago = tipoformapago; - } + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((empresa == null) ? 0 : empresa.hashCode()); + result = prime * result + ((tipoformapago == null) ? 0 : tipoformapago.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; + FiscalFormapagoEmpresa other = (FiscalFormapagoEmpresa) obj; + if (empresa == null) { + if (other.empresa != null) + return false; + } else if (!empresa.equals(other.empresa)) + return false; + if (tipoformapago == null) { + if (other.tipoformapago != null) + return false; + } else if (!tipoformapago.equals(other.tipoformapago)) + return false; + return true; + } + } diff --git a/src/com/rjconsultores/ventaboletos/entidad/FiscalRelgerencialEmpresa.java b/src/com/rjconsultores/ventaboletos/entidad/FiscalRelgerencialEmpresa.java index 37d589702..06c6eda0d 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/FiscalRelgerencialEmpresa.java +++ b/src/com/rjconsultores/ventaboletos/entidad/FiscalRelgerencialEmpresa.java @@ -81,6 +81,34 @@ public class FiscalRelgerencialEmpresa { public void setActivo(Boolean activo) { this.activo = activo; } - + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((empresa == null) ? 0 : empresa.hashCode()); + result = prime * result + ((tiporelgerencial == null) ? 0 : tiporelgerencial.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; + FiscalRelgerencialEmpresa other = (FiscalRelgerencialEmpresa) obj; + if (empresa == null) { + if (other.empresa != null) + return false; + } else if (!empresa.equals(other.empresa)) + return false; + if (tiporelgerencial == null) { + if (other.tiporelgerencial != null) + return false; + } else if (!tiporelgerencial.equals(other.tiporelgerencial)) + return false; + return true; + } }