commit 1893727c6562c326f72f624063849a6023ec5674 Author: Isidoro Nevares Martín Date: Sun Feb 22 13:29:18 2026 +0100 Commit inicial diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..f00af9b --- /dev/null +++ b/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..e3fa57a --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + examen_ra5_red-metro_1amt + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..c0e1f3b --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=22 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=22 +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.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=22 diff --git a/bin/es/redmetro/amt1/dao/ITrenDAO.class b/bin/es/redmetro/amt1/dao/ITrenDAO.class new file mode 100644 index 0000000..fc38043 Binary files /dev/null and b/bin/es/redmetro/amt1/dao/ITrenDAO.class differ diff --git a/bin/es/redmetro/amt1/dao/impl/TrenDaoJDBC.class b/bin/es/redmetro/amt1/dao/impl/TrenDaoJDBC.class new file mode 100644 index 0000000..f87a010 Binary files /dev/null and b/bin/es/redmetro/amt1/dao/impl/TrenDaoJDBC.class differ diff --git a/bin/es/redmetro/amt1/vo/Cochera.class b/bin/es/redmetro/amt1/vo/Cochera.class new file mode 100644 index 0000000..e95ebe9 Binary files /dev/null and b/bin/es/redmetro/amt1/vo/Cochera.class differ diff --git a/bin/es/redmetro/amt1/vo/Color.class b/bin/es/redmetro/amt1/vo/Color.class new file mode 100644 index 0000000..b35bb3f Binary files /dev/null and b/bin/es/redmetro/amt1/vo/Color.class differ diff --git a/bin/es/redmetro/amt1/vo/Estacion.class b/bin/es/redmetro/amt1/vo/Estacion.class new file mode 100644 index 0000000..9f88225 Binary files /dev/null and b/bin/es/redmetro/amt1/vo/Estacion.class differ diff --git a/bin/es/redmetro/amt1/vo/Linea.class b/bin/es/redmetro/amt1/vo/Linea.class new file mode 100644 index 0000000..3b23bfe Binary files /dev/null and b/bin/es/redmetro/amt1/vo/Linea.class differ diff --git a/bin/es/redmetro/amt1/vo/LineaEstacion.class b/bin/es/redmetro/amt1/vo/LineaEstacion.class new file mode 100644 index 0000000..0329872 Binary files /dev/null and b/bin/es/redmetro/amt1/vo/LineaEstacion.class differ diff --git a/bin/es/redmetro/amt1/vo/Tren.class b/bin/es/redmetro/amt1/vo/Tren.class new file mode 100644 index 0000000..91ac12a Binary files /dev/null and b/bin/es/redmetro/amt1/vo/Tren.class differ diff --git a/src/es/redmetro/amt1/dao/ITrenDAO.java b/src/es/redmetro/amt1/dao/ITrenDAO.java new file mode 100644 index 0000000..40062d2 --- /dev/null +++ b/src/es/redmetro/amt1/dao/ITrenDAO.java @@ -0,0 +1,42 @@ +/** + * + */ +package es.redmetro.amt1.dao; + +import java.util.List; + +import es.redmetro.amt1.vo.Tren; + +/** +* Interfaz que contiene las operaciones que se van a realizar sobre Trenes +* @author Isidoro Nevares Martín - Virgen de la Paloma +* @date 4 abr 2025 +* @version 1.0 +*/ +public interface ITrenDAO { + /** + * + * @param tren + */ + public void anyadirTren(Tren tren); + + /** + * + * @param idTren + * @return + */ + public Tren buscarTrenPorID(int idTren); + + /** + * + * @return + */ + public List buscarTrenes(); + + /** + * + * @param tren + */ + public void actualizarInformacionTren(Tren tren); + +} diff --git a/src/es/redmetro/amt1/dao/impl/TrenDaoJDBC.java b/src/es/redmetro/amt1/dao/impl/TrenDaoJDBC.java new file mode 100644 index 0000000..2c9d8dc --- /dev/null +++ b/src/es/redmetro/amt1/dao/impl/TrenDaoJDBC.java @@ -0,0 +1,45 @@ +/** + * + */ +package es.redmetro.amt1.dao.impl; + +import java.sql.Connection; +import java.util.List; + +import es.redmetro.amt1.dao.ITrenDAO; +import es.redmetro.amt1.vo.Tren; + +/** +* Implementación con JDBC del interfaz ITrenDao +* @author Isidoro Nevares Martín - Virgen de la Paloma +* @date 4 abr 2025 +* @version 1.0 +*/ +public class TrenDaoJDBC implements ITrenDAO { + private Connection conexion; + + @Override + public void anyadirTren(Tren tren) { + // TODO Auto-generated method stub + + } + + @Override + public Tren buscarTrenPorID(int idTren) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List buscarTrenes() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void actualizarInformacionTren(Tren tren) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/es/redmetro/amt1/vo/Cochera.java b/src/es/redmetro/amt1/vo/Cochera.java new file mode 100644 index 0000000..275b583 --- /dev/null +++ b/src/es/redmetro/amt1/vo/Cochera.java @@ -0,0 +1,52 @@ +/** + * + */ +package es.redmetro.amt1.vo; + +/** + * Clase VO que maneja informacón de Cochera. + * + * @author Isidoro Nevares Martín - IES Virgen de la Paloma. + * @date 1 abr 2025 + * @version 1.0 + */ +public class Cochera { + + public int identificador; + public boolean esDeposito;; + public String nombre; + public String direccion; + + public int getIdentificador() { + return identificador; + } + + public void setIdentificador(int identificador) { + this.identificador = identificador; + } + + public boolean isEsDeposito() { + return esDeposito; + } + + public void setEsDeposito(boolean esDeposito) { + this.esDeposito = esDeposito; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getDireccion() { + return direccion; + } + + public void setDireccion(String direccion) { + this.direccion = direccion; + } + +} diff --git a/src/es/redmetro/amt1/vo/Color.java b/src/es/redmetro/amt1/vo/Color.java new file mode 100644 index 0000000..1bca0ff --- /dev/null +++ b/src/es/redmetro/amt1/vo/Color.java @@ -0,0 +1,43 @@ +/** + * + */ +package es.redmetro.amt1.vo; + +/** + * Clase VO que maneja información de Color. + * + * @author Isidoro Nevares Martín - IES Virgen de la Paloma + * @date 1 abr 2025 + * @version 1.0 + */ +public class Color { + + private int idColor; + private String nombre; + private String codigoHexadecimal; + + public int getIdColor() { + return idColor; + } + + public void setIdColor(int idColor) { + this.idColor = idColor; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getCodigoHexadecimal() { + return codigoHexadecimal; + } + + public void setCodigoHexadecimal(String codigoHexadecimal) { + this.codigoHexadecimal = codigoHexadecimal; + } + +} diff --git a/src/es/redmetro/amt1/vo/Estacion.java b/src/es/redmetro/amt1/vo/Estacion.java new file mode 100644 index 0000000..767099c --- /dev/null +++ b/src/es/redmetro/amt1/vo/Estacion.java @@ -0,0 +1,52 @@ +/** + * + */ +package es.redmetro.amt1.vo; + +/** + * Clase VO que maneja información de Estacion. + * + * @author Isidoro Nevares Martín - IES Virgen de la Paloma + * @date 1 abr 2025 + * @version 1.0 + */ +public class Estacion { + + private String codigo; + private String nombre; + private String direccion; + private boolean esIntercambiador; + + public String getCodigo() { + return codigo; + } + + public void setCodigo(String codigo) { + this.codigo = codigo; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getDireccion() { + return direccion; + } + + public void setDireccion(String direccion) { + this.direccion = direccion; + } + + public boolean isEsIntercambiador() { + return esIntercambiador; + } + + public void setEsIntercambiador(boolean esIntercambiador) { + this.esIntercambiador = esIntercambiador; + } + +} diff --git a/src/es/redmetro/amt1/vo/Linea.java b/src/es/redmetro/amt1/vo/Linea.java new file mode 100644 index 0000000..5b5f418 --- /dev/null +++ b/src/es/redmetro/amt1/vo/Linea.java @@ -0,0 +1,81 @@ +/** + * + */ +package es.redmetro.amt1.vo; + +import java.util.Date; + +/** + * Clase VO que maneja información de Linea. + * + * @author Isidoro Nevares Martín - IES Virgen de la Paloma + * @date 1 abr 2025 + * @version 1.0 + */ +public class Linea { + + private String codigoLinea; + private int numero; + private String nombreCorto; + private String nombreLargo; + private Date fechaInauguracion; + private String numeroKms; + private Color color; + + public String getCodigoLinea() { + return codigoLinea; + } + + public void setCodigoLinea(String codigoLinea) { + this.codigoLinea = codigoLinea; + } + + public int getNumero() { + return numero; + } + + public void setNumero(int numero) { + this.numero = numero; + } + + public String getNombreCorto() { + return nombreCorto; + } + + public void setNombreCorto(String nombreCorto) { + this.nombreCorto = nombreCorto; + } + + public String getNombreLargo() { + return nombreLargo; + } + + public void setNombreLargo(String nombreLargo) { + this.nombreLargo = nombreLargo; + } + + public Date getFechaInauguracion() { + return fechaInauguracion; + } + + public void setFechaInauguracion(Date fechaInauguracion) { + this.fechaInauguracion = fechaInauguracion; + } + + public String getNumeroKms() { + return numeroKms; + } + + public void setNumeroKms(String numeroKms) { + this.numeroKms = numeroKms; + } + + public Color getColor() { + return color; + } + + public void setColor(Color color) { + this.color = color; + } + +} diff --git a/src/es/redmetro/amt1/vo/LineaEstacion.java b/src/es/redmetro/amt1/vo/LineaEstacion.java new file mode 100644 index 0000000..18b76f0 --- /dev/null +++ b/src/es/redmetro/amt1/vo/LineaEstacion.java @@ -0,0 +1,43 @@ +/** + * + */ +package es.redmetro.amt1.vo; + +/** + * Clase VO que maneja información de Reserva. + * + * @author Isidoro Nevares Martín - IES Virgen de la Paloma + * @date 1 abr 2025 + * @version 1.0 + */ +public class LineaEstacion { + + private Linea linea; + private Estacion estacion; + private int numeroOrden; + + public Linea getLinea() { + return linea; + } + + public void setLinea(Linea linea) { + this.linea = linea; + } + + public Estacion getEstacion() { + return estacion; + } + + public void setEstacion(Estacion estacion) { + this.estacion = estacion; + } + + public int getNumeroOrden() { + return numeroOrden; + } + + public void setNumeroOrden(int numeroOrden) { + this.numeroOrden = numeroOrden; + } + +} diff --git a/src/es/redmetro/amt1/vo/Tren.java b/src/es/redmetro/amt1/vo/Tren.java new file mode 100644 index 0000000..6613510 --- /dev/null +++ b/src/es/redmetro/amt1/vo/Tren.java @@ -0,0 +1,72 @@ +/** + * + */ +package es.redmetro.amt1.vo; + +import java.util.Date; + +/** + * Clase VO que maneja información de Tren. + * + * @author Isidoro Nevares Martín - IES Virgen de la Paloma + * @date 1 abr 2025 + * @version 1.0 + */ +public class Tren { + + private String codigoTren; + private String modelo; + private String empresa; + private Date fechaReserva; + private Cochera cochera; + private Linea linea; + + public String getCodigoTren() { + return codigoTren; + } + + public void setCodigoTren(String codigoTren) { + this.codigoTren = codigoTren; + } + + public String getModelo() { + return modelo; + } + + public void setModelo(String modelo) { + this.modelo = modelo; + } + + public String getEmpresa() { + return empresa; + } + + public void setEmpresa(String empresa) { + this.empresa = empresa; + } + + public Date getFechaReserva() { + return fechaReserva; + } + + public void setFechaReserva(Date fechaReserva) { + this.fechaReserva = fechaReserva; + } + + public Cochera getCochera() { + return cochera; + } + + public void setCochera(Cochera cochera) { + this.cochera = cochera; + } + + public Linea getLinea() { + return linea; + } + + public void setLinea(Linea linea) { + this.linea = linea; + } + +}