This commit is contained in:
clement.bouillot 2021-10-20 08:19:26 +02:00
parent 1062bf48b2
commit 0704ab7cd2

@ -7,73 +7,32 @@ import java.util.Objects;
/**
*
* @author Dominique_2
* @author Clément B
*/
public class Pompier {
private int id;
private String civilite;
private int idCaserne;
private String nom;
private String prenom;
private String statut;
private int typePers;
private String mail;
private String login;
private String mdp;
private int adrNo;
private String adrRue;
private String adrVille;
private String adrCP;
private String adrmail;
private String tel;
private String dateNais;
private String adresse;
private String cp;
private String ville;
private int bip;
private int nbGardes;
private int grade;
private String commentaire;
private String dateEnreg;
private String dateModif;
private int idEquipe;
public Pompier() {
}
/**
* Constructeur entier
* @param id
* @param civilite
* @param nom
* @param prenom
* @param mdp
* @param adrNo
* @param adrRue
* @param adrVille
* @param adrCP
* @param adrmail
* @param tel
* @param dateNais
*/
public Pompier(int id, String civilite, String nom, String prenom, String mdp, int adrNo, String adrRue, String adrVille, String adrCP, String adrmail, String tel, String dateNais) {
this(civilite, nom, prenom, mdp, adrNo, adrRue, adrVille, adrCP, adrmail, tel, dateNais);
this.id = id;
}
/**
* Constructeur sans id
* @param civilite
* @param nom
* @param prenom
* @param mdp
* @param adrNo
* @param adrRue
* @param adrVille
* @param adrCP
* @param adrmail
* @param tel
* @param dateNais
*/
public Pompier(String civilite, String nom, String prenom, String mdp, int adrNo, String adrRue, String adrVille, String adrCP, String adrmail, String tel, String dateNais) {
this.civilite = civilite;
this.nom = nom;
this.prenom = prenom;
this.mdp = mdp;
this.adrNo = adrNo;
this.adrRue = adrRue;
this.adrVille = adrVille;
this.adrCP = adrCP;
this.adrmail = adrmail;
this.tel = tel;
this.dateNais = dateNais;
}
public int getId() {
return id;
}
@ -82,12 +41,12 @@ public class Pompier {
this.id = id;
}
public String getCivilite() {
return civilite;
public int getIdCaserne() {
return idCaserne;
}
public void setCivilite(String civilite) {
this.civilite = civilite;
public void setIdCaserne(int idCaserne) {
this.idCaserne = idCaserne;
}
public String getNom() {
@ -106,6 +65,38 @@ public class Pompier {
this.prenom = prenom;
}
public String getStatut() {
return statut;
}
public void setStatut(String statut) {
this.statut = statut;
}
public int getTypePers() {
return typePers;
}
public void setTypePers(int typePers) {
this.typePers = typePers;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
this.mail = mail;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public String getMdp() {
return mdp;
}
@ -114,77 +105,108 @@ public class Pompier {
this.mdp = mdp;
}
public int getAdrNo() {
return adrNo;
public String getAdresse() {
return adresse;
}
public void setAdrNo(int adrNo) {
this.adrNo = adrNo;
public void setAdresse(String adresse) {
this.adresse = adresse;
}
public String getAdrRue() {
return adrRue;
public String getCp() {
return cp;
}
public void setAdrRue(String adrRue) {
this.adrRue = adrRue;
public void setCp(String cp) {
this.cp = cp;
}
public String getAdrVille() {
return adrVille;
public String getVille() {
return ville;
}
public void setAdrVille(String adrVille) {
this.adrVille = adrVille;
public void setVille(String dateNais) {
this.ville = dateNais;
}
public String getAdrCP() {
return adrCP;
public int getBip() {
return bip;
}
public void setAdrCP(String adrCP) {
this.adrCP = adrCP;
public void setBip(int bip) {
this.bip = bip;
}
public String getAdrmail() {
return adrmail;
public int getNbGardes() {
return nbGardes;
}
public void setAdrmail(String adrmail) {
this.adrmail = adrmail;
public void setNbGardes(int nbGardes) {
this.nbGardes = nbGardes;
}
public String getTel() {
return tel;
public int getGrade() {
return grade;
}
public void setTel(String tel) {
this.tel = tel;
public void setGrade(int grade) {
this.grade = grade;
}
public String getDateNais() {
return dateNais;
public String getCommentaire() {
return commentaire;
}
public void setDateNais(String dateNais) {
this.dateNais = dateNais;
public void setCommentaire(String commentaire) {
this.commentaire = commentaire;
}
public String getDateEnreg() {
return dateEnreg;
}
public void setDateEnreg(String dateEnreg) {
this.dateEnreg = dateEnreg;
}
public String getDateModif() {
return dateModif;
}
public void setDateModif(String dateModif) {
this.dateModif = dateModif;
}
public int getIdEquipe() {
return idEquipe;
}
public void setIdEquipe(int idEquipe) {
this.idEquipe = idEquipe;
}
@Override
public int hashCode() {
int hash = 5;
hash = 17 * hash + this.id;
hash = 17 * hash + Objects.hashCode(this.civilite);
hash = 17 * hash + Objects.hashCode(this.nom);
hash = 17 * hash + Objects.hashCode(this.prenom);
hash = 17 * hash + Objects.hashCode(this.mdp);
hash = 17 * hash + this.adrNo;
hash = 17 * hash + Objects.hashCode(this.adrRue);
hash = 17 * hash + Objects.hashCode(this.adrVille);
hash = 17 * hash + Objects.hashCode(this.adrCP);
hash = 17 * hash + Objects.hashCode(this.adrmail);
hash = 17 * hash + Objects.hashCode(this.tel);
hash = 17 * hash + Objects.hashCode(this.dateNais);
int hash = 7;
hash = 59 * hash + this.id;
hash = 59 * hash + Objects.hashCode(this.idCaserne);
hash = 59 * hash + Objects.hashCode(this.nom);
hash = 59 * hash + Objects.hashCode(this.prenom);
hash = 59 * hash + Objects.hashCode(this.statut);
hash = 59 * hash + this.typePers;
hash = 59 * hash + Objects.hashCode(this.mail);
hash = 59 * hash + Objects.hashCode(this.login);
hash = 59 * hash + Objects.hashCode(this.mdp);
hash = 59 * hash + Objects.hashCode(this.adresse);
hash = 59 * hash + Objects.hashCode(this.cp);
hash = 59 * hash + Objects.hashCode(this.ville);
hash = 59 * hash + Objects.hashCode(this.bip);
hash = 59 * hash + this.nbGardes;
hash = 59 * hash + this.grade;
hash = 59 * hash + Objects.hashCode(this.commentaire);
hash = 59 * hash + Objects.hashCode(this.dateEnreg);
hash = 59 * hash + Objects.hashCode(this.dateModif);
hash = 59 * hash + this.idEquipe;
return hash;
}
@ -203,10 +225,19 @@ public class Pompier {
if (this.id != other.id) {
return false;
}
if (this.adrNo != other.adrNo) {
if (this.typePers != other.typePers) {
return false;
}
if (!Objects.equals(this.civilite, other.civilite)) {
if (this.nbGardes != other.nbGardes) {
return false;
}
if (this.grade != other.grade) {
return false;
}
if (this.idEquipe != other.idEquipe) {
return false;
}
if (!Objects.equals(this.idCaserne, other.idCaserne)) {
return false;
}
if (!Objects.equals(this.nom, other.nom)) {
@ -215,25 +246,37 @@ public class Pompier {
if (!Objects.equals(this.prenom, other.prenom)) {
return false;
}
if (!Objects.equals(this.statut, other.statut)) {
return false;
}
if (!Objects.equals(this.mail, other.mail)) {
return false;
}
if (!Objects.equals(this.login, other.login)) {
return false;
}
if (!Objects.equals(this.mdp, other.mdp)) {
return false;
}
if (!Objects.equals(this.adrRue, other.adrRue)) {
if (!Objects.equals(this.adresse, other.adresse)) {
return false;
}
if (!Objects.equals(this.adrVille, other.adrVille)) {
if (!Objects.equals(this.cp, other.cp)) {
return false;
}
if (!Objects.equals(this.adrCP, other.adrCP)) {
if (!Objects.equals(this.ville, other.ville)) {
return false;
}
if (!Objects.equals(this.adrmail, other.adrmail)) {
if (!Objects.equals(this.bip, other.bip)) {
return false;
}
if (!Objects.equals(this.tel, other.tel)) {
if (!Objects.equals(this.commentaire, other.commentaire)) {
return false;
}
if (!Objects.equals(this.dateNais, other.dateNais)) {
if (!Objects.equals(this.dateEnreg, other.dateEnreg)) {
return false;
}
if (!Objects.equals(this.dateModif, other.dateModif)) {
return false;
}
return true;
@ -241,7 +284,8 @@ public class Pompier {
@Override
public String toString() {
return "Client{" + "id=" + id + ", civilite=" + civilite + ", nom=" + nom + ", prenom=" + prenom + ", mdp=" + mdp + ", adrNo=" + adrNo + ", adrRue=" + adrRue + ", adrVille=" + adrVille + ", adrCP=" + adrCP + ", adrmail=" + adrmail + ", tel=" + tel + ", dateNais=" + dateNais + '}';
return "Pompier{" + "id=" + id + ", idCaserne=" + idCaserne + ", nom=" + nom + ", prenom=" + prenom + ", statut=" + statut + ", typePers=" + typePers + ", mail=" + mail + ", login=" + login + ", mdp=" + mdp + ", adresse=" + adresse + ", cp=" + cp + ", ville=" + ville + ", bip=" + bip + ", nbGardes=" + nbGardes + ", grade=" + grade + ", commentaire=" + commentaire + ", dateEnreg=" + dateEnreg + ", dateModif=" + dateModif + ", idEquipe=" + idEquipe + '}';
}
}