fixed bug #8979
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@68654 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
19c0d546ba
commit
0c7b059f8e
|
@ -0,0 +1,110 @@
|
|||
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.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "HIST_PUNTOVENTA_SEQ", sequenceName = "HIST_PUNTOVENTA_SEQ", allocationSize = 1)
|
||||
@Table(name = "HIST_PUNTOVENTA")
|
||||
public class HistoricoPuntoVenta implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "HIST_PUNTOVENTA_SEQ")
|
||||
@Column(name = "HIST_PUNTOVENTA_ID")
|
||||
private Integer historicoPuntoVentaId;
|
||||
|
||||
@Column(name = "IND_BLOQUEIO")
|
||||
private Boolean indBloqueio;
|
||||
|
||||
@Column(name = "FEC_BLOQUEIO")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecBloqueio;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "PUNTOVENTA_ID")
|
||||
private PuntoVenta puntoVenta;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
public Integer getHistoricoPuntoVentaId() {
|
||||
return historicoPuntoVentaId;
|
||||
}
|
||||
|
||||
public void setHistoricoPuntoVentaId(Integer historicoPuntoVentaId) {
|
||||
this.historicoPuntoVentaId = historicoPuntoVentaId;
|
||||
}
|
||||
|
||||
public Boolean getIndBloqueio() {
|
||||
return indBloqueio;
|
||||
}
|
||||
|
||||
public void setIndBloqueio(Boolean indBloqueio) {
|
||||
this.indBloqueio = indBloqueio;
|
||||
}
|
||||
|
||||
public Date getFecBloqueio() {
|
||||
return fecBloqueio;
|
||||
}
|
||||
|
||||
public void setFecBloqueio(Date fecBloqueio) {
|
||||
this.fecBloqueio = fecBloqueio;
|
||||
}
|
||||
|
||||
public PuntoVenta getPuntoVenta() {
|
||||
return puntoVenta;
|
||||
}
|
||||
|
||||
public void setPuntoVenta(PuntoVenta puntoVenta) {
|
||||
this.puntoVenta = puntoVenta;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -212,6 +212,10 @@ public class PuntoVenta implements Serializable {
|
|||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date dateAbertura;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoVenta")
|
||||
@LazyCollection(LazyCollectionOption.FALSE)
|
||||
private List<HistoricoPuntoVenta> historicoPuntoVentaList;
|
||||
|
||||
public PtovtaEmpresaBloqueada addEmpresaBloqueada(Empresa e) {
|
||||
PtovtaEmpresaBloqueada eb = new PtovtaEmpresaBloqueada();
|
||||
eb.setEmpresa(e);
|
||||
|
@ -286,6 +290,7 @@ public class PuntoVenta implements Serializable {
|
|||
this.ptovtaSeguroList = new ArrayList<PtoVtaSeguro>();
|
||||
this.ptovtaCatIndList = new ArrayList<PtovtaCatInd>();
|
||||
this.ptovtaEmpresaBloqueadaList = new ArrayList<PtovtaEmpresaBloqueada>();
|
||||
this.historicoPuntoVentaList = new ArrayList<HistoricoPuntoVenta>();
|
||||
}
|
||||
|
||||
public PuntoVenta(Integer puntoventaId) {
|
||||
|
@ -947,4 +952,14 @@ public class PuntoVenta implements Serializable {
|
|||
public String getCidade(){
|
||||
return colonia != null ? colonia.getCidade() : "";
|
||||
}
|
||||
|
||||
public List<HistoricoPuntoVenta> getHistoricoPuntoVentaList() {
|
||||
return historicoPuntoVentaList;
|
||||
}
|
||||
|
||||
public void setHistoricoPuntoVentaList(List<HistoricoPuntoVenta> historicoPuntoVentaList) {
|
||||
this.historicoPuntoVentaList = historicoPuntoVentaList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue