1 | package com.ether.user; |
---|
2 | |
---|
3 | import org.jetbrains.annotations.NotNull; |
---|
4 | import org.jetbrains.annotations.Nullable; |
---|
5 | |
---|
6 | import java.util.Date; |
---|
7 | |
---|
8 | /** |
---|
9 | * @author vmipsl |
---|
10 | * @date 28 nov 2011 |
---|
11 | */ |
---|
12 | public class User |
---|
13 | { |
---|
14 | public User() |
---|
15 | { |
---|
16 | } |
---|
17 | |
---|
18 | public User( @NotNull final String lastName, @Nullable final String firstName, @NotNull final String email, @NotNull final String password, @Nullable final UserRole role, final boolean hasAccessToBO, @Nullable final String laboratory, @Nullable final String country, @NotNull final Date creationDate ) |
---|
19 | { |
---|
20 | _lastName = lastName; |
---|
21 | _firstName = firstName; |
---|
22 | _email = email; |
---|
23 | _password = password; |
---|
24 | _role = role; |
---|
25 | _accessToBO = hasAccessToBO; |
---|
26 | _laboratory = laboratory; |
---|
27 | _country = country; |
---|
28 | _creationDate = creationDate; |
---|
29 | } |
---|
30 | |
---|
31 | public User( @NotNull final String lastName, @Nullable final String firstName, @NotNull final String email, @NotNull final String pwd, @Nullable final String role, final Boolean hasAccessToBO, @Nullable final String laboratory, @Nullable final String country, @NotNull final Date date ) |
---|
32 | { |
---|
33 | this( lastName, firstName, email, pwd, UserRole.valueOf( role ), hasAccessToBO, laboratory, country, date ); |
---|
34 | } |
---|
35 | |
---|
36 | public Integer getId() |
---|
37 | { |
---|
38 | return _id; |
---|
39 | } |
---|
40 | |
---|
41 | public void setId( final Integer id ) |
---|
42 | { |
---|
43 | _id = id; |
---|
44 | } |
---|
45 | |
---|
46 | @NotNull |
---|
47 | public String getLastName() |
---|
48 | { |
---|
49 | return _lastName; |
---|
50 | } |
---|
51 | |
---|
52 | public void setLastName( @NotNull final String lastName ) |
---|
53 | { |
---|
54 | _lastName = lastName; |
---|
55 | } |
---|
56 | |
---|
57 | @Nullable |
---|
58 | public String getFirstName() |
---|
59 | { |
---|
60 | return _firstName; |
---|
61 | } |
---|
62 | |
---|
63 | public void setFirstName( @Nullable final String firstName ) |
---|
64 | { |
---|
65 | _firstName = firstName; |
---|
66 | } |
---|
67 | |
---|
68 | @NotNull |
---|
69 | public String getEmail() |
---|
70 | { |
---|
71 | return _email; |
---|
72 | } |
---|
73 | |
---|
74 | public void setEmail( @NotNull final String email ) |
---|
75 | { |
---|
76 | _email = email; |
---|
77 | } |
---|
78 | |
---|
79 | @NotNull |
---|
80 | public String getPassword() |
---|
81 | { |
---|
82 | return _password; |
---|
83 | } |
---|
84 | |
---|
85 | public void setPassword( @NotNull final String password ) |
---|
86 | { |
---|
87 | _password = password; |
---|
88 | } |
---|
89 | |
---|
90 | @Nullable |
---|
91 | public UserRole getRole() |
---|
92 | { |
---|
93 | return _role; |
---|
94 | } |
---|
95 | |
---|
96 | public void setRole( @Nullable final UserRole role ) |
---|
97 | { |
---|
98 | _role = role; |
---|
99 | } |
---|
100 | |
---|
101 | public boolean isAccessToBO() |
---|
102 | { |
---|
103 | return _accessToBO; |
---|
104 | } |
---|
105 | |
---|
106 | public void setAccessToBO( final boolean accessToBO ) |
---|
107 | { |
---|
108 | _accessToBO = accessToBO; |
---|
109 | } |
---|
110 | |
---|
111 | @NotNull |
---|
112 | public Date getCreationDate() |
---|
113 | { |
---|
114 | return _creationDate; |
---|
115 | } |
---|
116 | |
---|
117 | public void setCreationDate( @NotNull final Date creationDate ) |
---|
118 | { |
---|
119 | _creationDate = creationDate; |
---|
120 | } |
---|
121 | |
---|
122 | @Nullable |
---|
123 | public String getLaboratory() |
---|
124 | { |
---|
125 | return _laboratory; |
---|
126 | } |
---|
127 | |
---|
128 | public void setLaboratory( @Nullable final String laboratory ) |
---|
129 | { |
---|
130 | _laboratory = laboratory; |
---|
131 | } |
---|
132 | |
---|
133 | @Nullable |
---|
134 | public String getCountry() |
---|
135 | { |
---|
136 | return _country; |
---|
137 | } |
---|
138 | |
---|
139 | public void setCountry( @Nullable final String country ) |
---|
140 | { |
---|
141 | _country = country; |
---|
142 | } |
---|
143 | |
---|
144 | private Integer _id; |
---|
145 | @NotNull |
---|
146 | private String _lastName; |
---|
147 | @Nullable |
---|
148 | private String _firstName; |
---|
149 | @NotNull |
---|
150 | private String _email; |
---|
151 | @NotNull |
---|
152 | private String _password; |
---|
153 | @Nullable |
---|
154 | private UserRole _role; |
---|
155 | private boolean _accessToBO; |
---|
156 | @NotNull |
---|
157 | private Date _creationDate; |
---|
158 | @Nullable |
---|
159 | private String _laboratory; |
---|
160 | @Nullable |
---|
161 | private String _country; |
---|
162 | } |
---|