forked from marg-o/brigate
209 lines
5.3 KiB
Java
209 lines
5.3 KiB
Java
|
package bean;
|
||
|
|
||
|
import java.time.LocalDate;
|
||
|
|
||
|
public class Contatto {
|
||
|
private String nome;
|
||
|
private String email;
|
||
|
private String cognome;
|
||
|
private String servizio_sociale;
|
||
|
private String area;
|
||
|
private String indirizzo;
|
||
|
private long telefono;
|
||
|
private int numero_persone;
|
||
|
private String composizione_nucleo;
|
||
|
private String note_sacchetto;
|
||
|
private LocalDate ultima_consegna;
|
||
|
|
||
|
public Contatto() {
|
||
|
}
|
||
|
|
||
|
public Contatto(String nome, String cognome, String servizio_sociale, String area, String indirizzo,
|
||
|
long telefono, String email, int numero_persone, String composizione_nucleo, String note_sacchetto,
|
||
|
LocalDate ultima_consegna) {
|
||
|
this.nome = nome;
|
||
|
this.email=email;
|
||
|
this.cognome = cognome;
|
||
|
this.servizio_sociale = servizio_sociale;
|
||
|
this.area = area;
|
||
|
this.indirizzo = indirizzo;
|
||
|
this.telefono = telefono;
|
||
|
this.numero_persone = numero_persone;
|
||
|
this.composizione_nucleo = composizione_nucleo;
|
||
|
this.note_sacchetto = note_sacchetto;
|
||
|
this.ultima_consegna = ultima_consegna;
|
||
|
}
|
||
|
|
||
|
public String getNome() {
|
||
|
return nome;
|
||
|
}
|
||
|
|
||
|
public void setNome(String nome) {
|
||
|
this.nome = nome;
|
||
|
}
|
||
|
|
||
|
public String getEmail() {
|
||
|
return email;
|
||
|
}
|
||
|
|
||
|
public void setEmail(String email) {
|
||
|
this.email = email;
|
||
|
}
|
||
|
|
||
|
public String getCognome() {
|
||
|
return cognome;
|
||
|
}
|
||
|
|
||
|
public void setCognome(String cognome) {
|
||
|
this.cognome = cognome;
|
||
|
}
|
||
|
|
||
|
public String getServizio_sociale() {
|
||
|
return servizio_sociale;
|
||
|
}
|
||
|
|
||
|
public void setServizio_sociale(String servizio_sociale) {
|
||
|
this.servizio_sociale = servizio_sociale;
|
||
|
}
|
||
|
|
||
|
public String getArea() {
|
||
|
return area;
|
||
|
}
|
||
|
|
||
|
public void setArea(String area) {
|
||
|
this.area = area;
|
||
|
}
|
||
|
|
||
|
public String getIndirizzo() {
|
||
|
return indirizzo;
|
||
|
}
|
||
|
|
||
|
public void setIndirizzo(String indirizzo) {
|
||
|
this.indirizzo = indirizzo;
|
||
|
}
|
||
|
|
||
|
public long getTelefono() {
|
||
|
return telefono;
|
||
|
}
|
||
|
|
||
|
public void setTelefono(long telefono) {
|
||
|
this.telefono = telefono;
|
||
|
}
|
||
|
|
||
|
public int getNumero_persone() {
|
||
|
return numero_persone;
|
||
|
}
|
||
|
|
||
|
public void setNumero_persone(int numero_persone) {
|
||
|
this.numero_persone = numero_persone;
|
||
|
}
|
||
|
|
||
|
public String getComposizione_nucleo() {
|
||
|
return composizione_nucleo;
|
||
|
}
|
||
|
|
||
|
public void setComposizione_nucleo(String composizione_nucleo) {
|
||
|
this.composizione_nucleo = composizione_nucleo;
|
||
|
}
|
||
|
|
||
|
public String getNote_sacchetto() {
|
||
|
return note_sacchetto;
|
||
|
}
|
||
|
|
||
|
public void setNote_sacchetto(String note_sacchetto) {
|
||
|
this.note_sacchetto = note_sacchetto;
|
||
|
}
|
||
|
|
||
|
public LocalDate getUltima_consegna() {
|
||
|
return ultima_consegna;
|
||
|
}
|
||
|
|
||
|
public void setUltima_consegna(LocalDate ultima_consegna) {
|
||
|
this.ultima_consegna = ultima_consegna;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
final int prime = 31;
|
||
|
int result = 1;
|
||
|
result = prime * result + ((area == null) ? 0 : area.hashCode());
|
||
|
result = prime * result + ((cognome == null) ? 0 : cognome.hashCode());
|
||
|
result = prime * result + ((composizione_nucleo == null) ? 0 : composizione_nucleo.hashCode());
|
||
|
result = prime * result + ((indirizzo == null) ? 0 : indirizzo.hashCode());
|
||
|
result = prime * result + ((nome == null) ? 0 : nome.hashCode());
|
||
|
result = prime * result + ((note_sacchetto == null) ? 0 : note_sacchetto.hashCode());
|
||
|
result = prime * result + numero_persone;
|
||
|
result = prime * result + ((servizio_sociale == null) ? 0 : servizio_sociale.hashCode());
|
||
|
result = prime * result + (int) (telefono ^ (telefono >>> 32));
|
||
|
result = prime * result + ((ultima_consegna == null) ? 0 : ultima_consegna.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;
|
||
|
Contatto other = (Contatto) obj;
|
||
|
if (area == null) {
|
||
|
if (other.area != null)
|
||
|
return false;
|
||
|
} else if (!area.equals(other.area))
|
||
|
return false;
|
||
|
if (cognome == null) {
|
||
|
if (other.cognome != null)
|
||
|
return false;
|
||
|
} else if (!cognome.equals(other.cognome))
|
||
|
return false;
|
||
|
if (composizione_nucleo == null) {
|
||
|
if (other.composizione_nucleo != null)
|
||
|
return false;
|
||
|
} else if (!composizione_nucleo.equals(other.composizione_nucleo))
|
||
|
return false;
|
||
|
|
||
|
if (indirizzo == null) {
|
||
|
if (other.indirizzo != null)
|
||
|
return false;
|
||
|
} else if (!indirizzo.equals(other.indirizzo))
|
||
|
return false;
|
||
|
if (nome == null) {
|
||
|
if (other.nome != null)
|
||
|
return false;
|
||
|
} else if (!nome.equals(other.nome))
|
||
|
return false;
|
||
|
if (note_sacchetto == null) {
|
||
|
if (other.note_sacchetto != null)
|
||
|
return false;
|
||
|
} else if (!note_sacchetto.equals(other.note_sacchetto))
|
||
|
return false;
|
||
|
if (numero_persone != other.numero_persone)
|
||
|
return false;
|
||
|
if (servizio_sociale == null) {
|
||
|
if (other.servizio_sociale != null)
|
||
|
return false;
|
||
|
} else if (!servizio_sociale.equals(other.servizio_sociale))
|
||
|
return false;
|
||
|
if (telefono != other.telefono)
|
||
|
return false;
|
||
|
if (ultima_consegna == null) {
|
||
|
if (other.ultima_consegna != null)
|
||
|
return false;
|
||
|
} else if (!ultima_consegna.equals(other.ultima_consegna))
|
||
|
return false;
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
return "Contatto [ nome=" + nome + ", cognome=" + cognome + ", servizio_sociale="
|
||
|
+ servizio_sociale + ", area=" + area + ", indirizzo=" + indirizzo + ", telefono=" + telefono
|
||
|
+ ", numero_persone=" + numero_persone + ", composizione_nucleo=" + composizione_nucleo
|
||
|
+ ", note_sacchetto=" + note_sacchetto + ", ultima_consegna=" + ultima_consegna + "]";
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|