1 /**
2 * Copyright 2005-2012 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 org.kuali.rice.krad.document.TransactionalDocumentBase;
20
21 import javax.persistence.*;
22 import java.util.Date;
23
24 /**
25 * Travel authorization transactional document.
26 *
27 * <p>
28 * This is a sample KRAD transactional document that demonstrates how
29 * to implement transactional documents within the KRAD UIF.
30 * </p>
31 *
32 * @author Kuali Rice Team (rice.collab@kuali.org)
33 */
34 @Entity
35 @Table(name = "TRVL_AUTH_DOC_T")
36 public class TravelAuthorizationDocument extends TransactionalDocumentBase {
37
38 private String travelDocumentIdentifier;
39 private String tripTypeCode;
40 private Date tripBegin;
41 private Date tripEnd;
42 private String tripDescription;
43 private Boolean primaryDestinationIndicator = false;
44
45 private Integer primaryDestinationId;
46 private String primaryDestinationName;
47 private String primaryDestinationCountryState;
48 private String primaryDestinationCounty;
49
50 private PrimaryDestination primaryDestination;
51
52 public TravelAuthorizationDocument() {
53 super();
54 }
55
56 /**
57 * Returns the travel document identifier.
58 *
59 * <p>
60 * Gets the travel document identifier.
61 * </p>
62 *
63 * @return String - document service
64 */
65 public String getTravelDocumentIdentifier() {
66 return travelDocumentIdentifier;
67 }
68
69 /**
70 * Initializes the document identifier.
71 *
72 * <p>
73 * Sets the document identifier.
74 * </p>
75 *
76 * @param travelDocumentIdentifier - document identifier
77 */
78 public void setTravelDocumentIdentifier(String travelDocumentIdentifier) {
79 this.travelDocumentIdentifier = travelDocumentIdentifier;
80 }
81
82 /**
83 * Returns the trip type code.
84 *
85 * <p>
86 * Gets the trip type code.
87 * </p>
88 *
89 * @return String - trip type code
90 */
91 public String getTripTypeCode() {
92 return tripTypeCode;
93 }
94
95 /**
96 * Initializes the trip type code.
97 *
98 * <p>
99 * Sets the trip type code.
100 * </p>
101 *
102 * @param tripTypeCode - trip type code
103 */
104 public void setTripTypeCode(String tripTypeCode) {
105 this.tripTypeCode = tripTypeCode;
106 }
107
108 /**
109 * Returns the trip begin date.
110 *
111 * <p>
112 * Gets the trip begin date.
113 * </p>
114 *
115 * @return Date - trip begin date
116 */
117 public Date getTripBegin() {
118 return tripBegin;
119 }
120
121 /**
122 * Initializes the trip starting date.
123 *
124 * <p>
125 * Sets the trip begin date.
126 * </p>
127 *
128 * @param tripBegin - trip starting date
129 */
130 public void setTripBegin(Date tripBegin) {
131 this.tripBegin = tripBegin;
132 }
133
134 /**
135 * Returns the trip end date.
136 *
137 * <p>
138 * Gets the trip end date.
139 * </p>
140 *
141 * @return Date - trip end date
142 */
143 public Date getTripEnd() {
144 return tripEnd;
145 }
146
147 /**
148 * Initializes the trip ending date.
149 *
150 * <p>
151 * Sets the trip end date.
152 * </p>
153 *
154 * @param tripEnd - trip ending date
155 */
156 public void setTripEnd(Date tripEnd) {
157 this.tripEnd = tripEnd;
158 }
159
160 /**
161 * Returns the trip description.
162 *
163 * <p>
164 * Gets the trip description.
165 * </p>
166 *
167 * @return Strin - trip description
168 */
169 public String getTripDescription() {
170 return tripDescription;
171 }
172
173 /**
174 * Initializes the trip description.
175 *
176 * <p>
177 * Sets the trip description.
178 * </p>
179 *
180 * @param tripDescription- trip description
181 */
182 public void setTripDescription(String tripDescription) {
183 this.tripDescription = tripDescription;
184 }
185
186 /**
187 * Returns the destination id.
188 *
189 * <p>
190 * Gets the primary key for the destination.
191 * </p>
192 *
193 * @return Integer - destination id
194 */
195 public Integer getPrimaryDestinationId() {
196 return primaryDestinationId;
197 }
198
199 /**
200 * Initializes the primary destination id.
201 *
202 * <p>
203 * Sets the primary destination id.
204 * </p>
205 *
206 * @param primaryDestinationId - integer of primary destination id
207 */
208 public void setPrimaryDestinationId(Integer primaryDestinationId) {
209 this.primaryDestinationId = primaryDestinationId;
210 }
211
212 /**
213 * Returns whether the destination is indicated.
214 *
215 * <p>
216 * Gets the primary destination indicator flag.
217 * </p>
218 *
219 * @return Boolean - primary destination indicator flag
220 */
221 public Boolean getPrimaryDestinationIndicator() {
222 return primaryDestinationIndicator;
223 }
224
225 /**
226 * Initializes the primary destination flag.
227 *
228 * <p>
229 * Sets the flag whether a primary destination is indicated.
230 * </p>
231 *
232 * @param primaryDestinationIndicator - primary destination indicator
233 */
234 public void setPrimaryDestinationIndicator(Boolean primaryDestinationIndicator) {
235 this.primaryDestinationIndicator = primaryDestinationIndicator;
236 }
237
238 /**
239 * Returns primary destination name.
240 *
241 * <p>
242 * Gets the name of the primary destination
243 * </p>
244 *
245 * @return String - primary destination name
246 */
247 public String getPrimaryDestinationName() {
248 return primaryDestinationName;
249 }
250
251 /**
252 * Initializes the primary destination name.
253 *
254 * <p>
255 * Sets the name for the primary destination.
256 * </p>
257 *
258 * @param primaryDestinationName - primary destination name
259 */
260 public void setPrimaryDestinationName(String primaryDestinationName) {
261 this.primaryDestinationName = primaryDestinationName;
262 }
263
264 /**
265 * Returns primary destination state.
266 *
267 * <p>
268 * Gets the state of the primary destination
269 * </p>
270 *
271 * @return String - primary destination state
272 */
273 public String getPrimaryDestinationCountryState() {
274 return primaryDestinationCountryState;
275 }
276
277 /**
278 * Initializes the primary destination state.
279 *
280 * <p>
281 * Sets the state for the primary destination.
282 * </p>
283 *
284 * @param primaryDestinationCountryState - primary destination state
285 */
286 public void setPrimaryDestinationCountryState(String primaryDestinationCountryState) {
287 this.primaryDestinationCountryState = primaryDestinationCountryState;
288 }
289
290 /**
291 * Returns primary destination county.
292 *
293 * <p>
294 * Gets the county of the primary destination
295 * </p>
296 *
297 * @return String - primary destination county
298 */
299 public String getPrimaryDestinationCounty() {
300 return primaryDestinationCounty;
301 }
302
303 /**
304 * Initializes the primary destination county.
305 *
306 * <p>
307 * Sets the county for the primary destination.
308 * </p>
309 *
310 * @param primaryDestinationCounty - primary destination county
311 */
312 public void setPrimaryDestinationCounty(String primaryDestinationCounty) {
313 this.primaryDestinationCounty = primaryDestinationCounty;
314 }
315
316 /**
317 * Returns primary destination.
318 *
319 * <p>
320 * Gets the primary destination
321 * </p>
322 *
323 * @return PrimaryDestination - primary destination
324 */
325 public PrimaryDestination getPrimaryDestination() {
326 return primaryDestination;
327 }
328
329 /**
330 * Initializes the primary destination.
331 *
332 * <p>
333 * Sets the primary destination.
334 * </p>
335 *
336 * @param primaryDestination - primary destination
337 */
338 public void setPrimaryDestination(PrimaryDestination primaryDestination) {
339 this.primaryDestination = primaryDestination;
340 }
341 }