View Javadoc

1   /*Copyright (C) 2004-... Stephane Gauchet for Hyphonem
2   
3    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
4   
5    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
6   
7    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8    
9    Written by St�phane Gauchet
10   mail me at : sgauchet@free.fr
11   */
12  package fr.hyphonem.conges.data;
13  
14  import java.io.Serializable;
15  
16  import fr.hyphonem.conges.resources.Messages;
17  
18  /**
19   * @author Stephane Gauchet pour Hyphonem
20   * 
21   */
22  public class UserData implements Serializable {
23  
24  	/**
25  	 * 
26  	 */
27  	private static final long serialVersionUID = 1L;
28  
29  	private String login;
30  
31  	private String password;
32  
33  	private String nom;
34  
35  	private String prenom;
36  
37  	private String email;
38  
39  	private boolean modif;
40  
41  	private boolean employee;
42  
43  	private String team;
44  
45  	/**
46  	 * Constructor for UserData.
47  	 */
48  	public UserData() {
49  		super();
50  	}
51  
52  	/**
53  	 * Returns the login.
54  	 * 
55  	 * @return String
56  	 */
57  	public String getLogin() {
58  		return login;
59  	}
60  
61  	/**
62  	 * Returns the modif.
63  	 * 
64  	 * @return boolean
65  	 */
66  	public boolean isModif() {
67  		return modif;
68  	}
69  
70  	/**
71  	 * Returns the nom.
72  	 * 
73  	 * @return String
74  	 */
75  	public String getNom() {
76  		return nom;
77  	}
78  
79  	/**
80  	 * Returns the password.
81  	 * 
82  	 * @return String
83  	 */
84  	public String getPassword() {
85  		return password;
86  	}
87  
88  	/**
89  	 * Returns the prenom.
90  	 * 
91  	 * @return String
92  	 */
93  	public String getPrenom() {
94  		return prenom;
95  	}
96  
97  	/**
98  	 * Sets the login.
99  	 * 
100 	 * @param login
101 	 *            The login to set
102 	 */
103 	public void setLogin(String login) {
104 		this.login = login;
105 	}
106 
107 	/**
108 	 * Sets the modif.
109 	 * 
110 	 * @param modif
111 	 *            The modif to set
112 	 */
113 	public void setModif(boolean modif) {
114 		this.modif = modif;
115 	}
116 
117 	/**
118 	 * Sets the nom.
119 	 * 
120 	 * @param nom
121 	 *            The nom to set
122 	 */
123 	public void setNom(String nom) {
124 		this.nom = nom;
125 	}
126 
127 	/**
128 	 * Sets the password.
129 	 * 
130 	 * @param password
131 	 *            The password to set
132 	 */
133 	public void setPassword(String password) {
134 		this.password = password;
135 	}
136 
137 	/**
138 	 * Sets the prenom.
139 	 * 
140 	 * @param prenom
141 	 *            The prenom to set
142 	 */
143 	public void setPrenom(String prenom) {
144 		this.prenom = prenom;
145 	}
146 
147 	public String toString() {
148 		String smodif = Messages.getString("text.non");
149 		if (isModif()) {
150 			smodif = Messages.getString("text.oui");
151 		}
152 		return Messages.getString("text.utilisateur") + " : " + getPrenom() + " " + getNom() + " - " + Messages.getString("text.modif") + " : " + smodif; //$NON-NLS-1$ //$NON-NLS-3$
153 	}
154 
155 	/**
156 	 * 
157 	 * @return prenom + nom
158 	 */
159 	public String getNomPrenom() {
160 		return getPrenom() + " " + getNom();
161 	}
162 
163 	/**
164 	 * @return email
165 	 */
166 	public String getEmail() {
167 		return email;
168 	}
169 
170 	/**
171 	 * @param string
172 	 */
173 	public void setEmail(String string) {
174 		email = string;
175 	}
176 
177 	/**
178 	 * @return boolean
179 	 */
180 	public boolean isEmployee() {
181 		return employee;
182 	}
183 
184 	/**
185 	 * @param b
186 	 */
187 	public void setEmployee(boolean b) {
188 		employee = b;
189 	}
190 
191 	/**
192 	 * @return team
193 	 */
194 	public String getTeam() {
195 		return team;
196 	}
197 
198 	/**
199 	 * @param string
200 	 */
201 	public void setTeam(String string) {
202 		team = string;
203 	}
204 }