001 /** 002 * Copyright 2005-2013 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package edu.sampleu.travel.approval; 017 018 import edu.sampleu.travel.approval.dataobject.PrimaryDestination; 019 import edu.sampleu.travel.approval.dataobject.TravelerDetail; 020 import edu.sampleu.travel.approval.dataobject.TravelAdvance; 021 import org.kuali.rice.core.api.util.type.KualiDecimal; 022 import org.kuali.rice.krad.document.TransactionalDocumentBase; 023 024 import javax.persistence.*; 025 import java.util.Date; 026 import java.util.List; 027 028 /** 029 * Travel authorization transactional document. 030 * 031 * <p> 032 * This is a sample KRAD transactional document that demonstrates how 033 * to implement transactional documents within the KRAD UIF. 034 * </p> 035 * 036 * @author Kuali Rice Team (rice.collab@kuali.org) 037 */ 038 @Entity 039 @Table(name = "TRVL_AUTH_DOC_T") 040 public class TravelAuthorizationDocument extends TransactionalDocumentBase { 041 042 private String travelDocumentIdentifier; 043 private Date tripBegin; 044 private Date tripEnd; 045 private String tripDescription; 046 private String tripTypeCode; 047 048 // Traveler section 049 private Integer travelerDetailId; 050 private TravelerDetail travelerDetail; 051 052 // Primary Destination section 053 private Integer primaryDestinationId; 054 private PrimaryDestination primaryDestination; 055 056 // Travel Advance 057 private List<TravelAdvance> travelAdvanceList ; 058 059 // Special Circumstances 060 private KualiDecimal expenseLimit; 061 private Boolean questionForTaWhy; 062 private String questionForTa; 063 private Boolean questionForTaDocWhy; 064 private String questionForTaDoc; 065 066 // Emergency Contact 067 private String cellPhoneNumber; 068 private String regionFamiliarity; 069 private String citizenshipCountryCode; 070 private String transportationModeCode; 071 072 public TravelAuthorizationDocument() { 073 super(); 074 } 075 076 /** 077 * Returns the travel document identifier. 078 * 079 * <p> 080 * Gets the travel document identifier. 081 * </p> 082 * 083 * @return String - document service 084 */ 085 public String getTravelDocumentIdentifier() { 086 return travelDocumentIdentifier; 087 } 088 089 /** 090 * Initializes the document identifier. 091 * 092 * <p> 093 * Sets the document identifier. 094 * </p> 095 * 096 * @param travelDocumentIdentifier - document identifier 097 */ 098 public void setTravelDocumentIdentifier(String travelDocumentIdentifier) { 099 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 }