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 package net.sf.pmr.core.domain.user;
38
39 import java.util.Set;
40
41 import net.sf.pmr.core.domain.user.company.Company;
42 import net.sf.pmr.keopsframework.domain.object.AbstractDomainObject;
43
44 import org.apache.commons.lang.builder.EqualsBuilder;
45 import org.apache.commons.lang.builder.HashCodeBuilder;
46
47 /***
48 * @author Arnaud
49 */
50 public class UserImpl extends AbstractDomainObject implements User {
51
52 private String firstName;
53
54 private String lastName;
55
56 private String login;
57
58 private String password;
59
60 private String email;
61
62 private Company company;
63
64 private Set basicProjects;
65
66
67 /***
68 * @return Returns the email.
69 */
70 public String getEmail() {
71 return email;
72 }
73 /***
74 * @param email The email to set.
75 */
76 public void setEmail(final String email) {
77 this.email = email;
78 }
79
80
81
82
83
84
85 public String getFirstName() {
86 return firstName;
87
88 }
89
90
91
92
93
94
95 public String getLastName() {
96 return lastName;
97 }
98
99
100
101
102
103
104 public String getLogin() {
105 return login;
106 }
107
108
109
110
111
112
113 public String getPassword() {
114 return password;
115 }
116
117
118
119
120
121
122 public Company getCompany() {
123 return company;
124 }
125
126
127
128
129
130
131 public void setFirstName(final String firstName) {
132 this.firstName = firstName;
133
134 }
135
136
137
138
139
140
141 public void setLastName(final String lastName) {
142 this.lastName = lastName;
143
144 }
145
146
147
148
149
150
151 public void setLogin(final String login) {
152 this.login = login;
153
154 }
155
156
157
158
159
160
161 public void setPassword(final String password) {
162 this.password = password;
163 }
164
165
166
167
168
169
170 public void setCompany(final Company company) {
171 this.company = company;
172 }
173
174 /***
175 * @return Returns the projects.
176 */
177 public Set getProjects() {
178 return this.basicProjects;
179 }
180
181 /***
182 * @param projects
183 * The projects to set.
184 */
185 public void setProjects(final Set projects) {
186 this.basicProjects = projects;
187 }
188
189
190 /***
191 * @see java.lang.Object#equals(Object)
192 */
193 public boolean equals(final Object object) {
194 if (!(object instanceof UserImpl)) {
195 return false;
196 }
197 UserImpl rhs = (UserImpl) object;
198 return new EqualsBuilder().append(
199 this.login, rhs.login).isEquals();
200 }
201
202
203 /***
204 * @see java.lang.Object#hashCode()
205 */
206 public int hashCode() {
207 return new HashCodeBuilder(-800441645, 1772591927).append(this.login)
208 .toHashCode();
209 }
210 }