diff --git a/src/com/rjconsultores/ventaboletos/dao/ConferenciaPendenciaDAO.java b/src/com/rjconsultores/ventaboletos/dao/ConferenciaPendenciaDAO.java new file mode 100644 index 000000000..aaaecb1e5 --- /dev/null +++ b/src/com/rjconsultores/ventaboletos/dao/ConferenciaPendenciaDAO.java @@ -0,0 +1,11 @@ +package com.rjconsultores.ventaboletos.dao; + +import com.rjconsultores.ventaboletos.entidad.ConferenciaPendencia; + +/** + * + * @author Wilian + */ +public interface ConferenciaPendenciaDAO extends GenericDAO { + +} diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConferenciaComissaoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConferenciaComissaoHibernateDAO.java index 370853062..9642e824c 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConferenciaComissaoHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConferenciaComissaoHibernateDAO.java @@ -566,13 +566,15 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO + implements ConferenciaPendenciaDAO { + + @Autowired + public ConferenciaPendenciaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) { + setSessionFactory(factory); + } + + @Override + @SuppressWarnings("unchecked") + public List obtenerTodos() { + Criteria c = getSession().createCriteria(getPersistentClass()); + c.add(Restrictions.eq("activo", Boolean.TRUE)); + return c.list(); + } +} diff --git a/src/com/rjconsultores/ventaboletos/entidad/ConferenciaPendencia.java b/src/com/rjconsultores/ventaboletos/entidad/ConferenciaPendencia.java new file mode 100644 index 000000000..2551d6151 --- /dev/null +++ b/src/com/rjconsultores/ventaboletos/entidad/ConferenciaPendencia.java @@ -0,0 +1,127 @@ +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.FetchType; +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 +@Table(name = "CONFERENCIA_PENDENCIA") +@SequenceGenerator(name = "CONFERENCIA_PENDENCIA_SEQ", sequenceName = "CONFERENCIA_PENDENCIA_SEQ", allocationSize = 1) +public class ConferenciaPendencia implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @Basic(optional = false) + @GeneratedValue(strategy = GenerationType.AUTO, generator = "CONFERENCIA_PENDENCIA_SEQ") + @Column(name = "CONFERENCIAPENDENCIA_ID") + private Integer conferenciapendenciaId; + + @Column(name = "DESCPENDENCIA") + private String descpendencia; + + @Column(name = "ACTIVO") + private boolean activo; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "FECMODIF") + private Date fecmodif; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "USUARIO_ID") + private Usuario usuario; + + public ConferenciaPendencia() { + super(); + } + + public ConferenciaPendencia(Integer conferenciapendenciaId, String descpendencia) { + this(); + this.conferenciapendenciaId = conferenciapendenciaId; + this.descpendencia = descpendencia; + } + + public Integer getConferenciapendenciaId() { + return conferenciapendenciaId; + } + + public void setConferenciapendenciaId(Integer conferenciapendenciaId) { + this.conferenciapendenciaId = conferenciapendenciaId; + } + + public String getDescpendencia() { + return descpendencia; + } + + public void setDescpendencia(String descpendencia) { + this.descpendencia = descpendencia; + } + + public boolean isActivo() { + return activo; + } + + public void setActivo(boolean activo) { + this.activo = activo; + } + + public Date getFecmodif() { + return fecmodif; + } + + public void setFecmodif(Date fecmodif) { + this.fecmodif = fecmodif; + } + + public Usuario getUsuario() { + return usuario; + } + + public void setUsuario(Usuario usuario) { + this.usuario = usuario; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((conferenciapendenciaId == null) ? 0 : conferenciapendenciaId.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof ConferenciaPendencia)) + return false; + ConferenciaPendencia other = (ConferenciaPendencia) obj; + if (getConferenciapendenciaId() == null) { + if (other.getConferenciapendenciaId() != null) + return false; + } else if (!getConferenciapendenciaId().equals(other.getConferenciapendenciaId())) + return false; + return true; + } + + @Override + public String toString() { + return getDescpendencia(); + } + +} diff --git a/src/com/rjconsultores/ventaboletos/entidad/LogConferencia.java b/src/com/rjconsultores/ventaboletos/entidad/LogConferencia.java index 2ab0c1248..2f6843cbd 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/LogConferencia.java +++ b/src/com/rjconsultores/ventaboletos/entidad/LogConferencia.java @@ -84,6 +84,10 @@ public class LogConferencia implements Serializable { @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "TIPOINFORMATIVOCOMISSAO_ID") private TipoInformativoComissao tipoInformativoComissao; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "CONFERENCIAPENDENCIA_ID") + private ConferenciaPendencia conferenciaPendencia; public Long getLogconferenciaId() { return logconferenciaId; @@ -232,5 +236,17 @@ public class LogConferencia implements Serializable { public void setTipoInformativoComissao(TipoInformativoComissao tipoInformativoComissao) { this.tipoInformativoComissao = tipoInformativoComissao; } + + public ConferenciaPendencia getConferenciaPendencia() { + return conferenciaPendencia; + } + + public void setConferenciaPendencia(ConferenciaPendencia conferenciaPendencia) { + this.conferenciaPendencia = conferenciaPendencia; + } + + public Short getIndcredito() { + return indcredito; + } } diff --git a/src/com/rjconsultores/ventaboletos/service/ConferenciaPendenciaService.java b/src/com/rjconsultores/ventaboletos/service/ConferenciaPendenciaService.java new file mode 100644 index 000000000..c6417e2e7 --- /dev/null +++ b/src/com/rjconsultores/ventaboletos/service/ConferenciaPendenciaService.java @@ -0,0 +1,11 @@ +package com.rjconsultores.ventaboletos.service; + +import com.rjconsultores.ventaboletos.entidad.ConferenciaPendencia; + +/** + * + * @author Wilian + */ +public interface ConferenciaPendenciaService extends GenericService { + +} diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaPendenciaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaPendenciaServiceImpl.java new file mode 100644 index 000000000..094b7ffe2 --- /dev/null +++ b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaPendenciaServiceImpl.java @@ -0,0 +1,43 @@ +package com.rjconsultores.ventaboletos.service.impl; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.rjconsultores.ventaboletos.dao.ConferenciaPendenciaDAO; +import com.rjconsultores.ventaboletos.entidad.ConferenciaPendencia; +import com.rjconsultores.ventaboletos.service.ConferenciaPendenciaService; + +@Service("conferenciaPendenciaService") +public class ConferenciaPendenciaServiceImpl implements ConferenciaPendenciaService { + + @Autowired + ConferenciaPendenciaDAO conferenciaPendenciaDAO; + + @Override + public List obtenerTodos() { + return conferenciaPendenciaDAO.obtenerTodos(); + } + + @Override + public ConferenciaPendencia obtenerID(Integer id) { + return conferenciaPendenciaDAO.obtenerID(id); + } + + @Override + public ConferenciaPendencia suscribir(ConferenciaPendencia entidad) { + return conferenciaPendenciaDAO.suscribir(entidad); + } + + @Override + public ConferenciaPendencia actualizacion(ConferenciaPendencia entidad) { + return conferenciaPendenciaDAO.actualizacion(entidad); + } + + @Override + public void borrar(ConferenciaPendencia entidad) { + conferenciaPendenciaDAO.borrar(entidad); + } + +} diff --git a/src/com/rjconsultores/ventaboletos/vo/comissao/LogConferenciaVO.java b/src/com/rjconsultores/ventaboletos/vo/comissao/LogConferenciaVO.java index acb326d4a..c906945fe 100644 --- a/src/com/rjconsultores/ventaboletos/vo/comissao/LogConferenciaVO.java +++ b/src/com/rjconsultores/ventaboletos/vo/comissao/LogConferenciaVO.java @@ -30,6 +30,7 @@ public class LogConferenciaVO { private Integer tipoventa; private String descinfoevento; private String desctipoinformativo; + private String descpendencia; public LogConferenciaVO() { super(); @@ -267,5 +268,13 @@ public class LogConferenciaVO { public void setDesctipoinformativo(String desctipoinformativo) { this.desctipoinformativo = desctipoinformativo; } + + public String getDescpendencia() { + return descpendencia; + } + + public void setDescpendencia(String descpendencia) { + this.descpendencia = descpendencia; + } }