diff --git a/src/com/rjconsultores/ventaboletos/entidad/RutaCombinacion.java b/src/com/rjconsultores/ventaboletos/entidad/RutaCombinacion.java index 78bd47ec6..83aaa3bbe 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/RutaCombinacion.java +++ b/src/com/rjconsultores/ventaboletos/entidad/RutaCombinacion.java @@ -20,6 +20,8 @@ import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import org.apache.commons.lang.BooleanUtils; + /** * * @author Rafius @@ -50,6 +52,8 @@ public class RutaCombinacion implements Serializable, Cloneable { @JoinColumn(name = "RUTA_ID", referencedColumnName = "RUTA_ID") @ManyToOne private Ruta ruta; + @Column(name = "INDUSAPRICING") + private Boolean indUsaPricing; public RutaCombinacion() { } @@ -73,7 +77,7 @@ public class RutaCombinacion implements Serializable, Cloneable { } public Boolean getIndventa() { - return indventa; + return BooleanUtils.toBooleanDefaultIfNull(indventa, Boolean.TRUE); } public void setIndventa(Boolean indventa) { @@ -120,28 +124,6 @@ public class RutaCombinacion implements Serializable, Cloneable { this.ruta = ruta; } - public void setVentaSi(boolean a) { - this.setIndventa(Boolean.TRUE); - } - - public void setVentaNo(boolean a) { - this.setIndventa(Boolean.FALSE); - } - - public boolean isVentaSi() { - if (this.getIndventa() == Boolean.FALSE) { - return false; - } - return true; - } - - public boolean isVentaNo() { - if (this.getIndventa() == Boolean.TRUE) { - return false; - } - return true; - } - @Override public int hashCode() { int hash = 0; @@ -166,4 +148,12 @@ public class RutaCombinacion implements Serializable, Cloneable { public String toString() { return "com.rjconsultores.ventaboletos.entidad.RutaCombinacion[rutacombinacionId=" + rutacombinacionId + "]"; } + + public Boolean getIndUsaPricing() { + return BooleanUtils.toBooleanDefaultIfNull(indUsaPricing, Boolean.TRUE); + } + + public void setIndUsaPricing(Boolean indUsaPricing) { + this.indUsaPricing = indUsaPricing; + } }