/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.test.beans; import java.util.Objects; /** * * @author clementine.desrucques */ public class Pompier { private int id; private int idCaserne; private String nom; private String prenom; private int statut; private String mail; private String login; private String mdp; private int adrNo; private String adrRue; private String adrCP; private String adrVille; private int grade; public Pompier(int id, int idCaserne, String nom, String prenom, int statut, String mail, String login, String mdp, int adrNo, String adrRue, String adrCP, String adrVille, int grade) { this(idCaserne, nom, prenom, statut, mail, login, mdp, adrNo, adrRue, adrCP, adrVille, grade); this.id = id; } public Pompier(int idCaserne, String nom, String prenom, int statut, String mail, String login, String mdp, int adrNo, String adrRue, String adrCP, String adrVille, int grade) { this.idCaserne = idCaserne; this.nom = nom; this.prenom = prenom; this.statut = statut; this.mail = mail; this.login = login; this.mdp = mdp; this.adrNo = adrNo; this.adrRue = adrRue; this.adrCP = adrCP; this.adrVille = adrVille; this.grade = grade; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getIdCaserne() { return idCaserne; } public void setIdCaserne(int idCaserne) { this.idCaserne = idCaserne; } public String getNom() { return nom; } public void setNom(String nom) { this.nom = nom; } public String getPrenom() { return prenom; } public void setPrenom(String prenom) { this.prenom = prenom; } public int getStatut() { return statut; } public void setStatut(int statut) { this.statut = statut; } 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; } public void setMdp(String mdp) { this.mdp = mdp; } public int getAdrNo() { return adrNo; } public void setAdrNo(int adrNo) { this.adrNo = adrNo; } public String getAdrRue() { return adrRue; } public void setAdrRue(String adrRue) { this.adrRue = adrRue; } public String getAdrCP() { return adrCP; } public void setAdrCP(String adrCP) { this.adrCP = adrCP; } public String getAdrVille() { return adrVille; } public void setAdrVille(String adrVille) { this.adrVille = adrVille; } public int getGrade() { return grade; } public void setGrade(int grade) { this.grade = grade; } @Override public int hashCode() { int hash = 7; hash = 29 * hash + this.id; hash = 29 * hash + this.idCaserne; hash = 29 * hash + Objects.hashCode(this.nom); hash = 29 * hash + Objects.hashCode(this.prenom); hash = 29 * hash + this.statut; hash = 29 * hash + Objects.hashCode(this.mail); hash = 29 * hash + Objects.hashCode(this.login); hash = 29 * hash + Objects.hashCode(this.mdp); hash = 29 * hash + this.adrNo; hash = 29 * hash + Objects.hashCode(this.adrRue); hash = 29 * hash + Objects.hashCode(this.adrCP); hash = 29 * hash + Objects.hashCode(this.adrVille); hash = 29 * hash + this.grade; return hash; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Pompier other = (Pompier) obj; if (this.id != other.id) { return false; } if (this.idCaserne != other.idCaserne) { return false; } if (this.statut != other.statut) { return false; } if (this.adrNo != other.adrNo) { return false; } if (this.grade != other.grade) { return false; } if (!Objects.equals(this.nom, other.nom)) { return false; } if (!Objects.equals(this.prenom, other.prenom)) { 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)) { return false; } if (!Objects.equals(this.adrCP, other.adrCP)) { return false; } if (!Objects.equals(this.adrVille, other.adrVille)) { return false; } return true; } @Override public String toString() { return "Pompier{" + "id=" + id + ", idCaserne=" + idCaserne + ", nom=" + nom + ", prenom=" + prenom + ", statut=" + statut + ", mail=" + mail + ", login=" + login + ", mdp=" + mdp + ", adrNo=" + adrNo + ", adrRue=" + adrRue + ", adrCP=" + adrCP + ", adrVille=" + adrVille + ", grade=" + grade + '}'; } }