git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@26110 d1611594-4594-4d17-8e1d-87c2c4800839
parent
d86a5c5402
commit
dc67efb223
|
@ -4,12 +4,8 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.CortesiaDAO;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Cortesia;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.CortesiaBeneficiario;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empleado;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.hibernate.Criteria;
|
import org.hibernate.Criteria;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.hibernate.criterion.Restrictions;
|
import org.hibernate.criterion.Restrictions;
|
||||||
|
@ -17,6 +13,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.CortesiaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Cortesia;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empleado;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Shiro
|
* @author Shiro
|
||||||
|
|
|
@ -84,7 +84,8 @@ public class CategoriaDescuento implements Serializable {
|
||||||
private Integer tiempoActivar;
|
private Integer tiempoActivar;
|
||||||
@Column(name = "TIEMPODESACTIVAR")
|
@Column(name = "TIEMPODESACTIVAR")
|
||||||
private Integer tiempoDesactivar;
|
private Integer tiempoDesactivar;
|
||||||
|
@Column(name = "INDVENTAABIERTO")
|
||||||
|
private Boolean indVentaAbierto;
|
||||||
|
|
||||||
public enum DisponibilidadeFeriado {
|
public enum DisponibilidadeFeriado {
|
||||||
// Declaração dos enum
|
// Declaração dos enum
|
||||||
|
@ -349,4 +350,12 @@ public class CategoriaDescuento implements Serializable {
|
||||||
public void setTiempoDesactivar(Integer tiempoDesactivar) {
|
public void setTiempoDesactivar(Integer tiempoDesactivar) {
|
||||||
this.tiempoDesactivar = tiempoDesactivar;
|
this.tiempoDesactivar = tiempoDesactivar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getIndVentaAbierto() {
|
||||||
|
return indVentaAbierto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndVentaAbierto(Boolean indVentaAbierto) {
|
||||||
|
this.indVentaAbierto = indVentaAbierto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -77,10 +76,10 @@ public class Estacion implements Serializable {
|
||||||
private String nomeImpressoraRelatorio;
|
private String nomeImpressoraRelatorio;
|
||||||
@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)
|
||||||
|
private List<EstacionImpresora> lsEstacionImpresora;
|
||||||
|
|
||||||
public Estacion() {
|
public Estacion() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Estacion(Integer estacionId) {
|
public Estacion(Integer estacionId) {
|
||||||
|
@ -200,7 +199,6 @@ public class Estacion implements Serializable {
|
||||||
this.nomeImpressoraRelatorio = nomeImpressoraRelatorio;
|
this.nomeImpressoraRelatorio = nomeImpressoraRelatorio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 0;
|
int hash = 0;
|
||||||
|
@ -220,11 +218,6 @@ public class Estacion implements Serializable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "com.rjconsultores.ventaboletos.entidad.Estacion[estacionId=" + estacionId + "]";
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<EstacionSitef> getEstacionSitefList() {
|
public List<EstacionSitef> getEstacionSitefList() {
|
||||||
List<EstacionSitef> tmp = new ArrayList<EstacionSitef>();
|
List<EstacionSitef> tmp = new ArrayList<EstacionSitef>();
|
||||||
|
|
||||||
|
@ -235,10 +228,34 @@ public class Estacion implements Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEstacionSitefList(List<EstacionSitef> estacionSitefList) {
|
public void setEstacionSitefList(List<EstacionSitef> estacionSitefList) {
|
||||||
this.estacionSitefList = estacionSitefList;
|
this.estacionSitefList = estacionSitefList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<EstacionImpresora> getLsEstacionImpresora() {
|
||||||
|
List<EstacionImpresora> tmp = new ArrayList<EstacionImpresora>();
|
||||||
|
|
||||||
|
if (lsEstacionImpresora != null) {
|
||||||
|
for (EstacionImpresora es : lsEstacionImpresora) {
|
||||||
|
if (es.getActivo()) {
|
||||||
|
tmp.add(es);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEstacionImpresora(List<EstacionImpresora> lsEstacionImpresora) {
|
||||||
|
this.lsEstacionImpresora = lsEstacionImpresora;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "com.rjconsultores.ventaboletos.entidad.Estacion[estacionId=" + estacionId + "]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@SequenceGenerator(name = "ESTACION_IMPRESORA_SEQ", sequenceName = "ESTACION_IMPRESORA_SEQ", allocationSize = 1)
|
||||||
|
@Table(name = "ESTACION_IMPRESORA ")
|
||||||
|
public class EstacionImpresora implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ESTACION_IMPRESORA_SEQ")
|
||||||
|
@Column(name = "ESTACIONIMPRESORA_ID")
|
||||||
|
private Integer estacionImpresoraId;
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "ESTACION_ID", referencedColumnName = "ESTACION_ID")
|
||||||
|
private Estacion estacion;
|
||||||
|
@OneToOne
|
||||||
|
@JoinColumn(name = "EMPRESA_ID")
|
||||||
|
private Empresa empresa;
|
||||||
|
@Column(name = "NOMBIMPRESORA")
|
||||||
|
private String nombImpresora;
|
||||||
|
@Column(name = "NOMBARCHIVOLAYOUT")
|
||||||
|
private String nombArchivoLayout;
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fecmodif;
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
public Integer getEstacionImpresoraId() {
|
||||||
|
return estacionImpresoraId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstacionImpresoraId(Integer estacionImpresoraId) {
|
||||||
|
this.estacionImpresoraId = estacionImpresoraId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Estacion getEstacion() {
|
||||||
|
return estacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstacion(Estacion estacion) {
|
||||||
|
this.estacion = estacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Empresa getEmpresa() {
|
||||||
|
return empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpresa(Empresa empresa) {
|
||||||
|
this.empresa = empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNombImpresora() {
|
||||||
|
return nombImpresora;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNombImpresora(String nombImpresora) {
|
||||||
|
this.nombImpresora = nombImpresora;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNombArchivoLayout() {
|
||||||
|
return nombArchivoLayout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNombArchivoLayout(String nombArchivoLayout) {
|
||||||
|
this.nombArchivoLayout = nombArchivoLayout;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue