package bean; public class Utente { private String nick; private String password; private String ruolo; public Utente() { } public Utente(String nick, String password, String ruolo) { this.nick = nick; this.password = password; this.ruolo = ruolo; } public String getNick() { return nick; } public void setNick(String nick) { this.nick = nick; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getRuolo() { return ruolo; } public void setRuolo(String ruolo) { this.ruolo = ruolo; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((nick == null) ? 0 : nick.hashCode()); result = prime * result + ((password == null) ? 0 : password.hashCode()); result = prime * result + ((ruolo == null) ? 0 : ruolo.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Utente other = (Utente) obj; if (nick == null) { if (other.nick != null) return false; } else if (!nick.equals(other.nick)) return false; if (password == null) { if (other.password != null) return false; } else if (!password.equals(other.password)) return false; if (ruolo == null) { if (other.ruolo != null) return false; } else if (!ruolo.equals(other.ruolo)) return false; return true; } @Override public String toString() { return "Utente [nick=" + nick + ", password=" + password + ", ruolo=" + ruolo + "]"; } }