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() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("nomCurso"));
|
||||
c.addOrder(Order.asc("nomcurso"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class EscolaHibernateDAO extends GenericHibernateDAO<Escola, Integer>
|
|||
public List<Escola> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("nombEscola"));
|
||||
c.addOrder(Order.asc("nombescola"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import javax.persistence.GeneratedValue;
|
|||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
|
@ -116,6 +117,12 @@ public class Cliente implements Serializable {
|
|||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "CLIENTE_ID", referencedColumnName = "CLIENTE_ID")
|
||||
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() {
|
||||
}
|
||||
|
@ -388,30 +395,6 @@ public class Cliente implements Serializable {
|
|||
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() {
|
||||
return tipoIdentificacionUno;
|
||||
}
|
||||
|
@ -435,5 +418,44 @@ public class Cliente implements Serializable {
|
|||
public void setLsClienteDescuento(List<ClienteDescuento> 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 + " ]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,35 +34,50 @@ public class Curso implements Serializable {
|
|||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
|
||||
public Integer getCursoId() {
|
||||
return cursoId;
|
||||
}
|
||||
|
||||
public void setCursoId(Integer cursoId) {
|
||||
this.cursoId = cursoId;
|
||||
}
|
||||
|
||||
public String getNomcurso() {
|
||||
return nomcurso;
|
||||
}
|
||||
|
||||
public void setNomcurso(String nomcurso) {
|
||||
this.nomcurso = nomcurso;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.nomcurso;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
|
@ -13,7 +11,6 @@ import javax.persistence.GenerationType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
|
@ -42,41 +39,58 @@ public class Escola implements Serializable {
|
|||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
|
||||
public Integer getEscolaId() {
|
||||
return escolaId;
|
||||
}
|
||||
|
||||
public void setEscolaId(Integer escolaId) {
|
||||
this.escolaId = escolaId;
|
||||
}
|
||||
|
||||
public String getNombescola() {
|
||||
return nombescola;
|
||||
}
|
||||
|
||||
public void setNombescola(String nombescola) {
|
||||
this.nombescola = nombescola;
|
||||
}
|
||||
|
||||
public Ciudad getCiudad() {
|
||||
return ciudad;
|
||||
}
|
||||
|
||||
public void setCiudad(Ciudad ciudad) {
|
||||
this.ciudad = ciudad;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.nombescola;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue