comentarios service
This commit is contained in:
@@ -6,7 +6,7 @@ import java.sql.SQLException;
|
||||
import es.madrid.redmetro.eva1.dao.ICocheraDAO;
|
||||
import es.madrid.redmetro.eva1.dao.impl.CocheraDaoJDBC;
|
||||
import es.madrid.redmetro.eva1.excepcion.RedMetroException;
|
||||
import es.madrid.redmetro.eva1.gestores.GestorConexionesBBDD;
|
||||
import es.madrid.redmetro.eva1.gestores.GestorConexionesJDBC;
|
||||
import es.madrid.redmetro.eva1.model.Cochera;
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ public class CocheraService {
|
||||
public boolean existeCocheraPorClave(int idCochera) throws RedMetroException {
|
||||
boolean existeFP = false;
|
||||
|
||||
try (Connection conexion = GestorConexionesBBDD.obtenerConexion();) {
|
||||
try (Connection conexion = GestorConexionesJDBC.obtenerConexion();) {
|
||||
ICocheraDAO iCocheraDAO = new CocheraDaoJDBC(conexion);
|
||||
existeFP = iCocheraDAO.existeCochera(idCochera);
|
||||
} catch (SQLException e) {
|
||||
@@ -34,7 +34,7 @@ public class CocheraService {
|
||||
|
||||
public void insertarCochera(Cochera cochera) throws RedMetroException {
|
||||
|
||||
try (Connection conexion = GestorConexionesBBDD.obtenerConexion();) {
|
||||
try (Connection conexion = GestorConexionesJDBC.obtenerConexion();) {
|
||||
ICocheraDAO iCocheraDAO = new CocheraDaoJDBC(conexion);
|
||||
iCocheraDAO.insertarCochera(cochera);
|
||||
} catch (SQLException e) {
|
||||
@@ -44,7 +44,7 @@ public class CocheraService {
|
||||
|
||||
public void actualizarCochera(Cochera cochera) throws RedMetroException {
|
||||
|
||||
try (Connection conexion = GestorConexionesBBDD.obtenerConexion();) {
|
||||
try (Connection conexion = GestorConexionesJDBC.obtenerConexion();) {
|
||||
ICocheraDAO iCocheraDAO = new CocheraDaoJDBC(conexion);
|
||||
iCocheraDAO.actualizarCochera(cochera);
|
||||
} catch (SQLException e) {
|
||||
@@ -54,7 +54,7 @@ public class CocheraService {
|
||||
|
||||
public void borrarCochera(int idCochera) throws RedMetroException {
|
||||
|
||||
try (Connection conexion = GestorConexionesBBDD.obtenerConexion();) {
|
||||
try (Connection conexion = GestorConexionesJDBC.obtenerConexion();) {
|
||||
ICocheraDAO iCocheraDAO = new CocheraDaoJDBC(conexion);
|
||||
iCocheraDAO.borrarCochera(idCochera);
|
||||
} catch (SQLException e) {
|
||||
|
||||
Reference in New Issue
Block a user