1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
| package metier.membre.usager;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.sql.Date;
import java.util.ArrayList;
import java.util.Collection;
import metier.membre.intermediaire.MembreCategories;
public class Membre implements Serializable {
/**
*
*/
private static final long serialVersionUID = 8958048505405006518L;
int id;
String nom;
String prenom;
String pseudo;
String motDePasse;
Integer spuse;
Date dateDeNaissance;
boolean etatCompte;
String photo;
//Photos photos;
private transient Collection<MembreCategories> membreCategorie = new ArrayList<MembreCategories>();
private transient Collection<Coordonnees> coordonnees = new ArrayList<Coordonnees>();
public Membre(int id, String nom, String prenom, String pseudo) {
super();
this.id = id;
this.nom = nom;
this.prenom = prenom;
this.pseudo = pseudo;
}
public Membre(String nom, String prenom, String pseudo, String motDePasse,
String email) {
super();
this.nom = nom;
this.prenom = prenom;
this.pseudo = pseudo;
this.motDePasse = motDePasse;
}
public Collection<MembreCategories> getMembreCategorie() {
return membreCategorie;
}
public void setMembreCategorie(Collection<MembreCategories> membreCategorie) {
this.membreCategorie = membreCategorie;
}
public Membre(int id) {
super();
this.id = id;
}
public Membre(String nom, String prenom, String pseudo, String email) {
super();
this.nom = nom;
this.prenom = prenom;
this.pseudo = pseudo;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public String getPrenom() {
return prenom;
}
public String getMotDePasse() {
return motDePasse;
}
public void setMotDePasse(String motDePasse) {
this.motDePasse = motDePasse;
}
public void setPrenom(String prenom) {
this.prenom = prenom;
}
public String getPseudo() {
return pseudo;
}
public void setPseudo(String pseudo) {
this.pseudo = pseudo;
}
public int getSpuse() {
return spuse;
}
public void setSpuse(int spuse) {
this.spuse = spuse;
}
public Date getDateDeNaissance() {
return dateDeNaissance;
}
public void setDateDeNaissance(Date dateDeNaissance) {
this.dateDeNaissance = dateDeNaissance;
}
public boolean isEtatCompte() {
return etatCompte;
}
public void setEtatCompte(boolean etatCompte) {
this.etatCompte = etatCompte;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public void add(MembreCategories membreCategorie){
this.membreCategorie.add(membreCategorie);
}
public void add(Coordonnees coordonnees){
this.coordonnees.add(coordonnees);
}
public Membre() {
super();
// TODO Auto-generated constructor stub
}
@Override
public String toString() {
return "Membre [id=" + id + ", nom=" + nom + ", prenom=" + prenom
+ ", pseudo=" + pseudo + ", motDePasse=" + motDePasse
+ ", spuse=" + spuse + ", dateDeNaissance=" + dateDeNaissance
+ ", etatCompte=" + etatCompte + ", photo=" + photo + "]";
}
public Collection<Coordonnees> getCoordonnees() {
return coordonnees;
}
public void setCoordonnees(Coordonnees coordonnees) {
this.coordonnees.add(coordonnees);
} |
Partager