1 /**
2 * Copyright 2005-2014 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package edu.sampleu.travel.approval;
17
18 import edu.sampleu.travel.approval.dataobject.PrimaryDestination;
19 import edu.sampleu.travel.approval.dataobject.TravelerDetail;
20 import edu.sampleu.travel.approval.dataobject.TravelAdvance;
21 import org.kuali.rice.core.api.util.type.KualiDecimal;
22 import org.kuali.rice.krad.document.TransactionalDocumentBase;
23
24 import javax.persistence.*;
25 import java.util.Date;
26 import java.util.List;
27
28 /**
29 * Travel authorization transactional document.
30 *
31 * <p>
32 * This is a sample KRAD transactional document that demonstrates how
33 * to implement transactional documents within the KRAD UIF.
34 * </p>
35 *
36 * @author Kuali Rice Team (rice.collab@kuali.org)
37 */
38 @Entity
39 @Table(name = "TRVL_AUTH_DOC_T")
40 public class TravelAuthorizationDocument extends TransactionalDocumentBase {
41
42 private String travelDocumentIdentifier;
43 private Date tripBegin;
44 private Date tripEnd;
45 private String tripDescription;
46 private String tripTypeCode;
47
48 // Traveler section
49 private Integer travelerDetailId;
50 private TravelerDetail travelerDetail;
51
52 // Primary Destination section
53 private Integer primaryDestinationId;
54 private PrimaryDestination primaryDestination;
55
56 // Travel Advance
57 private List<TravelAdvance> travelAdvanceList ;
58
59 // Special Circumstances
60 private KualiDecimal expenseLimit;
61 private Boolean questionForTaWhy;
62 private String questionForTa;
63 private Boolean questionForTaDocWhy;
64 private String questionForTaDoc;
65
66 // Emergency Contact
67 private String cellPhoneNumber;
68 private String regionFamiliarity;
69 private String citizenshipCountryCode;
70 private String transportationModeCode;
71
72 public TravelAuthorizationDocument() {
73 super();
74 }
75
76 /**
77 * Returns the travel document identifier.
78 *
79 * <p>
80 * Gets the travel document identifier.
81 * </p>
82 *
83 * @return String - document service
84 */
85 public String getTravelDocumentIdentifier() {
86 return travelDocumentIdentifier;
87 }
88
89 /**
90 * Initializes the document identifier.
91 *
92 * <p>
93 * Sets the document identifier.
94 * </p>
95 *
96 * @param travelDocumentIdentifier - document identifier
97 */
98 public void setTravelDocumentIdentifier(String travelDocumentIdentifier) {
99 this.travelDocumentIdentifier = travelDocumentIdentifier;
100 }
101
102 /**
103 * Returns the trip begin date.
104 *
105 * <p>
106 * Gets the trip begin date.
107 * </p>
108 *
109 * @return Date - trip begin date
110 */
111 public Date getTripBegin() {
112 return tripBegin;
113 }
114
115 /**
116 * Initializes the trip starting date.
117 *
118 * <p>
119 * Sets the trip begin date.
120 * </p>
121 *
122 * @param tripBegin - trip starting date
123 */
124 public void setTripBegin(Date tripBegin) {
125 this.tripBegin = tripBegin;
126 }
127
128 /**
129 * Returns the trip end date.
130 *
131 * <p>
132 * Gets the trip end date.
133 * </p>
134 *
135 * @return Date - trip end date
136 */
137 public Date getTripEnd() {
138 return tripEnd;
139 }
140
141 /**
142 * Initializes the trip ending date.
143 *
144 * <p>
145 * Sets the trip end date.
146 * </p>
147 *
148 * @param tripEnd - trip ending date
149 */
150 public void setTripEnd(Date tripEnd) {
151 this.tripEnd = tripEnd;
152 }
153
154 /**
155 * Returns the trip description.
156 *
157 * <p>
158 * Gets the trip description.
159 * </p>
160 *
161 * @return Strin - trip description
162 */
163 public String getTripDescription() {
164 return tripDescription;
165 }
166
167 /**
168 * Initializes the trip description.
169 *
170 * <p>
171 * Sets the trip description.
172 * </p>
173 *
174 * @param tripDescription- trip description
175 */
176 public void setTripDescription(String tripDescription) {
177 this.tripDescription = tripDescription;
178 }
179
180 /**
181 * Initializes the trip type.
182 *
183 * <p>
184 * Sets the trip type.
185 * </p>
186 *
187 * @param tripTypeCode - trip type
188 */
189 public void setTripTypeCode(String tripTypeCode) {
190 this.tripTypeCode = tripTypeCode;
191 }
192
193 /**
194 * Returns the trip type.
195 *
196 * <p>
197 * Gets the trip type.
198 * </p>
199 *
200 * @return String - trip type
201 */
202 public String getTripTypeCode() {
203 return tripTypeCode;
204 }
205
206 /**
207 * Returns the destination id.
208 *
209 * <p>
210 * Gets the primary key for the destination.
211 * </p>
212 *
213 * @return Integer - destination id
214 */
215 public Integer getPrimaryDestinationId() {
216 return primaryDestinationId;
217 }
218
219 /**
220 * Initializes the primary destination id.
221 *
222 * <p>
223 * Sets the primary destination id.
224 * </p>
225 *
226 * @param primaryDestinationId - integer of primary destination id
227 */
228 public void setPrimaryDestinationId(Integer primaryDestinationId) {
229 this.primaryDestinationId = primaryDestinationId;
230 }
231
232 /**
233 * Returns the traveler detail id.
234 *
235 * <p>
236 * Gets the primary key for the traveler.
237 * </p>
238 *
239 * @return Integer - traveler detail id
240 */
241 public Integer getTravelerDetailId() {
242 return travelerDetailId;
243 }
244
245 /**
246 * Initializes the traveler detail id.
247 *
248 * <p>
249 * Sets the traveler detail id.
250 * </p>
251 *
252 * @param travelerDetailId - integer of primary destination id
253 */
254 public void setTravelerDetailId(Integer travelerDetailId) {
255 this.travelerDetailId = travelerDetailId;
256 }
257
258 /**
259 * Returns the nested traveler detail.
260 *
261 * <p>
262 * Gets the traveler detail object.
263 * </p>
264 *
265 * @return TravelerDetail - traveler detail
266 */
267
268 public TravelerDetail getTravelerDetail() {
269 return travelerDetail;
270 }
271
272 /**
273 * Initializes the nested traveler detail object.
274 *
275 * <p>
276 * Sets the traveler detail.
277 * </p>
278 *
279 * @param travelerDetail - traveler detail object
280 */
281 public void setTravelerDetail(TravelerDetail travelerDetail) {
282 this.travelerDetail = travelerDetail;
283 }
284
285 /**
286 * Returns primary destination.
287 *
288 * <p>
289 * Gets the primary destination
290 * </p>
291 *
292 * @return PrimaryDestination - primary destination
293 */
294 public PrimaryDestination getPrimaryDestination() {
295 return primaryDestination;
296 }
297
298 /**
299 * Initializes the primary destination.
300 *
301 * <p>
302 * Sets the primary destination.
303 * </p>
304 *
305 * @param primaryDestination - primary destination
306 */
307 public void setPrimaryDestination(PrimaryDestination primaryDestination) {
308 this.primaryDestination = primaryDestination;
309 }
310
311 /**
312 * Returns travel advance collection.
313 *
314 * <p>
315 * Gets the travel advance collection.
316 * </p>
317 *
318 * @return List<TravelAdvance> - travel advance collection
319 */
320 public List<TravelAdvance> getTravelAdvanceList() {
321 return travelAdvanceList;
322 }
323
324 /**
325 * Initializes travel advance collection.
326 *
327 * <p>
328 * Sets the travel advance collection.
329 * </p>
330 *
331 * @param travelAdvanceList - travel advance collection
332 */
333 public void setTravelAdvanceList(List<TravelAdvance> travelAdvanceList) {
334 this.travelAdvanceList = travelAdvanceList;
335 }
336
337 /**
338 * Returns the cell phone number.
339 *
340 * <p>
341 * Gets the emergency contact cell phone number.
342 * </p>
343 *
344 * @return String - cell phone number
345 */
346 public String getCellPhoneNumber() {
347 return cellPhoneNumber;
348 }
349
350 /**
351 * Initializes the cell phone number.
352 *
353 * <p>
354 * Sets the emergency contact cell phone number.
355 * </p>
356 *
357 * @param cellPhoneNumber - string of the cell phone number
358 */
359 public void setTravelerDetailId(String cellPhoneNumber) {
360 this.cellPhoneNumber = cellPhoneNumber;
361 }
362
363 /**
364 * Returns the region familiarity.
365 *
366 * <p>
367 * Gets the emergency contact region familiarity.
368 * </p>
369 *
370 * @return String - region familiarity
371 */
372 public String getRegionFamiliarity() {
373 return regionFamiliarity;
374 }
375
376 /**
377 * Initializes the region familiarity.
378 *
379 * <p>
380 * Sets the emergency contact region familiarity.
381 * </p>
382 *
383 * @param regionFamiliarity - string of the region familiarity
384 */
385 public void setRegionFamiliarity(String regionFamiliarity) {
386 this.regionFamiliarity = regionFamiliarity;
387 }
388
389 /**
390 * Returns the citizenship country code.
391 *
392 * <p>
393 * Gets the emergency contact citizenship country code.
394 * </p>
395 *
396 * @return String - citizenship country code
397 */
398 public String getCitizenshipCountryCode() {
399 return citizenshipCountryCode;
400 }
401
402 /**
403 * Initializes the citizenship country code.
404 *
405 * <p>
406 * Sets the emergency contact citizenship country code.
407 * </p>
408 *
409 * @param citizenshipCountryCode - string of the citizenship country code
410 */
411 public void setCitizenshipCountryCode(String citizenshipCountryCode) {
412 this.citizenshipCountryCode = citizenshipCountryCode;
413 }
414
415 /**
416 * Returns the transportation mode code.
417 *
418 * <p>
419 * Gets the emergency contact transportation mode cpde.
420 * </p>
421 *
422 * @return String - transportation mode code
423 */
424 public String getTransportationModeCode() {
425 return transportationModeCode;
426 }
427
428 /**
429 * Initializes the transportation mode code.
430 *
431 * <p>
432 * Sets the emergency contact transportation mode code.
433 * </p>
434 *
435 * @param transportationModeCode - string of the transportation mode code
436 */
437 public void setTransportationModeCode(String transportationModeCode) {
438 this.transportationModeCode = transportationModeCode;
439 }
440
441 /**
442 * Returns the expense limit.
443 *
444 * <p>
445 * Gets the special circumstance expense limit.
446 * </p>
447 *
448 * @return KualiDecimal - expense limit
449 */
450 public KualiDecimal getExpenseLimit() {
451 return expenseLimit;
452 }
453
454 /**
455 * Initializes the expense limit.
456 *
457 * <p>
458 * Sets the special circumstance expense limit.
459 * </p>
460 *
461 * @param expenseLimit - kuali decimal of the expense limit
462 */
463 public void setExpenseLimit(KualiDecimal expenseLimit) {
464 this.expenseLimit = expenseLimit;
465 }
466
467 /**
468 * Returns the questions for TA why.
469 *
470 * <p>
471 * Gets the special circumstance questions for TA why.
472 * </p>
473 *
474 * @return Boolean - questionForTaWhy
475 */
476 public Boolean getQuestionForTaWhy() {
477 return questionForTaWhy;
478 }
479
480 /**
481 * Initializes the questions for TA why.
482 *
483 * <p>
484 * Sets the special circumstance questions for TA why.
485 * </p>
486 *
487 * @param questionForTaWhy - boolean of the questions for TA why
488 */
489 public void setQuestionForTaWhy(Boolean questionForTaWhy) {
490 this.questionForTaWhy = questionForTaWhy;
491 }
492
493 /**
494 * Returns the questions for TA.
495 *
496 * <p>
497 * Gets the special circumstance questions for TA.
498 * </p>
499 *
500 * @return String - questions for TA
501 */
502 public String getQuestionForTa() {
503 return questionForTa;
504 }
505
506 /**
507 * Initializes the questions for TA.
508 *
509 * <p>
510 * Sets the special circumstance questions for TA.
511 * </p>
512 *
513 * @param questionForTa - string of the questions for TA
514 */
515 public void setQuestionForTa(String questionForTa) {
516 this.questionForTa = questionForTa;
517 }
518
519 /**
520 * Returns the questions for TA document why.
521 *
522 * <p>
523 * Gets the special circumstance questions for TA document why.
524 * </p>
525 *
526 * @return Boolean - questionForTaDocWhy
527 */
528 public Boolean getQuestionForTaDocWhy() {
529 return questionForTaDocWhy;
530 }
531
532 /**
533 * Initializes the questions for TA document why.
534 *
535 * <p>
536 * Sets the special circumstance questions for TA document why.
537 * </p>
538 *
539 * @param questionForTaDocWhy - boolean of the questions for TA document why
540 */
541 public void setQuestionForTaDocWhy(Boolean questionForTaDocWhy) {
542 this.questionForTaDocWhy = questionForTaDocWhy;
543 }
544
545 /**
546 * Returns the questions for TA document.
547 *
548 * <p>
549 * Gets the special circumstance questions for TA document.
550 * </p>
551 *
552 * @return String - questions for TA document
553 */
554 public String getQuestionForTaDoc() {
555 return questionForTaDoc;
556 }
557
558 /**
559 * Initializes the questions for TA document.
560 *
561 * <p>
562 * Sets the special circumstance questions for TA document.
563 * </p>
564 *
565 * @param questionForTaDoc - string of the questions for TA document
566 */
567 public void setQuestionForTaDoc(String questionForTaDoc) {
568 this.questionForTaDoc = questionForTaDoc;
569 }
570
571 }