diff --git a/pom.xml b/pom.xml index d6328220f..69e4099ae 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 br.com.rjconsultores ModelWeb - 1.94.0 + 1.95.0 diff --git a/src/com/rjconsultores/ventaboletos/dao/TipoIdentificacionDAO.java b/src/com/rjconsultores/ventaboletos/dao/TipoIdentificacionDAO.java index 44ca600e1..62791c967 100644 --- a/src/com/rjconsultores/ventaboletos/dao/TipoIdentificacionDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/TipoIdentificacionDAO.java @@ -8,4 +8,6 @@ public interface TipoIdentificacionDAO extends GenericDAO obtenerTodos(); + public TipoIdentificacion buscarPorNome(String descTipoDoc); + } diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/TipoIdentificacionHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/TipoIdentificacionHibernateDAO.java index d3bfe465a..c46dc1acd 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/TipoIdentificacionHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/TipoIdentificacionHibernateDAO.java @@ -1,6 +1,8 @@ package com.rjconsultores.ventaboletos.dao.hibernate; +import org.hibernate.Criteria; import org.hibernate.SessionFactory; +import org.hibernate.criterion.Restrictions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @@ -15,5 +17,13 @@ public class TipoIdentificacionHibernateDAO extends GenericHibernateDAO { public List obtenerTodos(); + public TipoIdentificacion suscribir(TipoIdentificacion tipoDocumento); + + public void borrar(TipoIdentificacion tipoDocumento); + + public TipoIdentificacion actualizacion(TipoIdentificacion tipoDocumento); + + public TipoIdentificacion buscarPorNome(String descTipoDoc); + } diff --git a/src/com/rjconsultores/ventaboletos/service/impl/TipoIdentificacionServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/TipoIdentificacionServiceImpl.java index bee4e57c4..6c533bc88 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/TipoIdentificacionServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/TipoIdentificacionServiceImpl.java @@ -4,6 +4,7 @@ import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import com.rjconsultores.ventaboletos.dao.TipoIdentificacionDAO; import com.rjconsultores.ventaboletos.entidad.TipoIdentificacion; @@ -20,4 +21,33 @@ public class TipoIdentificacionServiceImpl implements TipoIdentificacionService return tipoIdentificacionDAO.obtenerTodos(); } + @Override + public TipoIdentificacion obtenerID(Integer id) { + return tipoIdentificacionDAO.obtenerID(id); + } + + @Override + @Transactional + public TipoIdentificacion suscribir(TipoIdentificacion tipoDocumento) { + return tipoIdentificacionDAO.suscribir(tipoDocumento); + } + + @Override + @Transactional + public void borrar(TipoIdentificacion tipoDocumento) { + tipoIdentificacionDAO.borrar(tipoDocumento); + + } + + @Override + @Transactional + public TipoIdentificacion actualizacion(TipoIdentificacion tipoDocumento) { + return tipoIdentificacionDAO.actualizacion(tipoDocumento); + } + + @Override + public TipoIdentificacion buscarPorNome(String descTipoDoc) { + return tipoIdentificacionDAO.buscarPorNome(descTipoDoc); + } + }