Newer
Older
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
package edu.ncsu.csc.itrust.beans;
import edu.ncsu.csc.itrust.enums.Role;
import java.io.Serializable;
import java.util.List;
/**
* A bean for storing data about a hospital employee.
*
* A bean's purpose is to store data. Period. Little or no functionality is to be added to a bean
* (with the exception of minor formatting such as concatenating phone numbers together).
* A bean must only have Getters and Setters (Eclipse Hint: Use Source > Generate Getters and Setters
* to create these easily)
*/
public class PersonnelBean implements Serializable {
private static final long serialVersionUID = 6575544592646001050L;
private long MID = 0;
private long AMID = 0;
private String roleString;
private String firstName = "";
private String lastName = "";
private String password = "";
private String confirmPassword = "";
private String securityQuestion = "";
private String securityAnswer = "";
private String streetAddress1 = "";
private String streetAddress2 = "";
private String city = "";
private String state = "";
private String zip = "";
private String phone = "";
private String email = "";
private String specialty = "";
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public long getAMID() {
return AMID;
}
public void setAMID(long amid) {
AMID = amid;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getConfirmPassword() {
return confirmPassword;
}
public void setConfirmPassword(String confirmPassword) {
this.confirmPassword = confirmPassword;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getFullName() {
return getFirstName() + " " + getLastName();
}
public long getMID() {
return MID;
}
public void setMID(long mid) {
MID = mid;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getRoleString() {
return roleString;
}
public String getSecurityAnswer() {
return securityAnswer;
}
public void setSecurityAnswer(String securityAnswer) {
this.securityAnswer = securityAnswer;
}
public String getSecurityQuestion() {
return securityQuestion;
}
public void setSecurityQuestion(String securityQuestion) {
this.securityQuestion = securityQuestion;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getStreetAddress1() {
return streetAddress1;
}
public void setStreetAddress1(String streetAddress1) {
this.streetAddress1 = streetAddress1;
}
public String getStreetAddress2() {
return streetAddress2;
}
public void setStreetAddress2(String streetAddress2) {
this.streetAddress2 = streetAddress2;
}
public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
public String getSpecialty() {
return specialty;
}
public void setSpecialty(String specialty) {
this.specialty = specialty;
}
public int getIndexIn(List<PersonnelBean> list) {
for (int i = 0; i < list.size(); i++) {
if (list.get(i).MID == this.MID) return i;
}
return -1;
}
public void setRoleString(String role) {
this.roleString = role;
}
public Role getRole() {
return Role.parse(roleString);
}
public void setRole(Role role) {
}
@Override
public boolean equals(Object o){
if(o == null || getClass() != o.getClass())
return false;
return this.MID == ((PersonnelBean) o).MID;
}
public int hashCode() {
assert false : "hashCode not designed";
return 0;
}
}