From be39c021c857aa51aee00ded4447f18b096e0e81 Mon Sep 17 00:00:00 2001 From: "wallace.henrique" Date: Thu, 16 Nov 2023 11:04:46 -0300 Subject: [PATCH] fixes bug#AL-3498 --- pom.xml | 2 +- .../ventaboletos/dao/CorridaInfoDAO.java | 6 +++--- .../dao/hibernate/CorridaInfoHibernateDAO.java | 15 +++++++++++++++ .../ventaboletos/service/CorridaInfoService.java | 3 +++ .../service/impl/CorridaInfoServiceImpl.java | 8 ++++++++ 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index c6b831cc7..0c7076fd4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 br.com.rjconsultores ModelWeb - 1.22.0 + 1.22.1 diff --git a/src/com/rjconsultores/ventaboletos/dao/CorridaInfoDAO.java b/src/com/rjconsultores/ventaboletos/dao/CorridaInfoDAO.java index 4f429f748..e22f2298d 100644 --- a/src/com/rjconsultores/ventaboletos/dao/CorridaInfoDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/CorridaInfoDAO.java @@ -1,11 +1,11 @@ package com.rjconsultores.ventaboletos.dao; -import java.util.List; - +import com.rjconsultores.ventaboletos.entidad.Corrida; import com.rjconsultores.ventaboletos.entidad.CorridaInfo; -import com.rjconsultores.ventaboletos.entidad.EsquemaCorridaInfo; public interface CorridaInfoDAO extends GenericDAO { + void borrarByCorrida(Corrida corrida); + } diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaInfoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaInfoHibernateDAO.java index afe2ab235..aba3b4587 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaInfoHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaInfoHibernateDAO.java @@ -1,11 +1,13 @@ package com.rjconsultores.ventaboletos.dao.hibernate; +import org.hibernate.SQLQuery; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; import com.rjconsultores.ventaboletos.dao.CorridaInfoDAO; +import com.rjconsultores.ventaboletos.entidad.Corrida; import com.rjconsultores.ventaboletos.entidad.CorridaInfo; @Repository("corridaInfoDAO") @@ -15,5 +17,18 @@ public class CorridaInfoHibernateDAO extends GenericHibernateDAO { + void borrarByCorrida(Corrida corrida); + } diff --git a/src/com/rjconsultores/ventaboletos/service/impl/CorridaInfoServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/CorridaInfoServiceImpl.java index 07cab1cf6..6e103b946 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/CorridaInfoServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/CorridaInfoServiceImpl.java @@ -8,6 +8,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.rjconsultores.ventaboletos.dao.CorridaInfoDAO; +import com.rjconsultores.ventaboletos.entidad.Corrida; import com.rjconsultores.ventaboletos.entidad.CorridaInfo; import com.rjconsultores.ventaboletos.service.CorridaInfoService; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; @@ -59,4 +60,11 @@ public class CorridaInfoServiceImpl implements CorridaInfoService { corridaInfoDAO.actualizacion(entidad); } + @Transactional + + @Override + public void borrarByCorrida(Corrida corrida) { + corridaInfoDAO.borrarByCorrida(corrida); + } + }