1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.kuali.ole.pdp.businessobject;
21
22 import java.sql.Timestamp;
23 import java.util.LinkedHashMap;
24 import javax.persistence.*;
25
26 import org.kuali.ole.pdp.businessobject.CustomerProfile;
27 import org.kuali.ole.sys.OLEPropertyConstants;
28 import org.kuali.ole.sys.businessobject.TimestampedBusinessObjectBase;
29 import org.kuali.ole.sys.context.SpringContext;
30 import org.kuali.rice.core.api.util.type.KualiDecimal;
31 import org.kuali.rice.core.api.util.type.KualiInteger;
32 import org.kuali.rice.kim.api.identity.Person;
33 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
34
35 @Entity
36 @Table(name = "PDP_FIL_T")
37 public class Batch extends TimestampedBusinessObjectBase {
38
39 @PortableSequenceGenerator(name = "PDP_PMT_FIL_ID_SEQ")
40 @GeneratedValue(generator = "PDP_PMT_FIL_ID_SEQ")
41 @Id
42 @Column(name = "PMT_FIL_ID")
43 private Integer id;
44
45 @Column(name = "UNIV_FISCAL_YR")
46 protected Integer universityFiscalYear;
47
48 @Column(name = "CUST_ID")
49 private KualiInteger customerId;
50
51 @Column(name = "PMT_FL_NM")
52 private String paymentFileName;
53
54 @Column(name = "CUST_FL_CRTN_TS")
55 private Timestamp customerFileCreateTimestamp;
56
57 @Column(name = "PMT_CNT")
58 private KualiInteger paymentCount;
59
60 @Column(name = "PMT_TOT_AMT")
61 private KualiDecimal paymentTotalAmount;
62
63 @Column(name = "SBMTR_USR_ID")
64 private String submiterUserId;
65
66 @Column(name = "FL_PROC_TS")
67 private Timestamp fileProcessTimestamp;
68
69 @ManyToOne(targetEntity = CustomerProfile.class, fetch = FetchType.LAZY, cascade = { CascadeType.REFRESH })
70 @JoinColumn(name = "CUST_ID", referencedColumnName = "CUST_ID", insertable = false, updatable = false)
71 private CustomerProfile customerProfile;
72
73 @Transient
74 private Person submiterUser;
75
76 public Batch() {
77 super();
78 }
79
80 public Timestamp getFileProcessTimestamp() {
81 return fileProcessTimestamp;
82 }
83
84
85
86
87 public Integer getId() {
88 return id;
89 }
90
91
92
93
94 public Timestamp getCustomerFileCreateTimestamp() {
95 return customerFileCreateTimestamp;
96 }
97
98
99
100
101 public KualiInteger getPaymentCount() {
102 return paymentCount;
103 }
104
105
106
107
108 public String getPaymentFileName() {
109 return paymentFileName;
110 }
111
112
113
114
115 public KualiDecimal getPaymentTotalAmount() {
116 return paymentTotalAmount;
117 }
118
119
120
121
122 public CustomerProfile getCustomerProfile() {
123 return customerProfile;
124 }
125
126
127
128
129 public void setCustomerFileCreateTimestamp(Timestamp t) {
130 customerFileCreateTimestamp = t;
131 }
132
133
134
135
136 public void setFileProcessTimestamp(Timestamp timestamp) {
137 fileProcessTimestamp = timestamp;
138 }
139
140
141
142
143 public void setId(Integer integer) {
144 id = integer;
145 }
146
147
148
149
150 public void setPaymentCount(KualiInteger integer) {
151 paymentCount = integer;
152 }
153
154
155
156
157 public void setPaymentFileName(String string) {
158 paymentFileName = string;
159 }
160
161
162
163
164 public void setPaymentTotalAmount(KualiDecimal decimal) {
165 paymentTotalAmount = decimal;
166 }
167
168
169
170
171 public void setCustomerProfile(CustomerProfile cp) {
172 customerProfile = cp;
173 }
174
175 public Person getSubmiterUser() {
176 submiterUser = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(submiterUserId, submiterUser);
177 return submiterUser;
178 }
179
180 public void setSubmiterUser(Person s) {
181 this.submiterUser = s;
182 }
183
184
185
186
187 public String getSubmiterUserId() {
188 return submiterUserId;
189 }
190
191
192
193
194 public void setSubmiterUserId(String submiterUserId) {
195 this.submiterUserId = submiterUserId;
196 }
197
198
199
200
201
202 protected LinkedHashMap toStringMapper() {
203 LinkedHashMap m = new LinkedHashMap();
204
205 m.put(OLEPropertyConstants.ID, this.id);
206
207 return m;
208 }
209
210 public KualiInteger getCustomerId() {
211 return customerId;
212 }
213
214 public void setCustomerId(KualiInteger customerId) {
215 this.customerId = customerId;
216 }
217
218 public Integer getUniversityFiscalYear() {
219 return universityFiscalYear;
220 }
221
222 public void setUniversityFiscalYear(Integer universityFiscalYear) {
223 this.universityFiscalYear = universityFiscalYear;
224 }
225 }