fixes bug #6554
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@46853 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
cff06cca36
commit
211ebda930
|
@ -26,7 +26,7 @@ public class CursoHibernateDAO extends GenericHibernateDAO<Curso, Integer>
|
||||||
public List<Curso> obtenerTodos() {
|
public List<Curso> obtenerTodos() {
|
||||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
c.addOrder(Order.asc("nomCurso"));
|
c.addOrder(Order.asc("nomcurso"));
|
||||||
|
|
||||||
return c.list();
|
return c.list();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class EscolaHibernateDAO extends GenericHibernateDAO<Escola, Integer>
|
||||||
public List<Escola> obtenerTodos() {
|
public List<Escola> obtenerTodos() {
|
||||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
c.addOrder(Order.asc("nombEscola"));
|
c.addOrder(Order.asc("nombescola"));
|
||||||
|
|
||||||
return c.list();
|
return c.list();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
|
@ -116,6 +117,12 @@ public class Cliente implements Serializable {
|
||||||
@OneToMany(cascade = CascadeType.ALL)
|
@OneToMany(cascade = CascadeType.ALL)
|
||||||
@JoinColumn(name = "CLIENTE_ID", referencedColumnName = "CLIENTE_ID")
|
@JoinColumn(name = "CLIENTE_ID", referencedColumnName = "CLIENTE_ID")
|
||||||
private List<ClienteDescuento> lsClienteDescuento;
|
private List<ClienteDescuento> lsClienteDescuento;
|
||||||
|
@ManyToOne(cascade = CascadeType.ALL)
|
||||||
|
@JoinColumn(name = "CURSO_ID", referencedColumnName = "CURSO_ID")
|
||||||
|
private Curso curso;
|
||||||
|
@ManyToOne(cascade = CascadeType.ALL)
|
||||||
|
@JoinColumn(name = "ESCOLA_ID", referencedColumnName = "ESCOLA_ID")
|
||||||
|
private Escola escola;
|
||||||
|
|
||||||
public Cliente() {
|
public Cliente() {
|
||||||
}
|
}
|
||||||
|
@ -388,30 +395,6 @@ public class Cliente implements Serializable {
|
||||||
this.indBloqueo = indBloqueo;
|
this.indBloqueo = indBloqueo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
int hash = 0;
|
|
||||||
hash += (clienteId != null ? clienteId.hashCode() : 0);
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object object) {
|
|
||||||
if (!(object instanceof Cliente)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Cliente other = (Cliente) object;
|
|
||||||
if ((this.clienteId == null && other.clienteId != null) || (this.clienteId != null && !this.clienteId.equals(other.clienteId))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "com.rjconsultores.ventaboletos.entidad.Cliente[ clienteId=" + clienteId + " ]";
|
|
||||||
}
|
|
||||||
|
|
||||||
public TipoIdentificacion getTipoIdentificacionUno() {
|
public TipoIdentificacion getTipoIdentificacionUno() {
|
||||||
return tipoIdentificacionUno;
|
return tipoIdentificacionUno;
|
||||||
}
|
}
|
||||||
|
@ -436,4 +419,43 @@ public class Cliente implements Serializable {
|
||||||
this.lsClienteDescuento = lsClienteDescuento;
|
this.lsClienteDescuento = lsClienteDescuento;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Curso getCurso() {
|
||||||
|
return curso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurso(Curso curso) {
|
||||||
|
this.curso = curso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Escola getEscola() {
|
||||||
|
return escola;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEscola(Escola escola) {
|
||||||
|
this.escola = escola;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = 0;
|
||||||
|
hash += (clienteId != null ? clienteId.hashCode() : 0);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object object) {
|
||||||
|
if (!(object instanceof Cliente)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Cliente other = (Cliente) object;
|
||||||
|
if ((this.clienteId == null && other.clienteId != null) || (this.clienteId != null && !this.clienteId.equals(other.clienteId))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "com.rjconsultores.ventaboletos.entidad.Cliente[ clienteId=" + clienteId + " ]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,31 +38,46 @@ public class Curso implements Serializable {
|
||||||
public Integer getCursoId() {
|
public Integer getCursoId() {
|
||||||
return cursoId;
|
return cursoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCursoId(Integer cursoId) {
|
public void setCursoId(Integer cursoId) {
|
||||||
this.cursoId = cursoId;
|
this.cursoId = cursoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNomcurso() {
|
public String getNomcurso() {
|
||||||
return nomcurso;
|
return nomcurso;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNomcurso(String nomcurso) {
|
public void setNomcurso(String nomcurso) {
|
||||||
this.nomcurso = nomcurso;
|
this.nomcurso = nomcurso;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getActivo() {
|
public Boolean getActivo() {
|
||||||
return activo;
|
return activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActivo(Boolean activo) {
|
public void setActivo(Boolean activo) {
|
||||||
this.activo = activo;
|
this.activo = activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFecmodif() {
|
public Date getFecmodif() {
|
||||||
return fecmodif;
|
return fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFecmodif(Date fecmodif) {
|
public void setFecmodif(Date fecmodif) {
|
||||||
this.fecmodif = fecmodif;
|
this.fecmodif = fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getUsuarioId() {
|
public Integer getUsuarioId() {
|
||||||
return usuarioId;
|
return usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsuarioId(Integer usuarioId) {
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return this.nomcurso;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package com.rjconsultores.ventaboletos.entidad;
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
@ -13,7 +11,6 @@ import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.OneToMany;
|
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
|
@ -46,37 +43,54 @@ public class Escola implements Serializable {
|
||||||
public Integer getEscolaId() {
|
public Integer getEscolaId() {
|
||||||
return escolaId;
|
return escolaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEscolaId(Integer escolaId) {
|
public void setEscolaId(Integer escolaId) {
|
||||||
this.escolaId = escolaId;
|
this.escolaId = escolaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNombescola() {
|
public String getNombescola() {
|
||||||
return nombescola;
|
return nombescola;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNombescola(String nombescola) {
|
public void setNombescola(String nombescola) {
|
||||||
this.nombescola = nombescola;
|
this.nombescola = nombescola;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Ciudad getCiudad() {
|
public Ciudad getCiudad() {
|
||||||
return ciudad;
|
return ciudad;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCiudad(Ciudad ciudad) {
|
public void setCiudad(Ciudad ciudad) {
|
||||||
this.ciudad = ciudad;
|
this.ciudad = ciudad;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getActivo() {
|
public Boolean getActivo() {
|
||||||
return activo;
|
return activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActivo(Boolean activo) {
|
public void setActivo(Boolean activo) {
|
||||||
this.activo = activo;
|
this.activo = activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFecmodif() {
|
public Date getFecmodif() {
|
||||||
return fecmodif;
|
return fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFecmodif(Date fecmodif) {
|
public void setFecmodif(Date fecmodif) {
|
||||||
this.fecmodif = fecmodif;
|
this.fecmodif = fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getUsuarioId() {
|
public Integer getUsuarioId() {
|
||||||
return usuarioId;
|
return usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsuarioId(Integer usuarioId) {
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return this.nombescola;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue