|
1 | | -package org.woehlke.simpleworklist.model.beans; |
2 | | - |
3 | | -import javax.validation.constraints.NotNull; |
4 | | - |
5 | | -import javax.validation.constraints.Email; |
6 | | -import javax.validation.constraints.NotBlank; |
7 | | -import java.io.Serializable; |
8 | | - |
9 | | -public class UserRegistrationForm implements Serializable { |
10 | | - |
11 | | - private static final long serialVersionUID = 6864871862706880939L; |
12 | | - |
13 | | - //TODO: Messages i18n |
14 | | - @NotNull(message = "Email Address is compulsory") |
15 | | - @NotBlank(message = "Email Address is compulsory") |
16 | | - @Email(message = "Email Address is not a valid format") |
17 | | - private String email; |
18 | | - |
19 | | - public String getEmail() { |
20 | | - return email; |
21 | | - } |
22 | | - |
23 | | - public void setEmail(String email) { |
24 | | - this.email = email; |
25 | | - } |
26 | | - |
27 | | - @Override |
28 | | - public int hashCode() { |
29 | | - final int prime = 31; |
30 | | - int result = 1; |
31 | | - result = prime * result + ((email == null) ? 0 : email.hashCode()); |
32 | | - return result; |
33 | | - } |
34 | | - |
35 | | - @Override |
36 | | - public boolean equals(Object obj) { |
37 | | - if (this == obj) |
38 | | - return true; |
39 | | - if (obj == null) |
40 | | - return false; |
41 | | - if (getClass() != obj.getClass()) |
42 | | - return false; |
43 | | - UserRegistrationForm other = (UserRegistrationForm) obj; |
44 | | - if (email == null) { |
45 | | - if (other.email != null) |
46 | | - return false; |
47 | | - } else if (!email.equals(other.email)) |
48 | | - return false; |
49 | | - return true; |
50 | | - } |
51 | | - |
52 | | - @Override |
53 | | - public String toString() { |
54 | | - return "UserRegistrationForm [email=" + email + "]"; |
55 | | - } |
56 | | - |
57 | | - |
58 | | -} |
| 1 | +package org.woehlke.simpleworklist.user.register; |
| 2 | + |
| 3 | +import javax.validation.constraints.NotNull; |
| 4 | + |
| 5 | +import javax.validation.constraints.Email; |
| 6 | +import javax.validation.constraints.NotBlank; |
| 7 | +import java.io.Serializable; |
| 8 | + |
| 9 | +public class UserRegistrationForm implements Serializable { |
| 10 | + |
| 11 | + private static final long serialVersionUID = 6864871862706880939L; |
| 12 | + |
| 13 | + //TODO: Messages i18n |
| 14 | + @NotNull(message = "Email Address is compulsory") |
| 15 | + @NotBlank(message = "Email Address is compulsory") |
| 16 | + @Email(message = "Email Address is not a valid format") |
| 17 | + private String email; |
| 18 | + |
| 19 | + public String getEmail() { |
| 20 | + return email; |
| 21 | + } |
| 22 | + |
| 23 | + public void setEmail(String email) { |
| 24 | + this.email = email; |
| 25 | + } |
| 26 | + |
| 27 | + @Override |
| 28 | + public int hashCode() { |
| 29 | + final int prime = 31; |
| 30 | + int result = 1; |
| 31 | + result = prime * result + ((email == null) ? 0 : email.hashCode()); |
| 32 | + return result; |
| 33 | + } |
| 34 | + |
| 35 | + @Override |
| 36 | + public boolean equals(Object obj) { |
| 37 | + if (this == obj) |
| 38 | + return true; |
| 39 | + if (obj == null) |
| 40 | + return false; |
| 41 | + if (getClass() != obj.getClass()) |
| 42 | + return false; |
| 43 | + UserRegistrationForm other = (UserRegistrationForm) obj; |
| 44 | + if (email == null) { |
| 45 | + if (other.email != null) |
| 46 | + return false; |
| 47 | + } else if (!email.equals(other.email)) |
| 48 | + return false; |
| 49 | + return true; |
| 50 | + } |
| 51 | + |
| 52 | + @Override |
| 53 | + public String toString() { |
| 54 | + return "UserRegistrationForm [email=" + email + "]"; |
| 55 | + } |
| 56 | + |
| 57 | + |
| 58 | +} |
0 commit comments