git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@20296 d1611594-4594-4d17-8e1d-87c2c4800839
parent
5c9ad37377
commit
45b9d70dd5
|
@ -84,16 +84,11 @@
|
|||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zweb.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/jasperreports-4.5.0.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/jfreechart-1.0.12.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="jst.utility"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/poi-3.8-20120326.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/poi-3.8-20120326.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<runtime name="Apache Tomcat v7.0"/>
|
||||
<runtime name="JBoss 6.0 Runtime"/>
|
||||
<fixed facet="jst.utility"/>
|
||||
<fixed facet="java"/>
|
||||
<installed facet="java" version="1.6"/>
|
||||
|
|
|
@ -18,4 +18,6 @@ public interface CiudadDAO extends GenericDAO<Ciudad, Integer> {
|
|||
public List<Ciudad> buscar(String nombciudad, Estado estado, Plaza plaza);
|
||||
|
||||
public List<Ciudad> buscaLike(String strCiudad);
|
||||
|
||||
public List<Ciudad> buscarPorEstado(Estado estado);
|
||||
}
|
||||
|
|
|
@ -24,37 +24,51 @@ import org.springframework.stereotype.Repository;
|
|||
*/
|
||||
@Repository("ciudadDAO")
|
||||
public class CiudadHibernateDAO extends GenericHibernateDAO<Ciudad, Integer>
|
||||
implements CiudadDAO {
|
||||
implements CiudadDAO {
|
||||
|
||||
@Autowired
|
||||
public CiudadHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
@Autowired
|
||||
public CiudadHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Ciudad> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("nombciudad"));
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Ciudad> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("nombciudad"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<Ciudad> buscar(String nombciudad, Estado estado, Plaza plaza) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("nombciudad", nombciudad));
|
||||
c.add(Restrictions.eq("estado", estado));
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Ciudad> buscar(String nombciudad, Estado estado, Plaza plaza) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("nombciudad", nombciudad));
|
||||
c.add(Restrictions.eq("estado", estado));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<Ciudad> buscaLike(String strCiudad) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.like("nombciudad", strCiudad, MatchMode.START));
|
||||
c.addOrder(Order.asc("nombciudad"));
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Ciudad> buscaLike(String strCiudad) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.like("nombciudad", strCiudad, MatchMode.START));
|
||||
c.addOrder(Order.asc("nombciudad"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
return c.list();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Ciudad> buscarPorEstado(Estado estado) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("estado", estado));
|
||||
c.addOrder(Order.asc("nombciudad"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,11 +7,10 @@ package com.rjconsultores.ventaboletos.entidad;
|
|||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
@ -19,10 +18,10 @@ import javax.persistence.JoinColumn;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -7,17 +7,21 @@ package com.rjconsultores.ventaboletos.entidad;
|
|||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
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.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -28,187 +32,257 @@ import javax.persistence.SequenceGenerator;
|
|||
@Table(name = "EMPRESA")
|
||||
public class Empresa implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "EMPRESA_SEQ")
|
||||
@Column(name = "EMPRESA_ID")
|
||||
private Integer empresaId;
|
||||
@Column(name = "NOMBEMPRESA")
|
||||
private String nombempresa;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@OneToMany(mappedBy = "empresa")
|
||||
private List<PuntoVenta> puntoVentaList;
|
||||
@Column(name = "INDEXTERNA")
|
||||
private Boolean indExterna;
|
||||
@Column(name = "INDTIPO")
|
||||
private Short indTipo;
|
||||
@Column(name = "INDPAGOCONDUCTOR")
|
||||
private Boolean pagoConductor;
|
||||
@OneToMany(mappedBy = "empresa")
|
||||
private List<Corrida> corridaList;
|
||||
@OneToMany(mappedBy = "empresa1")
|
||||
private List<Corrida> corridaList1;
|
||||
@Column(name = "EQUIVALENCIAELEKTRA_ID")
|
||||
private String equivalenciaElektraId;
|
||||
@Column(name = "EQUIVALENCIA_ID")
|
||||
private String equivalenciaId;
|
||||
@Column(name = "RFC")
|
||||
private String rfc;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "EMPRESA_SEQ")
|
||||
@Column(name = "EMPRESA_ID")
|
||||
private Integer empresaId;
|
||||
@Column(name = "NOMBEMPRESA")
|
||||
private String nombempresa;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@OneToMany(mappedBy = "empresa")
|
||||
private List<PuntoVenta> puntoVentaList;
|
||||
@Column(name = "INDEXTERNA")
|
||||
private Boolean indExterna;
|
||||
@Column(name = "INDTIPO")
|
||||
private Short indTipo;
|
||||
@Column(name = "INDPAGOCONDUCTOR")
|
||||
private Boolean pagoConductor;
|
||||
@OneToMany(mappedBy = "empresa")
|
||||
private List<Corrida> corridaList;
|
||||
@OneToMany(mappedBy = "empresa1")
|
||||
private List<Corrida> corridaList1;
|
||||
@Column(name = "EQUIVALENCIAELEKTRA_ID")
|
||||
private String equivalenciaElektraId;
|
||||
@Column(name = "EQUIVALENCIA_ID")
|
||||
private String equivalenciaId;
|
||||
@Column(name = "RFC")
|
||||
private String rfc;
|
||||
@Column(name = "CNPJ")
|
||||
private String cnpj;
|
||||
@Column(name = "LOGRADOURO")
|
||||
private String logradouro;
|
||||
@Column(name = "NUMERO")
|
||||
private String numero;
|
||||
@Column(name = "COMPLEMENTO")
|
||||
private String complemento;
|
||||
@Column(name = "CEP")
|
||||
private String cep;
|
||||
@Column(name = "BAIRRO")
|
||||
private String bairro;
|
||||
@OneToOne(cascade = CascadeType.MERGE)
|
||||
@JoinColumn(name = "CIUDAD_ID")
|
||||
private Ciudad cidade;
|
||||
|
||||
public Empresa() {
|
||||
}
|
||||
public Empresa() {
|
||||
}
|
||||
|
||||
public Empresa(Integer empresaId) {
|
||||
this.empresaId = empresaId;
|
||||
}
|
||||
public Empresa(Integer empresaId) {
|
||||
this.empresaId = empresaId;
|
||||
}
|
||||
|
||||
public Empresa(Integer empresaId, Date fecmodif) {
|
||||
this.empresaId = empresaId;
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
public Empresa(Integer empresaId, Date fecmodif) {
|
||||
this.empresaId = empresaId;
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
|
||||
public Integer getEmpresaId() {
|
||||
return empresaId;
|
||||
}
|
||||
public Integer getEmpresaId() {
|
||||
return empresaId;
|
||||
}
|
||||
|
||||
public void setEmpresaId(Integer empresaId) {
|
||||
this.empresaId = empresaId;
|
||||
}
|
||||
public void setEmpresaId(Integer empresaId) {
|
||||
this.empresaId = empresaId;
|
||||
}
|
||||
|
||||
public String getNombempresa() {
|
||||
return nombempresa;
|
||||
}
|
||||
public String getNombempresa() {
|
||||
return nombempresa;
|
||||
}
|
||||
|
||||
public void setNombempresa(String nombempresa) {
|
||||
this.nombempresa = nombempresa;
|
||||
}
|
||||
public void setNombempresa(String nombempresa) {
|
||||
this.nombempresa = nombempresa;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public List<PuntoVenta> getPuntoVentaList() {
|
||||
return puntoVentaList;
|
||||
}
|
||||
public List<PuntoVenta> getPuntoVentaList() {
|
||||
return puntoVentaList;
|
||||
}
|
||||
|
||||
public void setPuntoVentaList(List<PuntoVenta> puntoVentaList) {
|
||||
this.puntoVentaList = puntoVentaList;
|
||||
}
|
||||
public void setPuntoVentaList(List<PuntoVenta> puntoVentaList) {
|
||||
this.puntoVentaList = puntoVentaList;
|
||||
}
|
||||
|
||||
public Boolean getIndExterna() {
|
||||
return indExterna;
|
||||
}
|
||||
public Boolean getIndExterna() {
|
||||
return indExterna;
|
||||
}
|
||||
|
||||
public void setIndExterna(Boolean indExterna) {
|
||||
this.indExterna = indExterna;
|
||||
}
|
||||
public void setIndExterna(Boolean indExterna) {
|
||||
this.indExterna = indExterna;
|
||||
}
|
||||
|
||||
public Short getIndTipo() {
|
||||
return indTipo;
|
||||
}
|
||||
public Short getIndTipo() {
|
||||
return indTipo;
|
||||
}
|
||||
|
||||
public void setIndTipo(Short indTipo) {
|
||||
this.indTipo = indTipo;
|
||||
}
|
||||
public void setIndTipo(Short indTipo) {
|
||||
this.indTipo = indTipo;
|
||||
}
|
||||
|
||||
public Boolean getPagoConductor() {
|
||||
return pagoConductor;
|
||||
}
|
||||
public Boolean getPagoConductor() {
|
||||
return pagoConductor;
|
||||
}
|
||||
|
||||
public void setPagoConductor(Boolean pagoConductor) {
|
||||
this.pagoConductor = pagoConductor;
|
||||
}
|
||||
public void setPagoConductor(Boolean pagoConductor) {
|
||||
this.pagoConductor = pagoConductor;
|
||||
}
|
||||
|
||||
public String getEquivalenciaElektraId() {
|
||||
return equivalenciaElektraId;
|
||||
}
|
||||
public String getEquivalenciaElektraId() {
|
||||
return equivalenciaElektraId;
|
||||
}
|
||||
|
||||
public void setEquivalenciaElektraId(String equivalenciaElektraId) {
|
||||
this.equivalenciaElektraId = equivalenciaElektraId;
|
||||
}
|
||||
public void setEquivalenciaElektraId(String equivalenciaElektraId) {
|
||||
this.equivalenciaElektraId = equivalenciaElektraId;
|
||||
}
|
||||
|
||||
public String getEquivalenciaId() {
|
||||
return equivalenciaId;
|
||||
}
|
||||
public String getEquivalenciaId() {
|
||||
return equivalenciaId;
|
||||
}
|
||||
|
||||
public void setEquivalenciaId(String equivalenciaId) {
|
||||
this.equivalenciaId = equivalenciaId;
|
||||
}
|
||||
public void setEquivalenciaId(String equivalenciaId) {
|
||||
this.equivalenciaId = equivalenciaId;
|
||||
}
|
||||
|
||||
public String getRfc() {
|
||||
return rfc;
|
||||
}
|
||||
public String getRfc() {
|
||||
return rfc;
|
||||
}
|
||||
|
||||
public void setRfc(String rfc) {
|
||||
this.rfc = rfc;
|
||||
}
|
||||
public void setRfc(String rfc) {
|
||||
this.rfc = rfc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (empresaId != null ? empresaId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
public String getCnpj() {
|
||||
return cnpj;
|
||||
}
|
||||
|
||||
@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 Empresa)) {
|
||||
return false;
|
||||
}
|
||||
Empresa other = (Empresa) object;
|
||||
if ((this.empresaId == null && other.empresaId != null) || (this.empresaId != null && !this.empresaId.equals(other.empresaId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public void setCnpj(String cnpj) {
|
||||
this.cnpj = cnpj;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.getNombempresa();
|
||||
}
|
||||
public String getLogradouro() {
|
||||
return logradouro;
|
||||
}
|
||||
|
||||
public List<Corrida> getCorridaList() {
|
||||
return corridaList;
|
||||
}
|
||||
public void setLogradouro(String logradouro) {
|
||||
this.logradouro = logradouro;
|
||||
}
|
||||
|
||||
public void setCorridaList(List<Corrida> corridaList) {
|
||||
this.corridaList = corridaList;
|
||||
}
|
||||
public String getNumero() {
|
||||
return numero;
|
||||
}
|
||||
|
||||
public List<Corrida> getCorridaList1() {
|
||||
return corridaList1;
|
||||
}
|
||||
public void setNumero(String numero) {
|
||||
this.numero = numero;
|
||||
}
|
||||
|
||||
public void setCorridaList1(List<Corrida> corridaList1) {
|
||||
this.corridaList1 = corridaList1;
|
||||
}
|
||||
public String getComplemento() {
|
||||
return complemento;
|
||||
}
|
||||
|
||||
public void setComplemento(String complemento) {
|
||||
this.complemento = complemento;
|
||||
}
|
||||
|
||||
public String getCep() {
|
||||
return cep;
|
||||
}
|
||||
|
||||
public void setCep(String cep) {
|
||||
this.cep = cep;
|
||||
}
|
||||
|
||||
public String getBairro() {
|
||||
return bairro;
|
||||
}
|
||||
|
||||
public void setBairro(String bairro) {
|
||||
this.bairro = bairro;
|
||||
}
|
||||
|
||||
public Ciudad getCidade() {
|
||||
return cidade;
|
||||
}
|
||||
|
||||
public void setCidade(Ciudad cidade) {
|
||||
this.cidade = cidade;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (empresaId != null ? empresaId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (!(object instanceof Empresa)) {
|
||||
return false;
|
||||
}
|
||||
Empresa other = (Empresa) object;
|
||||
if ((this.empresaId == null && other.empresaId != null) || (this.empresaId != null && !this.empresaId.equals(other.empresaId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.getNombempresa();
|
||||
}
|
||||
|
||||
public List<Corrida> getCorridaList() {
|
||||
return corridaList;
|
||||
}
|
||||
|
||||
public void setCorridaList(List<Corrida> corridaList) {
|
||||
this.corridaList = corridaList;
|
||||
}
|
||||
|
||||
public List<Corrida> getCorridaList1() {
|
||||
return corridaList1;
|
||||
}
|
||||
|
||||
public void setCorridaList1(List<Corrida> corridaList1) {
|
||||
this.corridaList1 = corridaList1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,178 +34,197 @@ import javax.persistence.TemporalType;
|
|||
@Table(name = "RUTA")
|
||||
public class Ruta implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "RUTA_SEQ")
|
||||
@Column(name = "RUTA_ID")
|
||||
private Integer rutaId;
|
||||
@Column(name = "DESCRUTA")
|
||||
private String descruta;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@JoinColumn(name = "CLASESERVICIO_ID", referencedColumnName = "CLASESERVICIO_ID")
|
||||
@ManyToOne
|
||||
private ClaseServicio claseServicio;
|
||||
@OneToMany(mappedBy = "ruta")
|
||||
private List<RutaSecuencia> rutaSecuenciaList;
|
||||
@OneToMany(mappedBy = "ruta")
|
||||
private List<RutaCombinacion> rutaCombinacionList;
|
||||
@Column(name = "indnombreobligatorio")
|
||||
private Boolean indNombreObligatorio;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "RUTA_ID", referencedColumnName = "RUTA_ID")
|
||||
private List<RutaEmpresa> lsRutaEmpresa;
|
||||
@Column(name = "INDVENTAOFFLINE")
|
||||
private Boolean ventaOffLine;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "RUTA_SEQ")
|
||||
@Column(name = "RUTA_ID")
|
||||
private Integer rutaId;
|
||||
@Column(name = "DESCRUTA")
|
||||
private String descruta;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@JoinColumn(name = "CLASESERVICIO_ID", referencedColumnName = "CLASESERVICIO_ID")
|
||||
@ManyToOne
|
||||
private ClaseServicio claseServicio;
|
||||
@OneToMany(mappedBy = "ruta")
|
||||
private List<RutaSecuencia> rutaSecuenciaList;
|
||||
@OneToMany(mappedBy = "ruta")
|
||||
private List<RutaCombinacion> rutaCombinacionList;
|
||||
@Column(name = "indnombreobligatorio")
|
||||
private Boolean indNombreObligatorio;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "RUTA_ID", referencedColumnName = "RUTA_ID")
|
||||
private List<RutaEmpresa> lsRutaEmpresa;
|
||||
@Column(name = "INDVENTAOFFLINE")
|
||||
private Boolean ventaOffLine;
|
||||
@Column(name = "PREFIXO")
|
||||
private String prefixo;
|
||||
@Column(name = "PREFIXOAUXILIAR")
|
||||
private String prefixoAuxiliar;
|
||||
|
||||
public Boolean getIndNombreObligatorio() {
|
||||
return indNombreObligatorio;
|
||||
}
|
||||
public Boolean getIndNombreObligatorio() {
|
||||
return indNombreObligatorio;
|
||||
}
|
||||
|
||||
public void setIndNombreObligatorio(Boolean indNombreObligatorio) {
|
||||
this.indNombreObligatorio = indNombreObligatorio;
|
||||
}
|
||||
public void setIndNombreObligatorio(Boolean indNombreObligatorio) {
|
||||
this.indNombreObligatorio = indNombreObligatorio;
|
||||
}
|
||||
|
||||
public Ruta() {
|
||||
}
|
||||
public Ruta() {
|
||||
}
|
||||
|
||||
public Ruta(Integer rutaId) {
|
||||
this.rutaId = rutaId;
|
||||
}
|
||||
public Ruta(Integer rutaId) {
|
||||
this.rutaId = rutaId;
|
||||
}
|
||||
|
||||
public Integer getRutaId() {
|
||||
return rutaId;
|
||||
}
|
||||
public Integer getRutaId() {
|
||||
return rutaId;
|
||||
}
|
||||
|
||||
public void setRutaId(Integer rutaId) {
|
||||
this.rutaId = rutaId;
|
||||
}
|
||||
public void setRutaId(Integer rutaId) {
|
||||
this.rutaId = rutaId;
|
||||
}
|
||||
|
||||
public String getDescruta() {
|
||||
return descruta;
|
||||
}
|
||||
public String getDescruta() {
|
||||
return descruta;
|
||||
}
|
||||
|
||||
public void setDescruta(String descruta) {
|
||||
this.descruta = descruta;
|
||||
}
|
||||
public void setDescruta(String descruta) {
|
||||
this.descruta = descruta;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public List<RutaSecuencia> getRutaSecuenciaList() {
|
||||
List<RutaSecuencia> rsList = new ArrayList<RutaSecuencia>();
|
||||
for (RutaSecuencia rs : this.rutaSecuenciaList) {
|
||||
if (rs.getActivo() == Boolean.TRUE) {
|
||||
rsList.add(rs);
|
||||
}
|
||||
}
|
||||
public List<RutaSecuencia> getRutaSecuenciaList() {
|
||||
List<RutaSecuencia> rsList = new ArrayList<RutaSecuencia>();
|
||||
for (RutaSecuencia rs : this.rutaSecuenciaList) {
|
||||
if (rs.getActivo() == Boolean.TRUE) {
|
||||
rsList.add(rs);
|
||||
}
|
||||
}
|
||||
|
||||
return rsList;
|
||||
}
|
||||
return rsList;
|
||||
}
|
||||
|
||||
public void setRutaSecuenciaList(List<RutaSecuencia> rutaSecuenciaList) {
|
||||
this.rutaSecuenciaList = rutaSecuenciaList;
|
||||
}
|
||||
public void setRutaSecuenciaList(List<RutaSecuencia> rutaSecuenciaList) {
|
||||
this.rutaSecuenciaList = rutaSecuenciaList;
|
||||
}
|
||||
|
||||
public ClaseServicio getClaseServicio() {
|
||||
return claseServicio;
|
||||
}
|
||||
public ClaseServicio getClaseServicio() {
|
||||
return claseServicio;
|
||||
}
|
||||
|
||||
public void setClaseServicio(ClaseServicio claseServicio) {
|
||||
this.claseServicio = claseServicio;
|
||||
}
|
||||
public void setClaseServicio(ClaseServicio claseServicio) {
|
||||
this.claseServicio = claseServicio;
|
||||
}
|
||||
|
||||
public List<RutaCombinacion> getRutaCombinacionList() {
|
||||
public List<RutaCombinacion> getRutaCombinacionList() {
|
||||
|
||||
List<RutaCombinacion> rcList = new ArrayList<RutaCombinacion>();
|
||||
if (this.rutaCombinacionList == null){
|
||||
return rcList;
|
||||
}
|
||||
for (RutaCombinacion rc : this.rutaCombinacionList) {
|
||||
if (rc.getActivo() == Boolean.TRUE) {
|
||||
rcList.add(rc);
|
||||
}
|
||||
}
|
||||
List<RutaCombinacion> rcList = new ArrayList<RutaCombinacion>();
|
||||
if (this.rutaCombinacionList == null) {
|
||||
return rcList;
|
||||
}
|
||||
for (RutaCombinacion rc : this.rutaCombinacionList) {
|
||||
if (rc.getActivo() == Boolean.TRUE) {
|
||||
rcList.add(rc);
|
||||
}
|
||||
}
|
||||
|
||||
return rcList;
|
||||
}
|
||||
return rcList;
|
||||
}
|
||||
|
||||
public void setRutaCombinacionList(List<RutaCombinacion> rutaCombinacionList) {
|
||||
this.rutaCombinacionList = rutaCombinacionList;
|
||||
}
|
||||
public void setRutaCombinacionList(List<RutaCombinacion> rutaCombinacionList) {
|
||||
this.rutaCombinacionList = rutaCombinacionList;
|
||||
}
|
||||
|
||||
public List<RutaEmpresa> getLsRutaEmpresa() {
|
||||
List<RutaEmpresa> rsList = new ArrayList<RutaEmpresa>();
|
||||
for (RutaEmpresa rs : this.lsRutaEmpresa) {
|
||||
if (rs.getActivo() == Boolean.TRUE) {
|
||||
rsList.add(rs);
|
||||
}
|
||||
}
|
||||
public List<RutaEmpresa> getLsRutaEmpresa() {
|
||||
List<RutaEmpresa> rsList = new ArrayList<RutaEmpresa>();
|
||||
for (RutaEmpresa rs : this.lsRutaEmpresa) {
|
||||
if (rs.getActivo() == Boolean.TRUE) {
|
||||
rsList.add(rs);
|
||||
}
|
||||
}
|
||||
|
||||
return rsList;
|
||||
}
|
||||
return rsList;
|
||||
}
|
||||
|
||||
public void setLsRutaEmpresa(List<RutaEmpresa> lsRutaEmpresa) {
|
||||
this.lsRutaEmpresa = lsRutaEmpresa;
|
||||
}
|
||||
public void setLsRutaEmpresa(List<RutaEmpresa> lsRutaEmpresa) {
|
||||
this.lsRutaEmpresa = lsRutaEmpresa;
|
||||
}
|
||||
|
||||
public Boolean getVentaOffLine() {
|
||||
return ventaOffLine;
|
||||
}
|
||||
public Boolean getVentaOffLine() {
|
||||
return ventaOffLine;
|
||||
}
|
||||
|
||||
public void setVentaOffLine(Boolean ventaOffLine) {
|
||||
this.ventaOffLine = ventaOffLine;
|
||||
}
|
||||
public void setVentaOffLine(Boolean ventaOffLine) {
|
||||
this.ventaOffLine = ventaOffLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (rutaId != null ? rutaId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
public String getPrefixo() {
|
||||
return prefixo;
|
||||
}
|
||||
|
||||
@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 Ruta)) {
|
||||
return false;
|
||||
}
|
||||
Ruta other = (Ruta) object;
|
||||
if ((this.rutaId == null && other.rutaId != null) || (this.rutaId != null && !this.rutaId.equals(other.rutaId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public void setPrefixo(String prefixo) {
|
||||
this.prefixo = prefixo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.getDescruta() + " - " + this.getRutaId();
|
||||
}
|
||||
public String getPrefixoAuxiliar() {
|
||||
return prefixoAuxiliar;
|
||||
}
|
||||
|
||||
public void setPrefixoAuxiliar(String prefixoAuxiliar) {
|
||||
this.prefixoAuxiliar = prefixoAuxiliar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (rutaId != null ? rutaId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (!(object instanceof Ruta)) {
|
||||
return false;
|
||||
}
|
||||
Ruta other = (Ruta) object;
|
||||
if ((this.rutaId == null && other.rutaId != null) || (this.rutaId != null && !this.rutaId.equals(other.rutaId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.getDescruta() + " - " + this.getRutaId();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||
import com.rjconsultores.ventaboletos.entidad.Estado;
|
||||
import com.rjconsultores.ventaboletos.entidad.Plaza;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -15,7 +16,9 @@ import java.util.List;
|
|||
*/
|
||||
public interface CiudadService extends GenericService<Ciudad, Integer> {
|
||||
|
||||
public List<Ciudad> buscar(String nombciudad, Estado estado, Plaza plaza);
|
||||
public List<Ciudad> buscar(String nombciudad, Estado estado, Plaza plaza);
|
||||
|
||||
public List<Ciudad> buscaLike(String strCiudad);
|
||||
public List<Ciudad> buscaLike(String strCiudad);
|
||||
|
||||
public List<Ciudad> buscarPorEstado(Estado estado);
|
||||
}
|
|
@ -68,4 +68,9 @@ public class CiudadServiceImpl implements CiudadService {
|
|||
public List<Ciudad> buscaLike(String strCiudad){
|
||||
return ciudadDAO.buscaLike(strCiudad);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Ciudad> buscarPorEstado(Estado estado) {
|
||||
return ciudadDAO.buscarPorEstado(estado);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue