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
96 @Relationship(foreignKeyFields="travelerTypeCode")
97 @Transient
98 protected TravelerType travelerType;
99 @Column(name = "customer_num", length = 40, nullable = true)
100 protected String customerNumber;
101
102 @Transient
103 protected boolean liabilityInsurance;
104
105 @Column(name = "drive_lic_num", length = 20, nullable = true)
106 protected String driversLicenseNumber;
107 @Transient
108 protected String driversLicenseState;
109 @Column(name = "drive_lic_exp_dt")
110 @Temporal(TemporalType.DATE)
111 protected Date driversLicenseExpDate;
112
113
114 @Transient
115 protected Boolean notifyTAFinal = Boolean.FALSE;
116 @Transient
117 protected Boolean notifyTAStatusChange = Boolean.FALSE;
118 @Transient
119 protected Boolean notifyTERFinal = Boolean.FALSE;
120 @Transient
121 protected Boolean notifyTERStatusChange = Boolean.FALSE;
122
123 @Column(name = "ACTV_IND", nullable = false, length = 1)
124 protected Boolean active = Boolean.TRUE;
125 @Column(name = "non_res_alien", length = 1, nullable = true)
126 protected Boolean nonResidentAlien = Boolean.FALSE;
127 @Transient
128 protected Boolean motorVehicleRecordCheck = Boolean.FALSE;
129
130
131
132
133
134
135 public String getDocumentNumber() {
136 return documentNumber;
137 }
138
139
140
141
142
143
144 public void setDocumentNumber(String documentNumber) {
145 this.documentNumber = documentNumber;
146 }
147
148 public String getId() {
149 return id;
150 }
151
152
153 public void setId(String id) {
154 this.id = id;
155 }
156
157 public String getFirstName() {
158 return firstName;
159 }
160
161
162 public void setFirstName(String firstName) {
163 this.firstName = firstName;
164 }
165
166 public String getLastName() {
167 return lastName;
168 }
169
170
171 public void setLastName(String lastName) {
172 this.lastName = lastName;
173 }
174
175 public String getMiddleName() {
176 return middleName;
177 }
178
179 public void setMiddleName(String middleName) {
180 this.middleName = middleName;
181 }
182
183 public String getName() {
184 String name = "";
185 if(StringUtils.isNotBlank(getFirstName()))
186 name += getFirstName();
187 if(StringUtils.isNotBlank(getMiddleName()))
188 name += " " + getMiddleName();
189 if(StringUtils.isNotBlank(getLastName()))
190 name += " " + getLastName();
191 return name;
192 }
193
194 public String getStreetAddressLine1() {
195 return streetAddressLine1;
196 }
197
198
199 public void setStreetAddressLine1(String streetAddressLine1) {
200 this.streetAddressLine1 = streetAddressLine1;
201 }
202
203 public String getStreetAddressLine2() {
204 return streetAddressLine2;
205 }
206
207
208 public void setStreetAddressLine2(String streetAddressLine2) {
209 this.streetAddressLine2 = streetAddressLine2;
210 }
211
212 public String getCityName() {
213 return cityName;
214 }
215
216
217 public void setCityName(String cityName) {
218 this.cityName = cityName;
219 }
220
221 public String getStateCode() {
222 return stateCode;
223 }
224
225
226 public void setStateCode(String stateCode) {
227 this.stateCode = stateCode;
228 }
229
230 public String getZipCode() {
231 return zipCode;
232 }
233
234
235 public void setZipCode(String zipCode) {
236 this.zipCode = zipCode;
237 }
238
239 public String getCountryCode() {
240 return countryCode;
241 }
242
243
244 public void setCountryCode(String countryCode) {
245 this.countryCode = countryCode;
246 }
247
248 public String getEmailAddress() {
249 return emailAddress;
250 }
251
252
253 public void setEmailAddress(String emailAddress) {
254 this.emailAddress = emailAddress;
255 }
256
257 public String getPhoneNumber() {
258 return phoneNumber;
259 }
260
261
262 public void setPhoneNumber(String phoneNumber) {
263 this.phoneNumber = phoneNumber;
264 }
265
266 public String getTravelerTypeCode() {
267 return travelerTypeCode;
268 }
269
270
271 public void setTravelerTypeCode(String travelerTypeCode) {
272 this.travelerTypeCode = travelerTypeCode;
273 }
274
275 public TravelerType getTravelerType() {
276 return travelerType;
277 }
278
279 public void setTravelerType(TravelerType travelerType) {
280 this.travelerType = travelerType;
281 }
282
283 public String getPrincipalId() {
284 return principalId;
285 }
286
287 public void setPrincipalId(String principalId) {
288 this.principalId = principalId;
289 }
290
291 public String getCustomerNumber() {
292 return customerNumber;
293 }
294
295 public void setCustomerNumber(String customerNumber) {
296 this.customerNumber = customerNumber;
297 }
298
299 public boolean isLiabilityInsurance() {
300 return liabilityInsurance;
301 }
302
303 public void setLiabilityInsurance(boolean liabilityInsurance) {
304 this.liabilityInsurance = liabilityInsurance;
305 }
306
307 public String getDriversLicenseNumber() {
308 return driversLicenseNumber;
309 }
310
311 public void setDriversLicenseNumber(String driversLicenseNumber) {
312 this.driversLicenseNumber = driversLicenseNumber;
313 }
314
315 public String getDriversLicenseState() {
316 return driversLicenseState;
317 }
318
319 public void setDriversLicenseState(String driversLicenseState) {
320 this.driversLicenseState = driversLicenseState;
321 }
322
323 public Date getDriversLicenseExpDate() {
324 return driversLicenseExpDate;
325 }
326
327 public void setDriversLicenseExpDate(Date driversLicenseExpDate) {
328 this.driversLicenseExpDate = driversLicenseExpDate;
329 }
330
331 public boolean getNotifyTAFinal() {
332 return notifyTAFinal;
333 }
334
335 public boolean getNotifyTAStatusChange() {
336 return notifyTAStatusChange;
337 }
338
339 public boolean getNotifyTERFinal() {
340 return notifyTERFinal;
341 }
342
343 public boolean getNotifyTERStatusChange() {
344 return notifyTERStatusChange;
345 }
346
347 public String getCitizenship() {
348 return citizenship;
349 }
350
351 public void setCitizenship(String citizenship) {
352 this.citizenship = citizenship;
353 }
354
355 public boolean isActive() {
356 return active;
357 }
358
359 public void setActive(boolean active) {
360 this.active = active;
361 }
362
363 public boolean isNotifyTAFinal() {
364 return notifyTAFinal;
365 }
366
367 public void setNotifyTAFinal(boolean notifyTAFinal) {
368 this.notifyTAFinal = notifyTAFinal;
369 }
370
371 public boolean isNotifyTAStatusChange() {
372 return notifyTAStatusChange;
373 }
374
375 public void setNotifyTAStatusChange(boolean notifyTAStatusChange) {
376 this.notifyTAStatusChange = notifyTAStatusChange;
377 }
378
379 public boolean isNotifyTERFinal() {
380 return notifyTERFinal;
381 }
382
383 public void setNotifyTERFinal(boolean notifyTERFinal) {
384 this.notifyTERFinal = notifyTERFinal;
385 }
386
387 public boolean isNotifyTERStatusChange() {
388 return notifyTERStatusChange;
389 }
390
391 public void setNotifyTERStatusChange(boolean notifyTERStatusChange) {
392 this.notifyTERStatusChange = notifyTERStatusChange;
393 }
394
395 public boolean isMotorVehicleRecordCheck() {
396 return motorVehicleRecordCheck;
397 }
398
399 public void setMotorVehicleRecordCheck(boolean motorVehicleRecordCheck) {
400 this.motorVehicleRecordCheck = motorVehicleRecordCheck;
401 }
402
403 public boolean isNonResidentAlien() {
404 return nonResidentAlien;
405 }
406
407 public void setNonResidentAlien(boolean nonResidentAlien) {
408 this.nonResidentAlien = nonResidentAlien;
409 }
410
411 public Date getDateOfBirth() {
412 return dateOfBirth;
413 }
414
415 public void setDateOfBirth(Date dateOfBirth) {
416 this.dateOfBirth = dateOfBirth;
417 }
418
419 public String getGender() {
420 return gender;
421 }
422
423 public void setGender(String gender) {
424 this.gender = gender;
425 }
426
427 public Person getPerson() {
428 return person;
429 }
430
431 public void setPerson(Person person) {
432 this.person = person;
433 }
434 }