Criação da novas classes relacionada PuntoVenta
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@22209 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9d19a6d78e
commit
c322fcd1aa
|
@ -0,0 +1,13 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAgenciaBancaria;
|
||||
|
||||
|
||||
public interface PtovtaAgenciaBancariaDAO extends GenericDAO<PtovtaAgenciaBancaria, Integer> {
|
||||
|
||||
public List<PtovtaAgenciaBancaria> buscar(String numagencia);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAntecipacomissao;
|
||||
|
||||
public interface PtovtaAntecipacomissaoDAO extends GenericDAO<PtovtaAntecipacomissao, Integer> {
|
||||
|
||||
public List<PtovtaAntecipacomissao> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaBanco;
|
||||
|
||||
public interface PtovtaBancoDAO extends GenericDAO<PtovtaBanco, Integer> {
|
||||
|
||||
public List<PtovtaBanco> buscar(String nome);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
|
||||
|
||||
|
||||
|
||||
public interface PtovtaComissaoDAO extends GenericDAO<PtovtaComissao, Integer> {
|
||||
|
||||
public List<PtovtaComissao> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaDiversos;
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaDiversosDAO extends GenericDAO<PtovtaDiversos, Integer> {
|
||||
|
||||
public List<PtovtaDiversos> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaEstoqueDAO extends GenericDAO<PtovtaEstoque, Integer> {
|
||||
|
||||
public List<PtovtaEstoque> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaHorario;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaHorarioDAO extends GenericDAO<PtovtaHorario, Integer> {
|
||||
|
||||
public List<PtovtaHorario> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaInformacao;
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaInformacaoDAO extends GenericDAO<PtovtaInformacao, Integer> {
|
||||
|
||||
public List<PtovtaInformacao> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaPercentual;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaPercentualDAO extends GenericDAO<PtovtaPercentual, Integer> {
|
||||
|
||||
public List<PtovtaPercentual> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTipoPercentual;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaTipoPercentualDAO extends GenericDAO<PtovtaTipoPercentual, Integer> {
|
||||
|
||||
public List<PtovtaTipoPercentual> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
||||
|
||||
|
||||
|
||||
public interface PtovtaTitularDAO extends GenericDAO<PtovtaTitular, Integer> {
|
||||
|
||||
public List<PtovtaTitular> buscar(int id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaAgenciaBancariaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAgenciaBancaria;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaBanco;
|
||||
|
||||
@Repository("ptovtaAgenciaBancariaDAO")
|
||||
public class PtovtaAgenciaBancariaHibernateDAO extends GenericHibernateDAO<PtovtaAgenciaBancaria, Integer>
|
||||
implements PtovtaAgenciaBancariaDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaAgenciaBancariaHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaAgenciaBancaria> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("numagencia"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaAgenciaBancaria> buscar(String numagencia) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("numagencia", numagencia));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaAntecipacomissaoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAntecipacomissao;
|
||||
|
||||
@Repository("ptovtaAntecipacomissaoDAO")
|
||||
public class PtovtaAntecipacomissaoHibernateDAO extends GenericHibernateDAO<PtovtaAntecipacomissao, Integer>
|
||||
implements PtovtaAntecipacomissaoDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaAntecipacomissaoHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaAntecipacomissao> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaAntecipacomissao> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaBancoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaBanco;
|
||||
|
||||
@Repository("ptovtaBancoDAO")
|
||||
public class PtovtaBancoHibernateDAO extends GenericHibernateDAO<PtovtaBanco, Integer>
|
||||
implements PtovtaBancoDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaBancoHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaBanco> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("nome"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaBanco> buscar(String nome) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("nome", nome));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaComissaoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
|
||||
|
||||
|
||||
@Repository("ptovtaComissaoDAO")
|
||||
public class PtovtaComissaoHibernateDAO extends GenericHibernateDAO<PtovtaComissao, Integer>
|
||||
implements PtovtaComissaoDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaComissaoHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaComissao> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaComissao> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaDiversosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaDiversos;
|
||||
|
||||
|
||||
@Repository("ptovtaDiversosDAO")
|
||||
public class PtovtaDiversosHibernateDAO extends GenericHibernateDAO<PtovtaDiversos, Integer>
|
||||
implements PtovtaDiversosDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaDiversosHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaDiversos> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaDiversos> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaEstoqueDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
|
||||
|
||||
|
||||
@Repository("ptovtaEstoqueDAO")
|
||||
public class PtovtaEstoqueHibernateDAO extends GenericHibernateDAO<PtovtaEstoque, Integer>
|
||||
implements PtovtaEstoqueDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaEstoqueHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaEstoque> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaEstoque> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaEstoqueDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaHorarioDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaHorario;
|
||||
|
||||
|
||||
@Repository("ptovtaHorarioDAO")
|
||||
public class PtovtaHorarioHibernateDAO extends GenericHibernateDAO<PtovtaHorario, Integer>
|
||||
implements PtovtaHorarioDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaHorarioHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaHorario> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaHorario> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaInformacaoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaInformacao;
|
||||
|
||||
|
||||
|
||||
@Repository("ptovtaInformacaoDAO")
|
||||
public class PtovtaInformacaoHibernateDAO extends GenericHibernateDAO<PtovtaInformacao, Integer>
|
||||
implements PtovtaInformacaoDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaInformacaoHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaInformacao> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaInformacao> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaPercentualDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaPercentual;
|
||||
|
||||
|
||||
|
||||
@Repository("ptovtaPercentualDAO")
|
||||
public class PtovtaPercentualHibernateDAO extends GenericHibernateDAO<PtovtaPercentual, Integer>
|
||||
implements PtovtaPercentualDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaPercentualHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaPercentual> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaPercentual> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaTipoPercentualDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTipoPercentual;
|
||||
|
||||
|
||||
|
||||
@Repository("ptovtaTipoPercentualDAO")
|
||||
public class PtovtaTipoPercentualHibernateDAO extends GenericHibernateDAO<PtovtaTipoPercentual, Integer>
|
||||
implements PtovtaTipoPercentualDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaTipoPercentualHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaTipoPercentual> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaTipoPercentual> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaTitularDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
||||
|
||||
|
||||
|
||||
@Repository("ptovtaTitularDAO")
|
||||
public class PtovtaTitularHibernateDAO extends GenericHibernateDAO<PtovtaTitular, Integer>
|
||||
implements PtovtaTitularDAO {
|
||||
|
||||
@Autowired
|
||||
public PtovtaTitularHibernateDAO(
|
||||
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PtovtaTitular> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("id"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PtovtaTitular> buscar(int id) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("id", id));
|
||||
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -5,8 +5,12 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
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.Id;
|
||||
|
@ -14,6 +18,7 @@ import javax.persistence.JoinColumn;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
@ -23,10 +28,10 @@ import javax.persistence.TemporalType;
|
|||
* @author Rafael
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PTOVTA_AGENCIA")
|
||||
@Table(name = "PTOVTA_AGENCIABANCARIA")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "PtovtaAgencia.findAll", query = "SELECT p FROM PtovtaAgencia p")})
|
||||
public class PtovtaAgencia implements Serializable {
|
||||
@NamedQuery(name = "PtovtaAgenciaBancaria.findAll", query = "SELECT p FROM PtovtaAgenciaBancaria p")})
|
||||
public class PtovtaAgenciaBancaria implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
|
@ -52,7 +57,7 @@ public class PtovtaAgencia implements Serializable {
|
|||
private String carga;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
private Boolean activo;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
|
@ -60,21 +65,34 @@ public class PtovtaAgencia implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne(optional = false)
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
@JoinColumn(name = "BANCO_ID", referencedColumnName = "ID")
|
||||
@ManyToOne(optional = false)
|
||||
private PtovtaBanco bancoId;
|
||||
|
||||
public PtovtaAgencia() {
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "agenciaId")
|
||||
private List<PuntoVenta> puntoVentaList;
|
||||
|
||||
public PtovtaAgenciaBancaria() {
|
||||
}
|
||||
|
||||
public PtovtaAgencia(Integer id) {
|
||||
public PtovtaAgenciaBancaria(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaAgencia(Integer id, String numagencia, String numconta, String pessoa, String tipo, String bilhetes, String carga, short activo, Date fecmodif, int usuarioId) {
|
||||
private static List<String> pessoaList = new ArrayList<String>();
|
||||
private static List<String> tpContaList = new ArrayList<String>();
|
||||
|
||||
static{
|
||||
pessoaList.add("blue");
|
||||
pessoaList.add("black");
|
||||
|
||||
tpContaList.add("small");
|
||||
tpContaList.add("medium");
|
||||
}
|
||||
|
||||
public PtovtaAgenciaBancaria(Integer id, String numagencia, String numconta, String pessoa, String tipo, String bilhetes, String carga, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.numagencia = numagencia;
|
||||
this.numconta = numconta;
|
||||
|
@ -143,11 +161,11 @@ public class PtovtaAgencia implements Serializable {
|
|||
this.carga = carga;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
@ -167,13 +185,7 @@ public class PtovtaAgencia implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public PuntoVenta getPuntoventaId() {
|
||||
return puntoventaId;
|
||||
}
|
||||
|
||||
public void setPuntoventaId(PuntoVenta puntoventaId) {
|
||||
this.puntoventaId = puntoventaId;
|
||||
}
|
||||
|
||||
public PtovtaBanco getBancoId() {
|
||||
return bancoId;
|
||||
|
@ -183,6 +195,23 @@ public class PtovtaAgencia implements Serializable {
|
|||
this.bancoId = bancoId;
|
||||
}
|
||||
|
||||
public List<PuntoVenta> getPuntoVentaList() {
|
||||
return puntoVentaList;
|
||||
}
|
||||
|
||||
public void setPuntoVentaList(List<PuntoVenta> puntoVentaList) {
|
||||
this.puntoVentaList = puntoVentaList;
|
||||
}
|
||||
|
||||
|
||||
public static List<String> getPessoaList() {
|
||||
return pessoaList;
|
||||
}
|
||||
|
||||
public static List<String> getTipoContaList() {
|
||||
return tpContaList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
|
@ -193,10 +222,10 @@ public class PtovtaAgencia implements Serializable {
|
|||
@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 PtovtaAgencia)) {
|
||||
if (!(object instanceof PtovtaAgenciaBancaria)) {
|
||||
return false;
|
||||
}
|
||||
PtovtaAgencia other = (PtovtaAgencia) object;
|
||||
PtovtaAgenciaBancaria other = (PtovtaAgenciaBancaria) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
|
@ -32,28 +32,28 @@ public class PtovtaAntecipacomissao implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "DATA")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date data;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "RETEM")
|
||||
private int retem;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "PERCENTUAL")
|
||||
private int percentual;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne(optional = false)
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
public PtovtaAntecipacomissao() {
|
||||
|
@ -63,7 +63,7 @@ public class PtovtaAntecipacomissao implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaAntecipacomissao(Integer id, Date data, int retem, int percentual, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaAntecipacomissao(Integer id, Date data, int retem, int percentual, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.data = data;
|
||||
this.retem = retem;
|
||||
|
@ -105,11 +105,11 @@ public class PtovtaAntecipacomissao implements Serializable {
|
|||
this.percentual = percentual;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,29 +28,27 @@ import javax.persistence.TemporalType;
|
|||
@NamedQueries({
|
||||
@NamedQuery(name = "PtovtaBanco.findAll", query = "SELECT p FROM PtovtaBanco p")})
|
||||
public class PtovtaBanco implements Serializable {
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@Column(name = "CODIGO")
|
||||
private String codigo;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "CODIGO")
|
||||
private int codigo;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "NOME")
|
||||
private String nome;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private int activo;
|
||||
private Boolean activo;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "bancoId")
|
||||
private List<PtovtaAgencia> ptovtaAgenciaList;
|
||||
private List<PtovtaAgenciaBancaria> ptovtaAgenciaList;
|
||||
|
||||
public PtovtaBanco() {
|
||||
}
|
||||
|
@ -59,7 +57,7 @@ public class PtovtaBanco implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaBanco(Integer id, int codigo, String nome, int activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaBanco(Integer id, String codigo, String nome, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.codigo = codigo;
|
||||
this.nome = nome;
|
||||
|
@ -76,14 +74,6 @@ public class PtovtaBanco implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public int getCodigo() {
|
||||
return codigo;
|
||||
}
|
||||
|
||||
public void setCodigo(int codigo) {
|
||||
this.codigo = codigo;
|
||||
}
|
||||
|
||||
public String getNome() {
|
||||
return nome;
|
||||
}
|
||||
|
@ -92,11 +82,11 @@ public class PtovtaBanco implements Serializable {
|
|||
this.nome = nome;
|
||||
}
|
||||
|
||||
public int getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(int activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
@ -116,14 +106,22 @@ public class PtovtaBanco implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public List<PtovtaAgencia> getPtovtaAgenciaList() {
|
||||
public List<PtovtaAgenciaBancaria> getPtovtaAgenciaList() {
|
||||
return ptovtaAgenciaList;
|
||||
}
|
||||
|
||||
public void setPtovtaAgenciaList(List<PtovtaAgencia> ptovtaAgenciaList) {
|
||||
public void setPtovtaAgenciaList(List<PtovtaAgenciaBancaria> ptovtaAgenciaList) {
|
||||
this.ptovtaAgenciaList = ptovtaAgenciaList;
|
||||
}
|
||||
|
||||
public String getCodigo() {
|
||||
return codigo;
|
||||
}
|
||||
|
||||
public void setCodigo(String codigo) {
|
||||
this.codigo = codigo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
|
@ -146,7 +144,11 @@ public class PtovtaBanco implements Serializable {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.rjconsultores.ventaboletos.entidad.PtovtaBanco[ id=" + id + " ]";
|
||||
return this.codigo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -35,44 +35,44 @@ public class PtovtaComissao implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "ISSRETIDO")
|
||||
private int issretido;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "ROYALTIES")
|
||||
private int royalties;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "ENVIARRECIBO")
|
||||
private short enviarrecibo;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "RECEITA")
|
||||
private String receita;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "CODAG")
|
||||
private int codag;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "IDCOMPOSICAO")
|
||||
private int idcomposicao;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "IDPERCENTUAL")
|
||||
private int idpercentual;
|
||||
@Basic(optional = false)
|
||||
|
||||
|
||||
|
||||
@Column(name = "DESTINO_ID")
|
||||
private int destinoId;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "comissaoId")
|
||||
private List<PtovtaComissaoComposicao> ptovtaComissaoComposicaoList;
|
||||
|
||||
@OneToMany(mappedBy = "comissaoId")
|
||||
private List<PtovtaComposicao> ptovtaComposicaoList;
|
||||
@OneToMany(mappedBy = "comissaoId")
|
||||
private List<PtovtaPercentual> ptovtaPercentualList;
|
||||
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne(optional = false)
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
public PtovtaComissao() {
|
||||
|
@ -82,15 +82,13 @@ public class PtovtaComissao implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaComissao(Integer id, int issretido, int royalties, short enviarrecibo, String receita, int codag, int idcomposicao, int idpercentual, int destinoId, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaComissao(Integer id, int issretido, int royalties, short enviarrecibo, String receita, int codag, int destinoId, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.issretido = issretido;
|
||||
this.royalties = royalties;
|
||||
this.enviarrecibo = enviarrecibo;
|
||||
this.receita = receita;
|
||||
this.codag = codag;
|
||||
this.idcomposicao = idcomposicao;
|
||||
this.idpercentual = idpercentual;
|
||||
this.destinoId = destinoId;
|
||||
this.activo = activo;
|
||||
this.fecmodif = fecmodif;
|
||||
|
@ -145,22 +143,6 @@ public class PtovtaComissao implements Serializable {
|
|||
this.codag = codag;
|
||||
}
|
||||
|
||||
public int getIdcomposicao() {
|
||||
return idcomposicao;
|
||||
}
|
||||
|
||||
public void setIdcomposicao(int idcomposicao) {
|
||||
this.idcomposicao = idcomposicao;
|
||||
}
|
||||
|
||||
public int getIdpercentual() {
|
||||
return idpercentual;
|
||||
}
|
||||
|
||||
public void setIdpercentual(int idpercentual) {
|
||||
this.idpercentual = idpercentual;
|
||||
}
|
||||
|
||||
public int getDestinoId() {
|
||||
return destinoId;
|
||||
}
|
||||
|
@ -169,11 +151,11 @@ public class PtovtaComissao implements Serializable {
|
|||
this.destinoId = destinoId;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
@ -193,13 +175,7 @@ public class PtovtaComissao implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public List<PtovtaComissaoComposicao> getPtovtaComissaoComposicaoList() {
|
||||
return ptovtaComissaoComposicaoList;
|
||||
}
|
||||
|
||||
public void setPtovtaComissaoComposicaoList(List<PtovtaComissaoComposicao> ptovtaComissaoComposicaoList) {
|
||||
this.ptovtaComissaoComposicaoList = ptovtaComissaoComposicaoList;
|
||||
}
|
||||
|
||||
public PuntoVenta getPuntoventaId() {
|
||||
return puntoventaId;
|
||||
|
@ -209,6 +185,24 @@ public class PtovtaComissao implements Serializable {
|
|||
this.puntoventaId = puntoventaId;
|
||||
}
|
||||
|
||||
|
||||
public List<PtovtaComposicao> getPtovtaComposicaoList() {
|
||||
return ptovtaComposicaoList;
|
||||
}
|
||||
|
||||
public void setPtovtaComposicaoList(List<PtovtaComposicao> ptovtaComposicaoList) {
|
||||
this.ptovtaComposicaoList = ptovtaComposicaoList;
|
||||
}
|
||||
|
||||
|
||||
public List<PtovtaPercentual> getPtovtaPercentualList() {
|
||||
return ptovtaPercentualList;
|
||||
}
|
||||
|
||||
public void setPtovtaPercentualList(List<PtovtaPercentual> ptovtaPercentualList) {
|
||||
this.ptovtaPercentualList = ptovtaPercentualList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafael
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PTOVTA_COMISSAO_COMPOSICAO")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "PtovtaComissaoComposicao.findAll", query = "SELECT p FROM PtovtaComissaoComposicao p")})
|
||||
public class PtovtaComissaoComposicao implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@JoinColumn(name = "COMPOSICAO_ID", referencedColumnName = "ID")
|
||||
@ManyToOne(optional = false)
|
||||
private PtovtaComposicao composicaoId;
|
||||
@JoinColumn(name = "COMISSAO_ID", referencedColumnName = "ID")
|
||||
@ManyToOne(optional = false)
|
||||
private PtovtaComissao comissaoId;
|
||||
|
||||
public PtovtaComissaoComposicao() {
|
||||
}
|
||||
|
||||
public PtovtaComissaoComposicao(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaComposicao getComposicaoId() {
|
||||
return composicaoId;
|
||||
}
|
||||
|
||||
public void setComposicaoId(PtovtaComposicao composicaoId) {
|
||||
this.composicaoId = composicaoId;
|
||||
}
|
||||
|
||||
public PtovtaComissao getComissaoId() {
|
||||
return comissaoId;
|
||||
}
|
||||
|
||||
public void setComissaoId(PtovtaComissao comissaoId) {
|
||||
this.comissaoId = comissaoId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@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 PtovtaComissaoComposicao)) {
|
||||
return false;
|
||||
}
|
||||
PtovtaComissaoComposicao other = (PtovtaComissaoComposicao) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.rjconsultores.ventaboletos.entidad.PtovtaComissaoComposicao[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafael
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PTOVTA_COMISSAO_PERCENTUAL")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "PtovtaComissaoPercentual.findAll", query = "SELECT p FROM PtovtaComissaoPercentual p")})
|
||||
public class PtovtaComissaoPercentual implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "COMISSAO_ID")
|
||||
private int comissaoId;
|
||||
@JoinColumn(name = "PERCENTUAL_ID", referencedColumnName = "ID")
|
||||
@ManyToOne(optional = false)
|
||||
private PtovtaPercentual percentualId;
|
||||
|
||||
public PtovtaComissaoPercentual() {
|
||||
}
|
||||
|
||||
public PtovtaComissaoPercentual(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaComissaoPercentual(Integer id, int comissaoId) {
|
||||
this.id = id;
|
||||
this.comissaoId = comissaoId;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getComissaoId() {
|
||||
return comissaoId;
|
||||
}
|
||||
|
||||
public void setComissaoId(int comissaoId) {
|
||||
this.comissaoId = comissaoId;
|
||||
}
|
||||
|
||||
public PtovtaPercentual getPercentualId() {
|
||||
return percentualId;
|
||||
}
|
||||
|
||||
public void setPercentualId(PtovtaPercentual percentualId) {
|
||||
this.percentualId = percentualId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@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 PtovtaComissaoPercentual)) {
|
||||
return false;
|
||||
}
|
||||
PtovtaComissaoPercentual other = (PtovtaComissaoPercentual) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.rjconsultores.ventaboletos.entidad.PtovtaComissaoPercentual[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
}
|
|
@ -11,6 +11,8 @@ import javax.persistence.CascadeType;
|
|||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.OneToMany;
|
||||
|
@ -45,8 +47,10 @@ public class PtovtaComposicao implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "composicaoId")
|
||||
private List<PtovtaComissaoComposicao> ptovtaComissaoComposicaoList;
|
||||
|
||||
@JoinColumn(name = "COMISSAO_ID", referencedColumnName = "ID")
|
||||
@ManyToOne
|
||||
private PtovtaComissao comissaoId;
|
||||
|
||||
public PtovtaComposicao() {
|
||||
}
|
||||
|
@ -112,14 +116,16 @@ public class PtovtaComposicao implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public List<PtovtaComissaoComposicao> getPtovtaComissaoComposicaoList() {
|
||||
return ptovtaComissaoComposicaoList;
|
||||
|
||||
public PtovtaComissao getComissaoId() {
|
||||
return comissaoId;
|
||||
}
|
||||
|
||||
public void setPtovtaComissaoComposicaoList(List<PtovtaComissaoComposicao> ptovtaComissaoComposicaoList) {
|
||||
this.ptovtaComissaoComposicaoList = ptovtaComissaoComposicaoList;
|
||||
public void setComissaoId(PtovtaComissao comissaoId) {
|
||||
this.comissaoId = comissaoId;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
|
|
|
@ -35,32 +35,35 @@ public class PtovtaDiversos implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "RESPON_ALUGUEL")
|
||||
private String responAluguel;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "RESPON_TELEFONE")
|
||||
private String responTelefone;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "RESPON_ENERGIA")
|
||||
private String responEnergia;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "POSICAO")
|
||||
private String posicao;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "diversosId")
|
||||
private List<PtovtaDiversosInfo> ptovtaDiversosInfoList;
|
||||
|
||||
@OneToMany(mappedBy = "diversosId")
|
||||
private List<PtovtaInformacao> ptovtaInformacaoList;
|
||||
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne(optional = false)
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
public PtovtaDiversos() {
|
||||
|
@ -70,7 +73,7 @@ public class PtovtaDiversos implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaDiversos(Integer id, String responAluguel, String responTelefone, String responEnergia, String posicao, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaDiversos(Integer id, String responAluguel, String responTelefone, String responEnergia, String posicao, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.responAluguel = responAluguel;
|
||||
this.responTelefone = responTelefone;
|
||||
|
@ -121,11 +124,11 @@ public class PtovtaDiversos implements Serializable {
|
|||
this.posicao = posicao;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
@ -145,13 +148,7 @@ public class PtovtaDiversos implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public List<PtovtaDiversosInfo> getPtovtaDiversosInfoList() {
|
||||
return ptovtaDiversosInfoList;
|
||||
}
|
||||
|
||||
public void setPtovtaDiversosInfoList(List<PtovtaDiversosInfo> ptovtaDiversosInfoList) {
|
||||
this.ptovtaDiversosInfoList = ptovtaDiversosInfoList;
|
||||
}
|
||||
|
||||
public PuntoVenta getPuntoventaId() {
|
||||
return puntoventaId;
|
||||
|
@ -161,6 +158,10 @@ public class PtovtaDiversos implements Serializable {
|
|||
this.puntoventaId = puntoventaId;
|
||||
}
|
||||
|
||||
public List<PtovtaInformacao> getPtovtaInformacaoList() {
|
||||
return ptovtaInformacaoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafael
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PTOVTA_DIVERSOS_INFO")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "PtovtaDiversosInfo.findAll", query = "SELECT p FROM PtovtaDiversosInfo p")})
|
||||
public class PtovtaDiversosInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@JoinColumn(name = "INFO_ID", referencedColumnName = "ID")
|
||||
@ManyToOne(optional = false)
|
||||
private PtovtaInformacao infoId;
|
||||
@JoinColumn(name = "DIVERSOS_ID", referencedColumnName = "ID")
|
||||
@ManyToOne(optional = false)
|
||||
private PtovtaDiversos diversosId;
|
||||
|
||||
public PtovtaDiversosInfo() {
|
||||
}
|
||||
|
||||
public PtovtaDiversosInfo(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaInformacao getInfoId() {
|
||||
return infoId;
|
||||
}
|
||||
|
||||
public void setInfoId(PtovtaInformacao infoId) {
|
||||
this.infoId = infoId;
|
||||
}
|
||||
|
||||
public PtovtaDiversos getDiversosId() {
|
||||
return diversosId;
|
||||
}
|
||||
|
||||
public void setDiversosId(PtovtaDiversos diversosId) {
|
||||
this.diversosId = diversosId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@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 PtovtaDiversosInfo)) {
|
||||
return false;
|
||||
}
|
||||
PtovtaDiversosInfo other = (PtovtaDiversosInfo) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.rjconsultores.ventaboletos.entidad.PtovtaDiversosInfo[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
}
|
|
@ -32,30 +32,31 @@ public class PtovtaEstoque implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "ESPECIE")
|
||||
private String especie;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "FORM_CONT")
|
||||
private short formCont;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "QUANTIDADE")
|
||||
private long quantidade;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "LOTEFORM")
|
||||
private long loteform;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne(optional = false)
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
public PtovtaEstoque() {
|
||||
|
@ -65,7 +66,7 @@ public class PtovtaEstoque implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaEstoque(Integer id, String especie, short formCont, long quantidade, long loteform, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaEstoque(Integer id, String especie, short formCont, long quantidade, long loteform, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.especie = especie;
|
||||
this.formCont = formCont;
|
||||
|
@ -116,11 +117,11 @@ public class PtovtaEstoque implements Serializable {
|
|||
this.loteform = loteform;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,26 +32,27 @@ public class PtovtaHorario implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "INICIO")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date inicio;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "FIM")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fim;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private int activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne(optional = false)
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
public PtovtaHorario() {
|
||||
|
@ -61,7 +62,7 @@ public class PtovtaHorario implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaHorario(Integer id, Date inicio, Date fim, int activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaHorario(Integer id, Date inicio, Date fim, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.inicio = inicio;
|
||||
this.fim = fim;
|
||||
|
@ -94,11 +95,11 @@ public class PtovtaHorario implements Serializable {
|
|||
this.fim = fim;
|
||||
}
|
||||
|
||||
public int getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(int activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ import javax.persistence.CascadeType;
|
|||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.OneToMany;
|
||||
|
@ -33,21 +35,27 @@ public class PtovtaInformacao implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "DESCRICAO")
|
||||
private String descricao;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "infoId")
|
||||
private List<PtovtaDiversosInfo> ptovtaDiversosInfoList;
|
||||
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
@JoinColumn(name = "DIVERSOS_ID", referencedColumnName = "ID")
|
||||
@ManyToOne
|
||||
private PtovtaDiversos diversosId;
|
||||
|
||||
public PtovtaInformacao() {
|
||||
}
|
||||
|
@ -56,7 +64,7 @@ public class PtovtaInformacao implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaInformacao(Integer id, String descricao, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaInformacao(Integer id, String descricao, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.descricao = descricao;
|
||||
this.activo = activo;
|
||||
|
@ -80,11 +88,11 @@ public class PtovtaInformacao implements Serializable {
|
|||
this.descricao = descricao;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
@ -104,12 +112,21 @@ public class PtovtaInformacao implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public List<PtovtaDiversosInfo> getPtovtaDiversosInfoList() {
|
||||
return ptovtaDiversosInfoList;
|
||||
|
||||
public PuntoVenta getPuntoventaId() {
|
||||
return puntoventaId;
|
||||
}
|
||||
|
||||
public void setPtovtaDiversosInfoList(List<PtovtaDiversosInfo> ptovtaDiversosInfoList) {
|
||||
this.ptovtaDiversosInfoList = ptovtaDiversosInfoList;
|
||||
public void setPuntoventaId(PuntoVenta puntoventaId) {
|
||||
this.puntoventaId = puntoventaId;
|
||||
}
|
||||
|
||||
public PtovtaDiversos getDiversosId() {
|
||||
return diversosId;
|
||||
}
|
||||
|
||||
public void setDiversosId(PtovtaDiversos diversosId) {
|
||||
this.diversosId = diversosId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,27 +35,28 @@ public class PtovtaPercentual implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "BAIXAESTACAO")
|
||||
private int baixaestacao;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "ALTAESTACAO")
|
||||
private int altaestacao;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@JoinColumn(name = "IDTIPOPERCENT", referencedColumnName = "ID")
|
||||
@ManyToOne(optional = false)
|
||||
@ManyToOne
|
||||
private PtovtaTipoPercentual idtipopercent;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "percentualId")
|
||||
private List<PtovtaComissaoPercentual> ptovtaComissaoPercentualList;
|
||||
@JoinColumn(name = "COMISSAO_ID", referencedColumnName = "ID")
|
||||
@ManyToOne
|
||||
private PtovtaComissao comissaoId;
|
||||
|
||||
public PtovtaPercentual() {
|
||||
}
|
||||
|
@ -64,7 +65,7 @@ public class PtovtaPercentual implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaPercentual(Integer id, int baixaestacao, int altaestacao, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaPercentual(Integer id, int baixaestacao, int altaestacao, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.baixaestacao = baixaestacao;
|
||||
this.altaestacao = altaestacao;
|
||||
|
@ -97,11 +98,11 @@ public class PtovtaPercentual implements Serializable {
|
|||
this.altaestacao = altaestacao;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
@ -129,14 +130,15 @@ public class PtovtaPercentual implements Serializable {
|
|||
this.idtipopercent = idtipopercent;
|
||||
}
|
||||
|
||||
public List<PtovtaComissaoPercentual> getPtovtaComissaoPercentualList() {
|
||||
return ptovtaComissaoPercentualList;
|
||||
public PtovtaComissao getComissaoId() {
|
||||
return comissaoId;
|
||||
}
|
||||
|
||||
public void setPtovtaComissaoPercentualList(List<PtovtaComissaoPercentual> ptovtaComissaoPercentualList) {
|
||||
this.ptovtaComissaoPercentualList = ptovtaComissaoPercentualList;
|
||||
public void setComissaoId(PtovtaComissao comissaoId) {
|
||||
this.comissaoId = comissaoId;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
|
|
|
@ -33,17 +33,18 @@ public class PtovtaTipoPercentual implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "DESCRICAO")
|
||||
private String descricao;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "idtipopercent")
|
||||
|
@ -56,7 +57,7 @@ public class PtovtaTipoPercentual implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaTipoPercentual(Integer id, String descricao, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaTipoPercentual(Integer id, String descricao, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.descricao = descricao;
|
||||
this.activo = activo;
|
||||
|
@ -80,11 +81,11 @@ public class PtovtaTipoPercentual implements Serializable {
|
|||
this.descricao = descricao;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,33 +33,34 @@ public class PtovtaTitular implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "NOME")
|
||||
private String nome;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "CPF")
|
||||
private String cpf;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "RG")
|
||||
private Serializable rg;
|
||||
@Basic(optional = false)
|
||||
private String rg;
|
||||
|
||||
@Column(name = "ORGAOEMISSOR")
|
||||
private String orgaoemissor;
|
||||
@Lob
|
||||
@Column(name = "IMAGEM")
|
||||
private Serializable imagem;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(name = "ACTIVO")
|
||||
private short activo;
|
||||
@Basic(optional = false)
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Basic(optional = false)
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne(optional = false)
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
|
||||
public PtovtaTitular() {
|
||||
|
@ -69,7 +70,7 @@ public class PtovtaTitular implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaTitular(Integer id, String nome, String cpf, Serializable rg, String orgaoemissor, short activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaTitular(Integer id, String nome, String cpf, String rg, String orgaoemissor, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.nome = nome;
|
||||
this.cpf = cpf;
|
||||
|
@ -104,11 +105,11 @@ public class PtovtaTitular implements Serializable {
|
|||
this.cpf = cpf;
|
||||
}
|
||||
|
||||
public Serializable getRg() {
|
||||
public String getRg() {
|
||||
return rg;
|
||||
}
|
||||
|
||||
public void setRg(Serializable rg) {
|
||||
public void setRg(String rg) {
|
||||
this.rg = rg;
|
||||
}
|
||||
|
||||
|
@ -128,11 +129,11 @@ public class PtovtaTitular implements Serializable {
|
|||
this.imagem = imagem;
|
||||
}
|
||||
|
||||
public short getActivo() {
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(short activo) {
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAgenciaBancaria;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaBanco;
|
||||
|
||||
|
||||
public interface PtovtaAgenciaBancariaService extends GenericService<PtovtaAgenciaBancaria, Integer> {
|
||||
|
||||
public List<PtovtaAgenciaBancaria> buscar(String numagencia);
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAntecipacomissao;
|
||||
|
||||
|
||||
public interface PtovtaAntecipacomissaoService extends GenericService<PtovtaAntecipacomissao, Integer> {
|
||||
|
||||
public List<PtovtaAntecipacomissao> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaBanco;
|
||||
|
||||
|
||||
public interface PtovtaBancoService extends GenericService<PtovtaBanco, Integer> {
|
||||
|
||||
public List<PtovtaBanco> buscar(String nome);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaComissaoService extends GenericService<PtovtaComissao, Integer> {
|
||||
|
||||
public List<PtovtaComissao> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaDiversos;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaDiversosService extends GenericService<PtovtaDiversos, Integer> {
|
||||
|
||||
public List<PtovtaDiversos> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaEstoqueService extends GenericService<PtovtaEstoque, Integer> {
|
||||
|
||||
public List<PtovtaEstoque> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaHorario;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaHorarioService extends GenericService<PtovtaHorario, Integer> {
|
||||
|
||||
public List<PtovtaHorario> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaInformacao;
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaInformacaoService extends GenericService<PtovtaInformacao, Integer> {
|
||||
|
||||
public List<PtovtaInformacao> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaPercentual;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public interface PtovtaPercentualService extends GenericService<PtovtaPercentual, Integer> {
|
||||
|
||||
public List<PtovtaPercentual> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTipoPercentual;
|
||||
|
||||
|
||||
|
||||
public interface PtovtaTipoPercentualService extends GenericService<PtovtaTipoPercentual, Integer> {
|
||||
|
||||
public List<PtovtaTipoPercentual> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
||||
|
||||
|
||||
public interface PtovtaTitularService extends GenericService<PtovtaTitular, Integer> {
|
||||
|
||||
public List<PtovtaTitular> buscar(int id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaAgenciaBancariaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.ProdVigencia;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAgenciaBancaria;
|
||||
import com.rjconsultores.ventaboletos.service.ProdVigenciaService;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaAgenciaBancariaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaAgenciaBancariaService")
|
||||
public class PtovtaAgenciaBancariaServiceImpl implements PtovtaAgenciaBancariaService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaAgenciaBancariaDAO ptovtaBancoDAO;
|
||||
|
||||
public List<PtovtaAgenciaBancaria> obtenerTodos() {
|
||||
return ptovtaBancoDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaAgenciaBancaria obtenerID(Integer id) {
|
||||
return ptovtaBancoDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaAgenciaBancaria suscribir(PtovtaAgenciaBancaria entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaBancoDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaAgenciaBancaria actualizacion(PtovtaAgenciaBancaria entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaBancoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaAgenciaBancaria entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaBancoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
|
||||
public List<PtovtaAgenciaBancaria> buscar(String numagencia) {
|
||||
return ptovtaBancoDAO.buscar(numagencia);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaAntecipacomissaoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaAntecipacomissao;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaAntecipacomissaoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaAntecipacomissaoService")
|
||||
public class PtovtaAntecipacomissaoServiceImpl implements PtovtaAntecipacomissaoService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaAntecipacomissaoDAO ptovtaAntecipacomissaoDAO;
|
||||
|
||||
public List<PtovtaAntecipacomissao> obtenerTodos() {
|
||||
return ptovtaAntecipacomissaoDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaAntecipacomissao obtenerID(Integer id) {
|
||||
return ptovtaAntecipacomissaoDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaAntecipacomissao suscribir(PtovtaAntecipacomissao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaAntecipacomissaoDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaAntecipacomissao actualizacion(PtovtaAntecipacomissao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaAntecipacomissaoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaAntecipacomissao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaAntecipacomissaoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaAntecipacomissao> buscar(int id) {
|
||||
return ptovtaAntecipacomissaoDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaBancoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaBanco;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaBancoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaBancoService")
|
||||
public class PtovtaBancoServiceImpl implements PtovtaBancoService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaBancoDAO ptovtaBancoDAO;
|
||||
|
||||
public List<PtovtaBanco> obtenerTodos() {
|
||||
return ptovtaBancoDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaBanco obtenerID(Integer id) {
|
||||
return ptovtaBancoDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaBanco suscribir(PtovtaBanco entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaBancoDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaBanco actualizacion(PtovtaBanco entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaBancoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaBanco entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaBancoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaBanco> buscar(String nome) {
|
||||
return ptovtaBancoDAO.buscar(nome);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaComissaoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaComissaoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaComissaoService")
|
||||
public class PtovtaComissaoServiceImpl implements PtovtaComissaoService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaComissaoDAO ptovtaComissaoDAO;
|
||||
|
||||
public List<PtovtaComissao> obtenerTodos() {
|
||||
return ptovtaComissaoDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaComissao obtenerID(Integer id) {
|
||||
return ptovtaComissaoDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaComissao suscribir(PtovtaComissao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaComissaoDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaComissao actualizacion(PtovtaComissao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaComissaoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaComissao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaComissaoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaComissao> buscar(int id) {
|
||||
return ptovtaComissaoDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaDiversosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaDiversos;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaDiversosService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaDiversosService")
|
||||
public class PtovtaDiversosServiceImpl implements PtovtaDiversosService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaDiversosDAO ptovtaDiversosDAO;
|
||||
|
||||
public List<PtovtaDiversos> obtenerTodos() {
|
||||
return ptovtaDiversosDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaDiversos obtenerID(Integer id) {
|
||||
return ptovtaDiversosDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaDiversos suscribir(PtovtaDiversos entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaDiversosDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaDiversos actualizacion(PtovtaDiversos entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaDiversosDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaDiversos entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaDiversosDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaDiversos> buscar(int id) {
|
||||
return ptovtaDiversosDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaEstoqueDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaEstoqueService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaEstoqueService")
|
||||
public class PtovtaEstoqueServiceImpl implements PtovtaEstoqueService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaEstoqueDAO ptovtaEstoqueDAO;
|
||||
|
||||
public List<PtovtaEstoque> obtenerTodos() {
|
||||
return ptovtaEstoqueDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaEstoque obtenerID(Integer id) {
|
||||
return ptovtaEstoqueDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaEstoque suscribir(PtovtaEstoque entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaEstoqueDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaEstoque actualizacion(PtovtaEstoque entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaEstoqueDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaEstoque entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaEstoqueDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaEstoque> buscar(int id) {
|
||||
return ptovtaEstoqueDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaHorarioDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaHorario;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaHorarioService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaHorarioService")
|
||||
public class PtovtaHorarioServiceImpl implements PtovtaHorarioService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaHorarioDAO ptovtaHorarioDAO;
|
||||
|
||||
public List<PtovtaHorario> obtenerTodos() {
|
||||
return ptovtaHorarioDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaHorario obtenerID(Integer id) {
|
||||
return ptovtaHorarioDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaHorario suscribir(PtovtaHorario entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaHorarioDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaHorario actualizacion(PtovtaHorario entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaHorarioDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaHorario entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaHorarioDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaHorario> buscar(int id) {
|
||||
return ptovtaHorarioDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaInformacaoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaInformacao;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaInformacaoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaInformacaoService")
|
||||
public class PtovtaInformacaoServiceImpl implements PtovtaInformacaoService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaInformacaoDAO ptovtaInformacaoDAO;
|
||||
|
||||
public List<PtovtaInformacao> obtenerTodos() {
|
||||
return ptovtaInformacaoDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaInformacao obtenerID(Integer id) {
|
||||
return ptovtaInformacaoDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaInformacao suscribir(PtovtaInformacao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaInformacaoDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaInformacao actualizacion(PtovtaInformacao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaInformacaoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaInformacao entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaInformacaoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaInformacao> buscar(int id) {
|
||||
return ptovtaInformacaoDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaPercentualDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaPercentual;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaPercentualService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaPercentualService")
|
||||
public class PtovtaPercentualServiceImpl implements PtovtaPercentualService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaPercentualDAO ptovtaPercentualDAO;
|
||||
|
||||
public List<PtovtaPercentual> obtenerTodos() {
|
||||
return ptovtaPercentualDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaPercentual obtenerID(Integer id) {
|
||||
return ptovtaPercentualDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaPercentual suscribir(PtovtaPercentual entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaPercentualDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaPercentual actualizacion(PtovtaPercentual entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaPercentualDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaPercentual entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaPercentualDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaPercentual> buscar(int id) {
|
||||
return ptovtaPercentualDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaTipoPercentualDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTipoPercentual;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaTipoPercentualService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaTipoPercentualService")
|
||||
public class PtovtaTipoPercentualServiceImpl implements PtovtaTipoPercentualService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaTipoPercentualDAO ptovtaTipoPercentualDAO;
|
||||
|
||||
public List<PtovtaTipoPercentual> obtenerTodos() {
|
||||
return ptovtaTipoPercentualDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaTipoPercentual obtenerID(Integer id) {
|
||||
return ptovtaTipoPercentualDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaTipoPercentual suscribir(PtovtaTipoPercentual entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaTipoPercentualDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaTipoPercentual actualizacion(PtovtaTipoPercentual entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaTipoPercentualDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaTipoPercentual entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaTipoPercentualDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaTipoPercentual> buscar(int id) {
|
||||
return ptovtaTipoPercentualDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PtovtaTitularDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
||||
import com.rjconsultores.ventaboletos.service.PtovtaTitularService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
@Service("ptovtaTitularService")
|
||||
public class PtovtaTitularServiceImpl implements PtovtaTitularService {
|
||||
|
||||
@Autowired
|
||||
private PtovtaTitularDAO ptovtaTitularDAO;
|
||||
|
||||
public List<PtovtaTitular> obtenerTodos() {
|
||||
return ptovtaTitularDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public PtovtaTitular obtenerID(Integer id) {
|
||||
return ptovtaTitularDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaTitular suscribir(PtovtaTitular entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaTitularDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PtovtaTitular actualizacion(PtovtaTitular entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return ptovtaTitularDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(PtovtaTitular entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
ptovtaTitularDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<PtovtaTitular> buscar(int id) {
|
||||
return ptovtaTitularDAO.buscar(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue