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.krad.document.TransactionalDocumentBase; 022 023 import javax.persistence.*; 024 import java.util.Date; 025 import java.util.List; 026 027 /** 028 * Travel authorization transactional document. 029 * 030 * <p> 031 * This is a sample KRAD transactional document that demonstrates how 032 * to implement transactional documents within the KRAD UIF. 033 * </p> 034 * 035 * @author Kuali Rice Team (rice.collab@kuali.org) 036 */ 037 @Entity 038 @Table(name = "TRVL_AUTH_DOC_T") 039 public class TravelAuthorizationDocument extends TransactionalDocumentBase { 040 041 private String travelDocumentIdentifier; 042 private Date tripBegin; 043 private Date tripEnd; 044 private String tripDescription; 045 private String tripTypeCode; 046 047 // Traveler section 048 private Integer travelerDetailId; 049 private TravelerDetail travelerDetail; 050 051 // Primary Destination section 052 private Integer primaryDestinationId; 053 private PrimaryDestination primaryDestination; 054 055 // Travel Advance 056 private List<TravelAdvance> travelAdvanceList ; 057 058 // Emergency Contact 059 private String cellPhoneNumber; 060 private String regionFamiliarity; 061 private String citizenshipCountryCode; 062 private String transportationModeCode; 063 064 public TravelAuthorizationDocument() { 065 super(); 066 } 067 068 /** 069 * Returns the travel document identifier. 070 * 071 * <p> 072 * Gets the travel document identifier. 073 * </p> 074 * 075 * @return String - document service 076 */ 077 public String getTravelDocumentIdentifier() { 078 return travelDocumentIdentifier; 079 } 080 081 /** 082 * Initializes the document identifier. 083 * 084 * <p> 085 * Sets the document identifier. 086 * </p> 087 * 088 * @param travelDocumentIdentifier - document identifier 089 */ 090 public void setTravelDocumentIdentifier(String travelDocumentIdentifier) { 091 this.travelDocumentIdentifier = travelDocumentIdentifier; 092 } 093 094 /** 095 * Returns the trip begin date. 096 * 097 * <p> 098 * Gets the trip begin date. 099 * </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 }