1 /**
2 * Copyright 2005-2013 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.krad.document.TransactionalDocumentBase;
22
23 import javax.persistence.*;
24 import java.util.Date;
25 import java.util.List;
26
27 /**
28 * Travel authorization transactional document.
29 *
30 * <p>
31 * This is a sample KRAD transactional document that demonstrates how
32 * to implement transactional documents within the KRAD UIF.
33 * </p>
34 *
35 * @author Kuali Rice Team (rice.collab@kuali.org)
36 */
37 @Entity
38 @Table(name = "TRVL_AUTH_DOC_T")
39 public class TravelAuthorizationDocument extends TransactionalDocumentBase {
40
41 private String travelDocumentIdentifier;
42 private Date tripBegin;
43 private Date tripEnd;
44 private String tripDescription;
45 private String tripTypeCode;
46
47 // Traveler section
48 private Integer travelerDetailId;
49 private TravelerDetail travelerDetail;
50
51 // Primary Destination section
52 private Integer primaryDestinationId;
53 private PrimaryDestination primaryDestination;
54
55 // Travel Advance
56 private List<TravelAdvance> travelAdvanceList ;
57
58 // Emergency Contact
59 private String cellPhoneNumber;
60 private String regionFamiliarity;
61 private String citizenshipCountryCode;
62 private String transportationModeCode;
63
64 public TravelAuthorizationDocument() {
65 super();
66 }
67
68 /**
69 * Returns the travel document identifier.
70 *
71 * <p>
72 * Gets the travel document identifier.
73 * </p>
74 *
75 * @return String - document service
76 */
77 public String getTravelDocumentIdentifier() {
78 return travelDocumentIdentifier;
79 }
80
81 /**
82 * Initializes the document identifier.
83 *
84 * <p>
85 * Sets the document identifier.
86 * </p>
87 *
88 * @param travelDocumentIdentifier - document identifier
89 */
90 public void setTravelDocumentIdentifier(String travelDocumentIdentifier) {
91 this.travelDocumentIdentifier = travelDocumentIdentifier;
92 }
93
94 /**
95 * Returns the trip begin date.
96 *
97 * <p>
98 * Gets the trip begin date.
99 * </p>
100 *
101 * @return Date - trip begin date
102 */
103 public Date getTripBegin() {
104 return tripBegin;
105 }
106
107 /**
108 * Initializes the trip starting date.
109 *
110 * <p>
111 * Sets the trip begin date.
112 * </p>
113 *
114 * @param tripBegin - trip starting date
115 */
116 public void setTripBegin(Date tripBegin) {
117 this.tripBegin = tripBegin;
118 }
119
120 /**
121 * Returns the trip end date.
122 *
123 * <p>
124 * Gets the trip end date.
125 * </p>
126 *
127 * @return Date - trip end date
128 */
129 public Date getTripEnd() {
130 return tripEnd;
131 }
132
133 /**
134 * Initializes the trip ending date.
135 *
136 * <p>
137 * Sets the trip end date.
138 * </p>
139 *
140 * @param tripEnd - trip ending date
141 */
142 public void setTripEnd(Date tripEnd) {
143 this.tripEnd = tripEnd;
144 }
145
146 /**
147 * Returns the trip description.
148 *
149 * <p>
150 * Gets the trip description.
151 * </p>
152 *
153 * @return Strin - trip description
154 */
155 public String getTripDescription() {
156 return tripDescription;
157 }
158
159 /**
160 * Initializes the trip description.
161 *
162 * <p>
163 * Sets the trip description.
164 * </p>
165 *
166 * @param tripDescription- trip description
167 */
168 public void setTripDescription(String tripDescription) {
169 this.tripDescription = tripDescription;
170 }
171
172 /**
173 * Initializes the trip type.
174 *
175 * <p>
176 * Sets the trip type.
177 * </p>
178 *
179 * @param tripTypeCode - trip type
180 */
181 public void setTripTypeCode(String tripTypeCode) {
182 this.tripTypeCode = tripTypeCode;
183 }
184
185 /**
186 * Returns the trip type.
187 *
188 * <p>
189 * Gets the trip type.
190 * </p>
191 *
192 * @return String - trip type
193 */
194 public String getTripTypeCode() {
195 return tripTypeCode;
196 }
197
198 /**
199 * Returns the destination id.
200 *
201 * <p>
202 * Gets the primary key for the destination.
203 * </p>
204 *
205 * @return Integer - destination id
206 */
207 public Integer getPrimaryDestinationId() {
208 return primaryDestinationId;
209 }
210
211 /**
212 * Initializes the primary destination id.
213 *
214 * <p>
215 * Sets the primary destination id.
216 * </p>
217 *
218 * @param primaryDestinationId - integer of primary destination id
219 */
220 public void setPrimaryDestinationId(Integer primaryDestinationId) {
221 this.primaryDestinationId = primaryDestinationId;
222 }
223
224 /**
225 * Returns the traveler detail id.
226 *
227 * <p>
228 * Gets the primary key for the traveler.
229 * </p>
230 *
231 * @return Integer - traveler detail id
232 */
233 public Integer getTravelerDetailId() {
234 return travelerDetailId;
235 }
236
237 /**
238 * Initializes the traveler detail id.
239 *
240 * <p>
241 * Sets the traveler detail id.
242 * </p>
243 *
244 * @param travelerDetailId - integer of primary destination id
245 */
246 public void setTravelerDetailId(Integer travelerDetailId) {
247 this.travelerDetailId = travelerDetailId;
248 }
249
250 /**
251 * Returns the nested traveler detail.
252 *
253 * <p>
254 * Gets the traveler detail object.
255 * </p>
256 *
257 * @return TravelerDetail - traveler detail
258 */
259
260 public TravelerDetail getTravelerDetail() {
261 return travelerDetail;
262 }
263
264 /**
265 * Initializes the nested traveler detail object.
266 *
267 * <p>
268 * Sets the traveler detail.
269 * </p>
270 *
271 * @param travelerDetail - traveler detail object
272 */
273 public void setTravelerDetail(TravelerDetail travelerDetail) {
274 this.travelerDetail = travelerDetail;
275 }
276
277 /**
278 * Returns primary destination.
279 *
280 * <p>
281 * Gets the primary destination
282 * </p>
283 *
284 * @return PrimaryDestination - primary destination
285 */
286 public PrimaryDestination getPrimaryDestination() {
287 return primaryDestination;
288 }
289
290 /**
291 * Initializes the primary destination.
292 *
293 * <p>
294 * Sets the primary destination.
295 * </p>
296 *
297 * @param primaryDestination - primary destination
298 */
299 public void setPrimaryDestination(PrimaryDestination primaryDestination) {
300 this.primaryDestination = primaryDestination;
301 }
302
303 /**
304 * Returns travel advance collection.
305 *
306 * <p>
307 * Gets the travel advance collection.
308 * </p>
309 *
310 * @return List<TravelAdvance> - travel advance collection
311 */
312 public List<TravelAdvance> getTravelAdvanceList() {
313 return travelAdvanceList;
314 }
315
316 /**
317 * Initializes travel advance collection.
318 *
319 * <p>
320 * Sets the travel advance collection.
321 * </p>
322 *
323 * @param travelAdvanceList - travel advance collection
324 */
325 public void setTravelAdvanceList(List<TravelAdvance> travelAdvanceList) {
326 this.travelAdvanceList = travelAdvanceList;
327 }
328
329 /**
330 * Returns the cell phone number.
331 *
332 * <p>
333 * Gets the emergency contact cell phone number.
334 * </p>
335 *
336 * @return String - cell phone number
337 */
338 public String getCellPhoneNumber() {
339 return cellPhoneNumber;
340 }
341
342 /**
343 * Initializes the cell phone number.
344 *
345 * <p>
346 * Sets the emergency contact cell phone number.
347 * </p>
348 *
349 * @param cellPhoneNumber - string of the cell phone number
350 */
351 public void setTravelerDetailId(String cellPhoneNumber) {
352 this.cellPhoneNumber = cellPhoneNumber;
353 }
354
355 /**
356 * Returns the region familiarity.
357 *
358 * <p>
359 * Gets the emergency contact region familiarity.
360 * </p>
361 *
362 * @return String - region familiarity
363 */
364 public String getRegionFamiliarity() {
365 return regionFamiliarity;
366 }
367
368 /**
369 * Initializes the region familiarity.
370 *
371 * <p>
372 * Sets the emergency contact region familiarity.
373 * </p>
374 *
375 * @param regionFamiliarity - string of the region familiarity
376 */
377 public void setRegionFamiliarity(String regionFamiliarity) {
378 this.regionFamiliarity = regionFamiliarity;
379 }
380
381 /**
382 * Returns the citizenship country code.
383 *
384 * <p>
385 * Gets the emergency contact citizenship country code.
386 * </p>
387 *
388 * @return String - citizenship country code
389 */
390 public String getCitizenshipCountryCode() {
391 return citizenshipCountryCode;
392 }
393
394 /**
395 * Initializes the citizenship country code.
396 *
397 * <p>
398 * Sets the emergency contact citizenship country code.
399 * </p>
400 *
401 * @param citizenshipCountryCode - string of the citizenship country code
402 */
403 public void setCitizenshipCountryCode(String citizenshipCountryCode) {
404 this.citizenshipCountryCode = citizenshipCountryCode;
405 }
406
407 /**
408 * Returns the transportation mode code.
409 *
410 * <p>
411 * Gets the emergency contact transportation mode cpde.
412 * </p>
413 *
414 * @return String - transportation mode code
415 */
416 public String getTransportationModeCode() {
417 return transportationModeCode;
418 }
419
420 /**
421 * Initializes the transportation mode code.
422 *
423 * <p>
424 * Sets the emergency contact transportation mode code.
425 * </p>
426 *
427 * @param transportationModeCode - string of the transportation mode code
428 */
429 public void setTransportationModeCode(String transportationModeCode) {
430 this.transportationModeCode = transportationModeCode;
431 }
432 }