commit 49e2c428aa5aa1e1aeda4c0e3298acc084ab9438 Author: SASI Date: Sun Nov 1 11:26:14 2026 +0100 Primer commit diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..d9faa8d --- /dev/null +++ b/.classpath @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cec185 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +.settings/ +.classpath +.project +target/ \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000..8c390b0 --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + aadd_conect03 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..7a23ad3 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=25 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=25 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=25 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/config/application.properties b/config/application.properties new file mode 100644 index 0000000..357907f --- /dev/null +++ b/config/application.properties @@ -0,0 +1,4 @@ +sgdb.conexion.url=jdbc:mysql://192.168.1.134:3306/ +bbdd.nombre=Mapa_Mundi +bbdd.usuario=root +bbdd.clave=root \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..57a0da2 --- /dev/null +++ b/pom.xml @@ -0,0 +1,30 @@ + + 4.0.0 + aadd_conect03 + aadd_conect03 + 0.0.1-SNAPSHOT + + + + com.mysql + mysql-connector-j + 26.10.0 + compile + + + + src + + + maven-compiler-plugin + 3.13.0 + + 25 + + + + + \ No newline at end of file diff --git a/src/org/palomafp/aadd/ss/AppPrincipal.java b/src/org/palomafp/aadd/ss/AppPrincipal.java new file mode 100644 index 0000000..f6cb9e5 --- /dev/null +++ b/src/org/palomafp/aadd/ss/AppPrincipal.java @@ -0,0 +1,56 @@ +package org.palomafp.aadd.ss; + +import java.util.List; + +import org.palomafp.aadd.ss.excepciones.MapaMundiException; +import org.palomafp.aadd.ss.model.Continente; +import org.palomafp.aadd.ss.service.ContinenteService; + +public class AppPrincipal { + + public static void main(String[] args) { + + ContinenteService cs = new ContinenteService(); + + try { + System.out.println("--- 1. CONSULTA DE CONTINENTES ---"); + List lista = cs.obtenerListaContinentes(); + for(Continente c : lista) { + System.out.println(c); + } + + System.out.println("\n--- 2. CONSULTAR CONTINENTE '04' ---"); + Continente c4 = cs.obtenerContinente("04"); + System.out.println("Continente obtenido: " + c4); + + if(c4 != null) { + + System.out.println("\n--- 3. BORRAR CONTINENTE '04' (TRANSACCIÓN) ---"); + cs.borrarContinenteyPaises("04"); + System.out.println("Cotinente 4 y sus paises se han borrado con exito"); + + + System.out.println("\n--- 4. REINSERTAR CONTINENTE DESDE RAM ---"); + cs.insertarContinente(c4); + System.out.println("Continente 4 se ha reinsertado"); + + System.out.println("\n--- 5. ACTUALIZAR NOMBRE A 'Paneuropa' ---"); + c4.setNombreContinente("Paneuropa"); + cs.actualizarContinente(c4); + System.out.println("Nombre actualizado a Paneuropa"); + + System.out.println("\n--- COMPROBACIÓN FINAL ---"); + Continente resultado = cs.obtenerContinente("04"); + System.out.println(resultado); + } + + + + + }catch(MapaMundiException e) { + System.out.println("Errror capturado: " + e.getMessage()); + } + + } + +} diff --git a/src/org/palomafp/aadd/ss/dao/IContinenteDAO.java b/src/org/palomafp/aadd/ss/dao/IContinenteDAO.java new file mode 100644 index 0000000..244d911 --- /dev/null +++ b/src/org/palomafp/aadd/ss/dao/IContinenteDAO.java @@ -0,0 +1,15 @@ +package org.palomafp.aadd.ss.dao; + +import org.palomafp.aadd.ss.excepciones.MapaMundiException; +import java.util.List; + +import org.palomafp.aadd.ss.model.Continente; + +public interface IContinenteDAO { + + List obtenerListaContinentes() throws MapaMundiException; + Continente obtenerContinente(String codigo) throws MapaMundiException; + int borrarContinente(String codigo) throws MapaMundiException; + int insertarContinente(Continente continente) throws MapaMundiException; + int actuaizarContinente(Continente continente) throws MapaMundiException; +} diff --git a/src/org/palomafp/aadd/ss/dao/IPaisDAO.java b/src/org/palomafp/aadd/ss/dao/IPaisDAO.java new file mode 100644 index 0000000..4d04d52 --- /dev/null +++ b/src/org/palomafp/aadd/ss/dao/IPaisDAO.java @@ -0,0 +1,17 @@ +package org.palomafp.aadd.ss.dao; + +import java.util.List; + +import org.palomafp.aadd.ss.excepciones.MapaMundiException; +import org.palomafp.aadd.ss.model.Pais; + +public interface IPaisDAO { + + List obtenerListaPaises() throws MapaMundiException; + Pais obtenerPaisPorIdentificador(int idPais) throws MapaMundiException; + int borrarPais(int idPais) throws MapaMundiException; + int insertarPais(Pais pais) throws MapaMundiException; + int actualizarPais(Pais pais) throws MapaMundiException; + int borrarPorContinente(String codContinente) throws MapaMundiException; + +} diff --git a/src/org/palomafp/aadd/ss/dao/impl/ContinenteDaoJDBC.java b/src/org/palomafp/aadd/ss/dao/impl/ContinenteDaoJDBC.java new file mode 100644 index 0000000..0fb1f77 --- /dev/null +++ b/src/org/palomafp/aadd/ss/dao/impl/ContinenteDaoJDBC.java @@ -0,0 +1,126 @@ +package org.palomafp.aadd.ss.dao.impl; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.palomafp.aadd.ss.excepciones.MapaMundiException; +import java.util.ArrayList; +import java.util.List; + +import org.palomafp.aadd.ss.dao.IContinenteDAO; +import org.palomafp.aadd.ss.model.Continente; + +public class ContinenteDaoJDBC implements IContinenteDAO{ + + private final Connection conexion; + + public ContinenteDaoJDBC(Connection conexion) { + this.conexion = conexion; + } + + + @Override + public List obtenerListaContinentes() throws MapaMundiException { + List listaContinentes = new ArrayList<>(); + String sql = "SELECT * FROM T_CONTINENTE"; + + try(PreparedStatement sentencia = conexion.prepareStatement(sql); + ResultSet resultado = sentencia.executeQuery()){ + while(resultado.next()) { + listaContinentes.add(new Continente(resultado.getString("codigo"), resultado.getString("nombre_continente"))); + } + } catch (SQLException e) { + throw new MapaMundiException("Erro al obtener los continentes" + e); + } + return listaContinentes; + } + + @Override + public Continente obtenerContinente(String codigo) throws MapaMundiException { + Continente c = null; + String sql = "SELECT * FROM T_CONTINENTE WHERE codigo = ?"; + + try(PreparedStatement sentencia = conexion.prepareStatement(sql)){ + sentencia.setString(1, codigo); + try(ResultSet resultado = sentencia.executeQuery()){ + if(resultado.next()) { + c = new Continente(resultado.getString("codigo"), resultado.getString("nombre_continente")); + } + } catch (SQLException e) { + throw new MapaMundiException("Erro al obtener los continentes" + e); + + } + } catch (SQLException e1) { + e1.printStackTrace(); + } + return c; + } + + @Override + public int borrarContinente(String codigo) throws MapaMundiException { + String sql = "DELETE FROM T_CONTINENTE WHERE codigo = ?"; + try(PreparedStatement sentencia = conexion.prepareStatement(sql)){ + sentencia.setString(1, codigo); + return sentencia.executeUpdate(); + + } catch (SQLException e) { + throw new MapaMundiException("Erro al obtener los continente" + e); + + } + + } + + @Override + public int insertarContinente(Continente continente) throws MapaMundiException { + String sql = "INSERT INTO T_CONTINENTE (codigo, nombre_continente) VALUES (?, ?)"; + + try(PreparedStatement sentencia = conexion.prepareStatement(sql)){ + sentencia.setString(1, continente.getCodContinente()); + sentencia.setString(2, continente.getNombreContinente()); + return sentencia.executeUpdate(); + + } catch (SQLException e) { + throw new MapaMundiException("Erro al obtener los continentes" + e); + + } + + } + + @Override + public int actuaizarContinente(Continente continente) throws MapaMundiException { + String sql = "UPDATE T_CONTINENTE SET nombre_continente = ? WHERE codigo = ?"; + + try (PreparedStatement ps = conexion.prepareStatement(sql)) { + ps.setString(1, continente.getNombreContinente()); + ps.setString(2, continente.getCodContinente()); + return ps.executeUpdate(); + } catch (SQLException e) { + throw new MapaMundiException("Erro al obtener los continentes" + e); + + } + } +} + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/org/palomafp/aadd/ss/dao/impl/PaisDaoJDBC.java b/src/org/palomafp/aadd/ss/dao/impl/PaisDaoJDBC.java new file mode 100644 index 0000000..d0e7699 --- /dev/null +++ b/src/org/palomafp/aadd/ss/dao/impl/PaisDaoJDBC.java @@ -0,0 +1,151 @@ +package org.palomafp.aadd.ss.dao.impl; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.palomafp.aadd.ss.dao.IPaisDAO; +import org.palomafp.aadd.ss.excepciones.MapaMundiException; +import org.palomafp.aadd.ss.model.Pais; + +public class PaisDaoJDBC implements IPaisDAO{ + + private Connection conexion; + + public PaisDaoJDBC(Connection conexion) { + this.conexion = conexion; + } + + @Override + public List obtenerListaPaises() throws MapaMundiException { + List lista = new ArrayList<>(); + String sql = "SELECT * FROM T_PAIS"; + + try (PreparedStatement ps = conexion.prepareStatement(sql); + ResultSet rs = ps.executeQuery()) { + while (rs.next()) { + lista.add(new Pais( + rs.getString("cod_continente"), + rs.getInt("identificador"), + rs.getString("nombre_pais"), + rs.getString("capital") + )); + } + } catch (SQLException e) { + throw new MapaMundiException("Error al obtener los paises" + e); + } + return lista; + } + + @Override + public Pais obtenerPaisPorIdentificador(int idPais) throws MapaMundiException { + Pais pais = null; + String sql = "SELECT cod_continente, identificador, nombre_pais, capital FROM T_PAIS WHERE identificador = ?"; + + try (PreparedStatement ps = conexion.prepareStatement(sql)) { + ps.setInt(1, idPais); + try (ResultSet rs = ps.executeQuery()) { + if (rs.next()) { + pais = new Pais( + rs.getString("cod_continente"), + rs.getInt("identificador"), + rs.getString("nombre_pais"), + rs.getString("capital") + ); + } + } catch (SQLException e) { + throw new MapaMundiException("Error al obenter pais con el id: " + idPais + e); + } + } catch (SQLException e1) { + e1.printStackTrace(); + } + return pais; + + } + @Override + public int borrarPais(int idPais) throws MapaMundiException { + String sql = "DELETE FROM T_PAIS WHERE identificador = ?"; + + try (PreparedStatement ps = conexion.prepareStatement(sql)) { + ps.setInt(1, idPais); + return ps.executeUpdate(); + + } catch (SQLException e) { + throw new MapaMundiException("Error al borrar el pais con el id: " + idPais + e); + } + } + + + @Override + public int insertarPais(Pais pais) throws MapaMundiException { + String sql = "INSERT INTO T_PAIS (cod_continente, identificador, nombre_pais, capital) VALUES (?, ?, ?, ?)"; + + try (PreparedStatement ps = conexion.prepareStatement(sql)) { + ps.setString(1, pais.getCodContinente()); + ps.setInt(2, pais.getIdentificador()); + ps.setString(3, pais.getNombrePais()); + ps.setString(4, pais.getCapital()); + return ps.executeUpdate(); + + } catch (SQLException e) { + throw new MapaMundiException("Error al insertar el pais " + e); + + } + } + + @Override + public int actualizarPais(Pais pais) throws MapaMundiException { + String sql = "UPDATE T_PAIS SET cod_continente = ?, nombre_pais = ?, capital = ? WHERE identificador = ?"; + + try (PreparedStatement ps = conexion.prepareStatement(sql)) { + ps.setString(1, pais.getCodContinente()); + ps.setString(2, pais.getNombrePais()); + ps.setString(3, pais.getCapital()); + ps.setInt(4, pais.getIdentificador()); + return ps.executeUpdate(); + } catch (SQLException e) { + throw new MapaMundiException("Error al actualizar el pais " + e); + + } + } + + @Override + public int borrarPorContinente(String codContinente) throws MapaMundiException { + String sql = "DELETE FROM T_PAIS WHERE cod_continente = ?"; + + try (PreparedStatement ps = conexion.prepareStatement(sql)) { + ps.setString(1, codContinente); + return ps.executeUpdate(); + } catch (SQLException e) { + throw new MapaMundiException("Error al borrar paices por continente" + e); + } + + } +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/org/palomafp/aadd/ss/excepciones/MapaMundiException.java b/src/org/palomafp/aadd/ss/excepciones/MapaMundiException.java new file mode 100644 index 0000000..52522a0 --- /dev/null +++ b/src/org/palomafp/aadd/ss/excepciones/MapaMundiException.java @@ -0,0 +1,13 @@ +package org.palomafp.aadd.ss.excepciones; + +public class MapaMundiException extends Exception{ + + public MapaMundiException(String mensaje) { + super(mensaje); + } + + public MapaMundiException(String mensaje, Throwable causa) { + super(mensaje, causa); + } + +} diff --git a/src/org/palomafp/aadd/ss/gestores/GestorConfiguracion.java b/src/org/palomafp/aadd/ss/gestores/GestorConfiguracion.java new file mode 100644 index 0000000..66732c9 --- /dev/null +++ b/src/org/palomafp/aadd/ss/gestores/GestorConfiguracion.java @@ -0,0 +1,46 @@ +package org.palomafp.aadd.ss.gestores; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +public class GestorConfiguracion { + + private static final String RUTA_CONFIG = "application.properties"; + private static final Properties PROPIEDADES = new Properties(); + + static { + try(InputStream inputStream = GestorConfiguracion.class.getClassLoader().getResourceAsStream(RUTA_CONFIG)){ + + + if ( inputStream == null) { + throw new IOException("No se ha podido encontrar el archivo de configuracion"); + } + + PROPIEDADES.load(inputStream); + + } catch (IOException e) { + throw new RuntimeException("No ha podido cargar el archivo" + e); + } + } + + + + public static String getConexionURL() { + return PROPIEDADES.getProperty("sgdb.conexion.url"); + } + + public static String getNombreBBDD() { + return PROPIEDADES.getProperty("bbdd.nombre"); + } + + public static String getUsuarioBBDD() { + return PROPIEDADES.getProperty("bbdd.usuario"); + } + + public static String getClaveBBDD() { + return PROPIEDADES.getProperty("bbdd.clave"); + } + + +} diff --git a/src/org/palomafp/aadd/ss/gestores/GestroConexionBBDD.java b/src/org/palomafp/aadd/ss/gestores/GestroConexionBBDD.java new file mode 100644 index 0000000..70b0b97 --- /dev/null +++ b/src/org/palomafp/aadd/ss/gestores/GestroConexionBBDD.java @@ -0,0 +1,21 @@ +package org.palomafp.aadd.ss.gestores; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; + +public class GestroConexionBBDD { + + private GestroConexionBBDD() { + + } + + public static Connection obtenerConexion() throws SQLException { + String url = GestorConfiguracion.getConexionURL() + GestorConfiguracion.getNombreBBDD(); + String usuario = GestorConfiguracion.getUsuarioBBDD(); + String clave = GestorConfiguracion.getClaveBBDD(); + + return DriverManager.getConnection(url, usuario, clave); + } + +} diff --git a/src/org/palomafp/aadd/ss/model/Continente.java b/src/org/palomafp/aadd/ss/model/Continente.java new file mode 100644 index 0000000..8f2193f --- /dev/null +++ b/src/org/palomafp/aadd/ss/model/Continente.java @@ -0,0 +1,40 @@ +package org.palomafp.aadd.ss.model; + +public class Continente { + + private String codContinente; + private String nombreContinente; + + public Continente() {} + + public Continente(String codContinente, String nombreContinente) { + this.codContinente = codContinente; + this.nombreContinente = nombreContinente; + } + + public String getCodContinente() { + return codContinente; + } + + public void setCodContinente(String codContinente) { + this.codContinente = codContinente; + } + + public String getNombreContinente() { + return nombreContinente; + } + + public void setNombreContinente(String nombreContinente) { + this.nombreContinente = nombreContinente; + } + + @Override + public String toString() { + return "Continente [codContinente=" + codContinente + ", nombreContinente=" + nombreContinente + "]"; + } + + + + + +} diff --git a/src/org/palomafp/aadd/ss/model/Pais.java b/src/org/palomafp/aadd/ss/model/Pais.java new file mode 100644 index 0000000..56dd641 --- /dev/null +++ b/src/org/palomafp/aadd/ss/model/Pais.java @@ -0,0 +1,48 @@ +package org.palomafp.aadd.ss.model; + +public class Pais { + private String codContinente; + private int identificador; + private String nombrePais; + private String capital; + + public Pais() { + + } + + public Pais(String codContinente, int identificador, String nombrePais, String capital) { + this.codContinente = codContinente; + this.identificador = identificador; + this.nombrePais = nombrePais; + this.capital = capital; + } + public String getCodContinente() { + return codContinente; + } + public void setCodContinente(String codContinente) { + this.codContinente = codContinente; + } + public int getIdentificador() { + return identificador; + } + public void setIdentificador(int identificador) { + this.identificador = identificador; + } + public String getNombrePais() { + return nombrePais; + } + public void setNombrePais(String nombrePais) { + this.nombrePais = nombrePais; + } + public String getCapital() { + return capital; + } + public void setCapital(String capital) { + this.capital = capital; + } + @Override + public String toString() { + return "Pais [codContinente=" + codContinente + ", identificador=" + identificador + ", nombrePais=" + + nombrePais + ", capital=" + capital + "]"; + } +} diff --git a/src/org/palomafp/aadd/ss/service/ContinenteService.java b/src/org/palomafp/aadd/ss/service/ContinenteService.java new file mode 100644 index 0000000..6f9fa4c --- /dev/null +++ b/src/org/palomafp/aadd/ss/service/ContinenteService.java @@ -0,0 +1,118 @@ +package org.palomafp.aadd.ss.service; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; + +import org.palomafp.aadd.ss.dao.IContinenteDAO; +import org.palomafp.aadd.ss.dao.IPaisDAO; +import org.palomafp.aadd.ss.dao.impl.ContinenteDaoJDBC; +import org.palomafp.aadd.ss.dao.impl.PaisDaoJDBC; +import org.palomafp.aadd.ss.excepciones.MapaMundiException; +import org.palomafp.aadd.ss.gestores.GestroConexionBBDD; +import org.palomafp.aadd.ss.model.Continente; + +public class ContinenteService { + + public List obtenerListaContinentes() throws MapaMundiException { + try(Connection conexion = GestroConexionBBDD.obtenerConexion()){ + + IContinenteDAO continenteDao = new ContinenteDaoJDBC(conexion); + return continenteDao.obtenerListaContinentes(); + + } catch (SQLException e) { + throw new MapaMundiException("Error de conexión al obtener los continentes", e); + } + } + + + + public Continente obtenerContinente(String codigo) throws MapaMundiException{ + try(Connection conexion = GestroConexionBBDD.obtenerConexion()){ + + IContinenteDAO continenteDao = new ContinenteDaoJDBC(conexion); + return continenteDao.obtenerContinente(codigo); + + } catch (SQLException e) { + throw new MapaMundiException("Error de conexión al obtener el continente " + codigo, e); + } + } + + + public int insertarContinente(Continente continente) throws MapaMundiException { + try (Connection conexion = GestroConexionBBDD.obtenerConexion()) { + IContinenteDAO continenteDao = new ContinenteDaoJDBC(conexion); + return continenteDao.insertarContinente(continente); + } catch (SQLException e) { + throw new MapaMundiException("Error de conexión al insertar el continente " + e); + } + + } + + + + public int actualizarContinente(Continente c) throws MapaMundiException{ + try(Connection conexion = GestroConexionBBDD.obtenerConexion()){ + IContinenteDAO continenteDao = new ContinenteDaoJDBC(conexion); + return continenteDao.actuaizarContinente(c); + } catch (SQLException e) { + throw new MapaMundiException("Error al insertar el continente " + c.getCodContinente(), e); + } + } + + + public void borrarContinenteyPaises(String codigo) throws MapaMundiException { + try(Connection conexion = GestroConexionBBDD.obtenerConexion()){ + try { + conexion.setAutoCommit(false); + + IPaisDAO paisDao = new PaisDaoJDBC(conexion); + IContinenteDAO continenteDao = new ContinenteDaoJDBC(conexion); + + paisDao.borrarPorContinente(codigo); + continenteDao.borrarContinente(codigo); + + conexion.commit(); + + + }catch (MapaMundiException e) { + conexion.rollback(); + throw e; + } + }catch(SQLException e) { + throw new MapaMundiException("Error al borrar el cotinente " + e); + } + } + + + + /** + public void borrarConPaises(String codigo) throws MapaMundiException { + try (Connection conexion = GestorConexionBBDD.getConexion()) { + try { + conexion.setAutoCommit(false); + + IPaisDAO paisDao = new PaisDaoJDBC(conexion); + IContinenteDAO continenteDao = new ContinenteDaoJDBC(conexion); + + paisDao.borrarPorContinente(codigo); + + // 2. Borrar el continente + continenteDao.borrar(codigo); + + // 3. Confirmar los dos borrados a la vez + conexion.commit(); + + } catch (MapaMundiException e) { + conexion.rollback(); // Si algo falla deshace todo + throw e; // Se lanza la misma excepción que se atrapó hacia arriba (al main) + } + } catch (SQLException e) { + throw new MapaMundiException("Error en el borrado del continente " + codigo, e); + } + } + **/ + + + +} diff --git a/src/org/palomafp/aadd/ss/service/PaisService.java b/src/org/palomafp/aadd/ss/service/PaisService.java new file mode 100644 index 0000000..b4cf2b5 --- /dev/null +++ b/src/org/palomafp/aadd/ss/service/PaisService.java @@ -0,0 +1,5 @@ +package org.palomafp.aadd.ss.service; + +public class PaisService { + +} diff --git a/target/classes/META-INF/MANIFEST.MF b/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000..cc2533d --- /dev/null +++ b/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Java-Version: 25 +Build-Jdk-Spec: 25 +Created-By: Maven Integration for Eclipse + diff --git a/target/classes/META-INF/maven/aadd_conect03/aadd_conect03/pom.properties b/target/classes/META-INF/maven/aadd_conect03/aadd_conect03/pom.properties new file mode 100644 index 0000000..70ca8af --- /dev/null +++ b/target/classes/META-INF/maven/aadd_conect03/aadd_conect03/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Sat Oct 31 22:02:11 CET 2026 +artifactId=aadd_conect03 +groupId=aadd_conect03 +m2e.projectLocation=C\:\\Users\\sajed\\Desktop\\2DAM\\AADD\\eclipse-workspace\\aadd_conect03 +m2e.projectName=aadd_conect03 +version=0.0.1-SNAPSHOT diff --git a/target/classes/META-INF/maven/aadd_conect03/aadd_conect03/pom.xml b/target/classes/META-INF/maven/aadd_conect03/aadd_conect03/pom.xml new file mode 100644 index 0000000..57a0da2 --- /dev/null +++ b/target/classes/META-INF/maven/aadd_conect03/aadd_conect03/pom.xml @@ -0,0 +1,30 @@ + + 4.0.0 + aadd_conect03 + aadd_conect03 + 0.0.1-SNAPSHOT + + + + com.mysql + mysql-connector-j + 26.10.0 + compile + + + + src + + + maven-compiler-plugin + 3.13.0 + + 25 + + + + + \ No newline at end of file diff --git a/target/classes/application.properties b/target/classes/application.properties new file mode 100644 index 0000000..357907f --- /dev/null +++ b/target/classes/application.properties @@ -0,0 +1,4 @@ +sgdb.conexion.url=jdbc:mysql://192.168.1.134:3306/ +bbdd.nombre=Mapa_Mundi +bbdd.usuario=root +bbdd.clave=root \ No newline at end of file diff --git a/target/classes/org/palomafp/aadd/ss/AppPrincipal.class b/target/classes/org/palomafp/aadd/ss/AppPrincipal.class new file mode 100644 index 0000000..f02369f Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/AppPrincipal.class differ diff --git a/target/classes/org/palomafp/aadd/ss/dao/IContinenteDAO.class b/target/classes/org/palomafp/aadd/ss/dao/IContinenteDAO.class new file mode 100644 index 0000000..0bba067 Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/dao/IContinenteDAO.class differ diff --git a/target/classes/org/palomafp/aadd/ss/dao/IPaisDAO.class b/target/classes/org/palomafp/aadd/ss/dao/IPaisDAO.class new file mode 100644 index 0000000..4359a2d Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/dao/IPaisDAO.class differ diff --git a/target/classes/org/palomafp/aadd/ss/dao/impl/ContinenteDaoJDBC.class b/target/classes/org/palomafp/aadd/ss/dao/impl/ContinenteDaoJDBC.class new file mode 100644 index 0000000..8987318 Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/dao/impl/ContinenteDaoJDBC.class differ diff --git a/target/classes/org/palomafp/aadd/ss/dao/impl/PaisDaoJDBC.class b/target/classes/org/palomafp/aadd/ss/dao/impl/PaisDaoJDBC.class new file mode 100644 index 0000000..d0c230e Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/dao/impl/PaisDaoJDBC.class differ diff --git a/target/classes/org/palomafp/aadd/ss/excepciones/MapaMundiException.class b/target/classes/org/palomafp/aadd/ss/excepciones/MapaMundiException.class new file mode 100644 index 0000000..73b90ac Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/excepciones/MapaMundiException.class differ diff --git a/target/classes/org/palomafp/aadd/ss/gestores/GestorConfiguracion.class b/target/classes/org/palomafp/aadd/ss/gestores/GestorConfiguracion.class new file mode 100644 index 0000000..9609298 Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/gestores/GestorConfiguracion.class differ diff --git a/target/classes/org/palomafp/aadd/ss/gestores/GestroConexionBBDD.class b/target/classes/org/palomafp/aadd/ss/gestores/GestroConexionBBDD.class new file mode 100644 index 0000000..3eb369f Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/gestores/GestroConexionBBDD.class differ diff --git a/target/classes/org/palomafp/aadd/ss/model/Continente.class b/target/classes/org/palomafp/aadd/ss/model/Continente.class new file mode 100644 index 0000000..037966c Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/model/Continente.class differ diff --git a/target/classes/org/palomafp/aadd/ss/model/Pais.class b/target/classes/org/palomafp/aadd/ss/model/Pais.class new file mode 100644 index 0000000..dcdb9fa Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/model/Pais.class differ diff --git a/target/classes/org/palomafp/aadd/ss/service/ContinenteService.class b/target/classes/org/palomafp/aadd/ss/service/ContinenteService.class new file mode 100644 index 0000000..87a5a14 Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/service/ContinenteService.class differ diff --git a/target/classes/org/palomafp/aadd/ss/service/PaisService.class b/target/classes/org/palomafp/aadd/ss/service/PaisService.class new file mode 100644 index 0000000..0049b9b Binary files /dev/null and b/target/classes/org/palomafp/aadd/ss/service/PaisService.class differ