desenvolvimento (bug 6096)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@44139 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
0d31ccc4ae
commit
626443e759
|
@ -81,6 +81,8 @@ public class Estacion implements Serializable {
|
||||||
@OneToMany(mappedBy = "estacion", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
@OneToMany(mappedBy = "estacion", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||||
private List<EstacionSitef> estacionSitefList;
|
private List<EstacionSitef> estacionSitefList;
|
||||||
@OneToMany(mappedBy = "estacion", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "estacion", cascade = CascadeType.ALL)
|
||||||
|
private List<EstacionRioCard> estacionRioCardList;
|
||||||
|
@OneToMany(mappedBy = "estacion", cascade = CascadeType.ALL)
|
||||||
private List<EstacionImpresora> lsEstacionImpresora;
|
private List<EstacionImpresora> lsEstacionImpresora;
|
||||||
@OneToMany(mappedBy = "estacion", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "estacion", cascade = CascadeType.ALL)
|
||||||
private List<AbastoBoleto> abastoBoletoList;
|
private List<AbastoBoleto> abastoBoletoList;
|
||||||
|
@ -234,6 +236,24 @@ public class Estacion implements Serializable {
|
||||||
public void setEstacionSitefList(List<EstacionSitef> estacionSitefList) {
|
public void setEstacionSitefList(List<EstacionSitef> estacionSitefList) {
|
||||||
this.estacionSitefList = estacionSitefList;
|
this.estacionSitefList = estacionSitefList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<EstacionRioCard> getEstacionRioCardList() {
|
||||||
|
List<EstacionRioCard> tmp = new ArrayList<EstacionRioCard>();
|
||||||
|
|
||||||
|
if (estacionRioCardList != null) {
|
||||||
|
for (EstacionRioCard es : estacionRioCardList) {
|
||||||
|
if (es.getActivo()) {
|
||||||
|
tmp.add(es);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstacionRioCardList(List<EstacionRioCard> estacionRioCardList) {
|
||||||
|
this.estacionRioCardList = estacionRioCardList;
|
||||||
|
}
|
||||||
|
|
||||||
public List<EstacionImpresora> getLsEstacionImpresora() {
|
public List<EstacionImpresora> getLsEstacionImpresora() {
|
||||||
List<EstacionImpresora> tmp = new ArrayList<EstacionImpresora>();
|
List<EstacionImpresora> tmp = new ArrayList<EstacionImpresora>();
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
/*
|
||||||
|
* To change this template, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Basic;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
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;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author RJ
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "ESTACION_RIOCARD")
|
||||||
|
@SequenceGenerator(name = "ESTACION_RIOCARD_SEQ", sequenceName = "ESTACION_RIOCARD_SEQ", allocationSize = 1)
|
||||||
|
public class EstacionRioCard implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ESTACION_RIOCARD_SEQ")
|
||||||
|
@Column(name = "ESTACIONRIOCARD_ID")
|
||||||
|
private Integer estacionRioCardId;
|
||||||
|
@Column(name = "OPERADORA")
|
||||||
|
private String operadora;
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "EMPRESA_ID")
|
||||||
|
private Empresa empresa;
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "ESTACION_ID", referencedColumnName = "ESTACION_ID")
|
||||||
|
private Estacion estacion;
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fecmodif;
|
||||||
|
|
||||||
|
public EstacionRioCard() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public EstacionRioCard(Integer estacionRioCardId) {
|
||||||
|
this.estacionRioCardId = estacionRioCardId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = 0;
|
||||||
|
hash += (estacionRioCardId != null ? estacionRioCardId.hashCode() : 0);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getEstacionRioCardId() {
|
||||||
|
return estacionRioCardId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstacionRioCardId(Integer estacionRioCardId) {
|
||||||
|
this.estacionRioCardId = estacionRioCardId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOperadora() {
|
||||||
|
return operadora;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperadora(String operadora) {
|
||||||
|
this.operadora = operadora;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Empresa getEmpresa() {
|
||||||
|
return empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpresa(Empresa empresa) {
|
||||||
|
this.empresa = empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Estacion getEstacion() {
|
||||||
|
return estacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstacion(Estacion estacion) {
|
||||||
|
this.estacion = estacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFecmodif() {
|
||||||
|
return fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFecmodif(Date fecmodif) {
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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 EstacionRioCard)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
EstacionRioCard other = (EstacionRioCard) object;
|
||||||
|
if ((this.estacionRioCardId == null && other.estacionRioCardId != null) || (this.estacionRioCardId != null && !this.estacionRioCardId.equals(other.estacionRioCardId))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "com.rjconsultores.ventaboletos.entidad.EstacionRiocard[ estacionRioCardId=" + estacionRioCardId + " ]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -144,5 +144,10 @@ public class ApplicationProperties {
|
||||||
String property = p.getProperty("integracion.totvs", "0");
|
String property = p.getProperty("integracion.totvs", "0");
|
||||||
return property.equals("1");
|
return property.equals("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean integracionRioCard() {
|
||||||
|
String property = p.getProperty("integracion.riocard", "0");
|
||||||
|
return property.equals("1");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue