1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.travel.dataobject;
17
18 import edu.sampleu.travel.options.MileageRateKeyValues;
19 import edu.sampleu.travel.options.TravelDestinationKeyValues;
20 import org.kuali.rice.krad.bo.DataObjectBase;
21 import org.kuali.rice.krad.data.jpa.eclipselink.PortableSequenceGenerator;
22 import org.kuali.rice.krad.data.provider.annotation.Description;
23 import org.kuali.rice.krad.data.provider.annotation.InheritProperties;
24 import org.kuali.rice.krad.data.provider.annotation.InheritProperty;
25 import org.kuali.rice.krad.data.provider.annotation.KeyValuesFinderClass;
26 import org.kuali.rice.krad.data.provider.annotation.Label;
27 import org.kuali.rice.krad.data.provider.annotation.Relationship;
28 import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViewType;
29 import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViews;
30 import org.kuali.rice.krad.data.provider.annotation.UifDisplayHint;
31 import org.kuali.rice.krad.data.provider.annotation.UifDisplayHintType;
32 import org.kuali.rice.krad.data.provider.annotation.UifDisplayHints;
33 import org.kuali.rice.krad.data.provider.annotation.UifValidCharactersConstraintBeanName;
34
35 import javax.persistence.CascadeType;
36 import javax.persistence.Column;
37 import javax.persistence.Entity;
38 import javax.persistence.FetchType;
39 import javax.persistence.GeneratedValue;
40 import javax.persistence.Id;
41 import javax.persistence.JoinColumn;
42 import javax.persistence.ManyToOne;
43 import javax.persistence.Table;
44 import javax.persistence.Temporal;
45 import javax.persistence.TemporalType;
46 import java.io.Serializable;
47 import java.math.BigDecimal;
48 import java.util.Date;
49
50
51
52
53
54
55 @Entity
56 @Table(name = "TRVL_PD_EXP_T")
57 @UifAutoCreateViews({UifAutoCreateViewType.INQUIRY, UifAutoCreateViewType.LOOKUP})
58 public class TravelPerDiemExpense extends DataObjectBase implements Serializable {
59
60 private static final long serialVersionUID = 6269893036439679855L;
61
62 @Id
63 @Column(name = "PD_EXP_ID", length = 10)
64 @GeneratedValue(generator = "TRVL_PD_EXP_ID_S")
65 @PortableSequenceGenerator(name = "TRVL_PD_EXP_ID_S")
66 @Label("Id")
67 @Description("Unique identifier for per diem expense item")
68 @UifValidCharactersConstraintBeanName("AlphaNumericPatternConstraint")
69 private String travelPerDiemExpenseId;
70
71 @Column(name = "TRVL_AUTH_DOC_ID")
72 private String travelAuthorizationDocumentId;
73
74 @Column(name="TRVL_DEST_ID", length=40)
75 @Label("Primary Destination")
76 @Description("Primary Destination related to per diem expense")
77 @KeyValuesFinderClass(TravelDestinationKeyValues.class)
78 @UifDisplayHints({
79 @UifDisplayHint(UifDisplayHintType.NONE),
80 @UifDisplayHint(UifDisplayHintType.NO_LOOKUP_RESULT),
81 @UifDisplayHint(UifDisplayHintType.NO_INQUIRY)})
82 private String travelDestinationId;
83
84 @Relationship(foreignKeyFields="travelDestinationId")
85 @ManyToOne(fetch=FetchType.LAZY, cascade={CascadeType.REFRESH})
86 @JoinColumn(name="TRVL_DEST_ID", insertable=false, updatable=false)
87 @InheritProperties({
88 @InheritProperty(name="travelDestinationId",
89 label=@Label("Primary Destination"),
90 displayHints=@UifDisplayHints(@UifDisplayHint(UifDisplayHintType.NO_LOOKUP_CRITERIA)))})
91 @UifDisplayHint(UifDisplayHintType.NO_LOOKUP_CRITERIA)
92 private TravelDestination travelDestination;
93
94 @Temporal(TemporalType.TIMESTAMP)
95 @Column(name = "PD_DT")
96 @Label("Date of Use")
97 private Date perDiemDate;
98
99 @Column(name = "BKFST_VAL")
100 @Label("Breakfast Value")
101 private BigDecimal breakfastValue;
102
103 @Column(name = "LNCH_VAL")
104 @Label("Lunch Value")
105 private BigDecimal lunchValue;
106
107 @Column(name = "DNNR_VAL")
108 @Label("Dinner Value")
109 private BigDecimal dinnerValue;
110
111 @Column(name = "INCD_VAL")
112 @Label("Amount estimated for incidentals")
113 private BigDecimal incidentalsValue;
114
115 @Column(name="MLG_RT_ID", length=40)
116 @Label("Mileage Rate")
117 @Description("Mileage Rate Code Used")
118 @KeyValuesFinderClass(MileageRateKeyValues.class)
119 @UifDisplayHints({
120 @UifDisplayHint(UifDisplayHintType.NONE),
121 @UifDisplayHint(UifDisplayHintType.NO_LOOKUP_RESULT),
122 @UifDisplayHint(UifDisplayHintType.NO_INQUIRY)})
123 private String mileageRateId;
124
125 @Relationship(foreignKeyFields="mileageRateId")
126 @ManyToOne(fetch=FetchType.LAZY, cascade={CascadeType.REFRESH})
127 @JoinColumn(name="MLG_RT_ID", insertable=false, updatable=false)
128 @InheritProperties({
129 @InheritProperty(name="mileageRateCd",
130 label=@Label("Mileage rate"),
131 displayHints=@UifDisplayHints(@UifDisplayHint(UifDisplayHintType.NO_LOOKUP_CRITERIA)))})
132 private TravelMileageRate mileageRate;
133
134 @Column(name = "MLG_EST")
135 @Label("Number of estimated miles")
136 private BigDecimal estimatedMileage;
137
138 public String getTravelPerDiemExpenseId() {
139 return travelPerDiemExpenseId;
140 }
141
142 public void setTravelPerDiemExpenseId(String travelPerDiemExpenseId) {
143 this.travelPerDiemExpenseId = travelPerDiemExpenseId;
144 }
145
146 public String getTravelAuthorizationDocumentId() {
147 return travelAuthorizationDocumentId;
148 }
149
150 public void setTravelAuthorizationDocumentId(String travelAuthorizationDocumentId) {
151 this.travelAuthorizationDocumentId = travelAuthorizationDocumentId;
152 }
153
154 public Date getPerDiemDate() {
155 return perDiemDate;
156 }
157
158 public void setPerDiemDate(Date perDiemDate) {
159 this.perDiemDate = perDiemDate;
160 }
161
162 public BigDecimal getBreakfastValue() {
163 return breakfastValue;
164 }
165
166 public void setBreakfastValue(BigDecimal breakfastValue) {
167 this.breakfastValue = breakfastValue;
168 }
169
170 public BigDecimal getLunchValue() {
171 return lunchValue;
172 }
173
174 public void setLunchValue(BigDecimal lunchValue) {
175 this.lunchValue = lunchValue;
176 }
177
178 public BigDecimal getDinnerValue() {
179 return dinnerValue;
180 }
181
182 public void setDinnerValue(BigDecimal dinnerValue) {
183 this.dinnerValue = dinnerValue;
184 }
185
186 public BigDecimal getIncidentalsValue() {
187 return incidentalsValue;
188 }
189
190 public void setIncidentalsValue(BigDecimal incidentalsValue) {
191 this.incidentalsValue = incidentalsValue;
192 }
193
194 public String getTravelDestinationId() {
195 return travelDestinationId;
196 }
197
198 public void setTravelDestinationId(String travelDestinationId) {
199 this.travelDestinationId = travelDestinationId;
200 }
201
202 public TravelDestination getTravelDestination() {
203 return travelDestination;
204 }
205
206 public void setTravelDestination(TravelDestination travelDestination) {
207 this.travelDestination = travelDestination;
208 }
209
210 public String getMileageRateId() {
211 return mileageRateId;
212 }
213
214 public void setMileageRateId(String mileageRateId) {
215 this.mileageRateId = mileageRateId;
216 }
217
218 public TravelMileageRate getMileageRate() {
219 return mileageRate;
220 }
221
222 public void setMileageRate(TravelMileageRate mileageRate) {
223 this.mileageRate = mileageRate;
224 }
225
226 public BigDecimal getEstimatedMileage() {
227 return estimatedMileage;
228 }
229
230 public void setEstimatedMileage(BigDecimal estimatedMileage) {
231 this.estimatedMileage = estimatedMileage;
232 }
233 }