1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.travel.dataobject;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
20 import org.kuali.rice.kim.api.identity.Person;
21 import org.kuali.rice.krad.bo.DataObjectBase;
22 import org.kuali.rice.krad.data.provider.annotation.InheritProperties;
23 import org.kuali.rice.krad.data.provider.annotation.InheritProperty;
24 import org.kuali.rice.krad.data.provider.annotation.Label;
25 import org.kuali.rice.krad.data.provider.annotation.Relationship;
26 import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViewType;
27 import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViews;
28
29 import javax.persistence.Column;
30 import javax.persistence.Entity;
31 import javax.persistence.GeneratedValue;
32 import javax.persistence.Id;
33 import javax.persistence.SequenceGenerator;
34 import javax.persistence.Table;
35 import javax.persistence.Temporal;
36 import javax.persistence.TemporalType;
37 import javax.persistence.Transient;
38 import java.util.Date;
39
40
41 @Entity
42 @Table(name="TRVL_TRAVELER_DTL_T")
43 @UifAutoCreateViews({UifAutoCreateViewType.INQUIRY, UifAutoCreateViewType.LOOKUP})
44 public class TravelerDetail extends DataObjectBase implements MutableInactivatable {
45 private static final long serialVersionUID = -7169083136626617130L;
46
47 @Id
48 @GeneratedValue(generator = "TRVL_TRAVELER_DTL_ID_S")
49 @SequenceGenerator(name = "TRVL_TRAVELER_DTL_ID_S", sequenceName = "TRVL_TRAVELER_DTL_ID_S", allocationSize = 5)
50 @Column(name = "id", length = 40, nullable = false)
51 protected String id;
52 @Column(name = "doc_nbr", length=14)
53 protected String documentNumber;
54 @Column(name = "EMP_PRINCIPAL_ID")
55 protected String principalId;
56 @Relationship(foreignKeyFields="principalId")
57 @Transient
58 @InheritProperties({
59 @InheritProperty(name="principalName",label=@Label("Traveler User ID")),
60 @InheritProperty(name="name",label=@Label("Traveler Name"))
61 })
62 private Person person;
63 @Column(name = "first_nm", length = 40, nullable = false)
64 protected String firstName;
65 @Column(length = 40, nullable = true)
66 protected String middleName;
67 @Column(name = "last_nm", length = 40, nullable = false)
68 protected String lastName;
69 @Column(name = "addr_line_1", length = 50, nullable = false)
70 protected String streetAddressLine1;
71 @Column(name = "addr_line_2", length = 50, nullable = true)
72 protected String streetAddressLine2;
73 @Column(name = "city_nm", length = 50, nullable = true)
74 protected String cityName;
75 @Column(name = "postal_state_cd", length = 2, nullable = false)
76 protected String stateCode;
77 @Column(name = "postal_cd", length = 11, nullable = false)
78 protected String zipCode;
79 @Column(name = "country_cd", length = 2, nullable = true)
80 protected String countryCode;
81 @Column(name = "citizenship", length = 40, nullable = true)
82 protected String citizenship;
83 @Column(name = "email_addr", length = 50, nullable = true)
84 protected String emailAddress;
85 @Transient
86 protected Date dateOfBirth;
87 @Column(name = "gender", length = 1, nullable = false)
88 protected String gender;
89 @Column(name = "phone_nbr", length = 20, nullable = true)
90 protected String phoneNumber;
91 @Column(name = "traveler_typ_cd", length = 3, nullable = false)
92 protected String travelerTypeCode;
93
94
95 @Transient
96 protected TravelerType travelerType;
97 @Column(name = "customer_num", length = 40, nullable = true)
98 protected String customerNumber;
99
100 @Transient
101 protected boolean liabilityInsurance;
102
103 @Column(name = "drive_lic_num", length = 20, nullable = true)
104 protected String driversLicenseNumber;
105 @Transient
106 protected String driversLicenseState;
107 @Column(name = "drive_lic_exp_dt")
108 @Temporal(TemporalType.DATE)
109 protected Date driversLicenseExpDate;
110
111
112 @Transient
113 protected Boolean notifyTAFinal = Boolean.FALSE;
114 @Transient
115 protected Boolean notifyTAStatusChange = Boolean.FALSE;
116 @Transient
117 protected Boolean notifyTERFinal = Boolean.FALSE;
118 @Transient
119 protected Boolean notifyTERStatusChange = Boolean.FALSE;
120
121 @Column(name = "ACTV_IND", nullable = false, length = 1)
122 protected Boolean active = Boolean.TRUE;
123 @Column(name = "non_res_alien", length = 1, nullable = true)
124 protected Boolean nonResidentAlien = Boolean.FALSE;
125 @Transient
126 protected Boolean motorVehicleRecordCheck = Boolean.FALSE;
127
128
129
130
131
132
133 public String getDocumentNumber() {
134 return documentNumber;
135 }
136
137
138
139
140
141
142 public void setDocumentNumber(String documentNumber) {
143 this.documentNumber = documentNumber;
144 }
145
146 public String getId() {
147 return id;
148 }
149
150
151 public void setId(String id) {
152 this.id = id;
153 }
154
155 public String getFirstName() {
156 return firstName;
157 }
158
159
160 public void setFirstName(String firstName) {
161 this.firstName = firstName;
162 }
163
164 public String getLastName() {
165 return lastName;
166 }
167
168
169 public void setLastName(String lastName) {
170 this.lastName = lastName;
171 }
172
173 public String getMiddleName() {
174 return middleName;
175 }
176
177 public void setMiddleName(String middleName) {
178 this.middleName = middleName;
179 }
180
181 public String getName() {
182 String name = "";
183 if(StringUtils.isNotBlank(getFirstName()))
184 name += getFirstName();
185 if(StringUtils.isNotBlank(getMiddleName()))
186 name += " " + getMiddleName();
187 if(StringUtils.isNotBlank(getLastName()))
188 name += " " + getLastName();
189 return name;
190 }
191
192 public String getStreetAddressLine1() {
193 return streetAddressLine1;
194 }
195
196
197 public void setStreetAddressLine1(String streetAddressLine1) {
198 this.streetAddressLine1 = streetAddressLine1;
199 }
200
201 public String getStreetAddressLine2() {
202 return streetAddressLine2;
203 }
204
205
206 public void setStreetAddressLine2(String streetAddressLine2) {
207 this.streetAddressLine2 = streetAddressLine2;
208 }
209
210 public String getCityName() {
211 return cityName;
212 }
213
214
215 public void setCityName(String cityName) {
216 this.cityName = cityName;
217 }
218
219 public String getStateCode() {
220 return stateCode;
221 }
222
223
224 public void setStateCode(String stateCode) {
225 this.stateCode = stateCode;
226 }
227
228 public String getZipCode() {
229 return zipCode;
230 }
231
232
233 public void setZipCode(String zipCode) {
234 this.zipCode = zipCode;
235 }
236
237 public String getCountryCode() {
238 return countryCode;
239 }
240
241
242 public void setCountryCode(String countryCode) {
243 this.countryCode = countryCode;
244 }
245
246 public String getEmailAddress() {
247 return emailAddress;
248 }
249
250
251 public void setEmailAddress(String emailAddress) {
252 this.emailAddress = emailAddress;
253 }
254
255 public String getPhoneNumber() {
256 return phoneNumber;
257 }
258
259
260 public void setPhoneNumber(String phoneNumber) {
261 this.phoneNumber = phoneNumber;
262 }
263
264 public String getTravelerTypeCode() {
265 return travelerTypeCode;
266 }
267
268
269 public void setTravelerTypeCode(String travelerTypeCode) {
270 this.travelerTypeCode = travelerTypeCode;
271 }
272
273 public TravelerType getTravelerType() {
274 return travelerType;
275 }
276
277 public void setTravelerType(TravelerType travelerType) {
278 this.travelerType = travelerType;
279 }
280
281 public String getPrincipalId() {
282 return principalId;
283 }
284
285 public void setPrincipalId(String principalId) {
286 this.principalId = principalId;
287 }
288
289 public String getCustomerNumber() {
290 return customerNumber;
291 }
292
293 public void setCustomerNumber(String customerNumber) {
294 this.customerNumber = customerNumber;
295 }
296
297 public boolean isLiabilityInsurance() {
298 return liabilityInsurance;
299 }
300
301 public void setLiabilityInsurance(boolean liabilityInsurance) {
302 this.liabilityInsurance = liabilityInsurance;
303 }
304
305 public String getDriversLicenseNumber() {
306 return driversLicenseNumber;
307 }
308
309 public void setDriversLicenseNumber(String driversLicenseNumber) {
310 this.driversLicenseNumber = driversLicenseNumber;
311 }
312
313 public String getDriversLicenseState() {
314 return driversLicenseState;
315 }
316
317 public void setDriversLicenseState(String driversLicenseState) {
318 this.driversLicenseState = driversLicenseState;
319 }
320
321 public Date getDriversLicenseExpDate() {
322 return driversLicenseExpDate;
323 }
324
325 public void setDriversLicenseExpDate(Date driversLicenseExpDate) {
326 this.driversLicenseExpDate = driversLicenseExpDate;
327 }
328
329 public boolean getNotifyTAFinal() {
330 return notifyTAFinal;
331 }
332
333 public boolean getNotifyTAStatusChange() {
334 return notifyTAStatusChange;
335 }
336
337 public boolean getNotifyTERFinal() {
338 return notifyTERFinal;
339 }
340
341 public boolean getNotifyTERStatusChange() {
342 return notifyTERStatusChange;
343 }
344
345 public String getCitizenship() {
346 return citizenship;
347 }
348
349 public void setCitizenship(String citizenship) {
350 this.citizenship = citizenship;
351 }
352
353 public boolean isActive() {
354 return active;
355 }
356
357 public void setActive(boolean active) {
358 this.active = active;
359 }
360
361 public boolean isNotifyTAFinal() {
362 return notifyTAFinal;
363 }
364
365 public void setNotifyTAFinal(boolean notifyTAFinal) {
366 this.notifyTAFinal = notifyTAFinal;
367 }
368
369 public boolean isNotifyTAStatusChange() {
370 return notifyTAStatusChange;
371 }
372
373 public void setNotifyTAStatusChange(boolean notifyTAStatusChange) {
374 this.notifyTAStatusChange = notifyTAStatusChange;
375 }
376
377 public boolean isNotifyTERFinal() {
378 return notifyTERFinal;
379 }
380
381 public void setNotifyTERFinal(boolean notifyTERFinal) {
382 this.notifyTERFinal = notifyTERFinal;
383 }
384
385 public boolean isNotifyTERStatusChange() {
386 return notifyTERStatusChange;
387 }
388
389 public void setNotifyTERStatusChange(boolean notifyTERStatusChange) {
390 this.notifyTERStatusChange = notifyTERStatusChange;
391 }
392
393 public boolean isMotorVehicleRecordCheck() {
394 return motorVehicleRecordCheck;
395 }
396
397 public void setMotorVehicleRecordCheck(boolean motorVehicleRecordCheck) {
398 this.motorVehicleRecordCheck = motorVehicleRecordCheck;
399 }
400
401 public boolean isNonResidentAlien() {
402 return nonResidentAlien;
403 }
404
405 public void setNonResidentAlien(boolean nonResidentAlien) {
406 this.nonResidentAlien = nonResidentAlien;
407 }
408
409 public Date getDateOfBirth() {
410 return dateOfBirth;
411 }
412
413 public void setDateOfBirth(Date dateOfBirth) {
414 this.dateOfBirth = dateOfBirth;
415 }
416
417 public String getGender() {
418 return gender;
419 }
420
421 public void setGender(String gender) {
422 this.gender = gender;
423 }
424
425 public Person getPerson() {
426 return person;
427 }
428
429 public void setPerson(Person person) {
430 this.person = person;
431 }
432 }