Actividad2.2-Manipulacion datos BBDD-DAO
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package org.palomafp.aadd.ljl.model;
|
||||
|
||||
public class Continente {
|
||||
|
||||
private String codigo;
|
||||
private String nombre;
|
||||
|
||||
// Constructores
|
||||
public Continente() {
|
||||
|
||||
}
|
||||
public Continente(String codigo, String nombre) {
|
||||
super();
|
||||
this.codigo = codigo;
|
||||
this.nombre = nombre;
|
||||
}
|
||||
|
||||
|
||||
// Getters y setters
|
||||
public String getCodigo() {
|
||||
return codigo;
|
||||
}
|
||||
public String getNombre() {
|
||||
return nombre;
|
||||
}
|
||||
|
||||
public void setCodigo(String codigo) {
|
||||
this.codigo = codigo;
|
||||
}
|
||||
public void setNombre(String nombre) {
|
||||
this.nombre = nombre;
|
||||
}
|
||||
|
||||
// Generamos el método toString
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Continente [codigo=" + codigo + ", nombre=" + nombre + "]";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.palomafp.aadd.ljl.model;
|
||||
|
||||
public class Pais {
|
||||
|
||||
private String codContinente;
|
||||
private int identificador;
|
||||
private String nombrePais;
|
||||
private String capital;
|
||||
|
||||
// constructores
|
||||
public Pais(){
|
||||
|
||||
}
|
||||
|
||||
public Pais(String codContinente, int identificador, String nombrePais, String capital) {
|
||||
super();
|
||||
this.codContinente = codContinente;
|
||||
this.identificador = identificador;
|
||||
this.nombrePais = nombrePais;
|
||||
this.capital = capital;
|
||||
}
|
||||
|
||||
// getters y setters
|
||||
public String getCodContinente() {
|
||||
return codContinente;
|
||||
}
|
||||
public int getIdentificador() {
|
||||
return identificador;
|
||||
}
|
||||
public String getNombrePais() {
|
||||
return nombrePais;
|
||||
}
|
||||
public String getCapital() {
|
||||
return capital;
|
||||
}
|
||||
|
||||
public void setCodContinente(String codContinente) {
|
||||
this.codContinente = codContinente;
|
||||
}
|
||||
public void setIdentificador(int identificador) {
|
||||
this.identificador = identificador;
|
||||
}
|
||||
public void setNombrePais(String nombrePais) {
|
||||
this.nombrePais = nombrePais;
|
||||
}
|
||||
public void setCapital(String capital) {
|
||||
this.capital = capital;
|
||||
}
|
||||
|
||||
// sobrescribimos el método toString
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Pais [codContinente=" + codContinente + ", identificador=" + identificador + ", nombrePais="
|
||||
+ nombrePais + ", capital=" + capital + "]";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user