001 /*
002 * Copyright 2011 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 /*
017 * Created on Jul 12, 2004
018 *
019 */
020 package org.kuali.kfs.pdp.businessobject;
021
022 import java.sql.Date;
023 import java.sql.Timestamp;
024 import java.util.LinkedHashMap;
025
026 import org.kuali.kfs.sys.KFSPropertyConstants;
027 import org.kuali.kfs.sys.businessobject.Bank;
028 import org.kuali.kfs.sys.businessobject.TimestampedBusinessObjectBase;
029 import org.kuali.kfs.sys.context.SpringContext;
030 import org.kuali.rice.kim.bo.Person;
031 import org.kuali.rice.kns.util.KualiInteger;
032
033 public class PaymentGroupHistory extends TimestampedBusinessObjectBase {
034
035 private KualiInteger id; // PMT_GRP_HIST_ID
036
037 private String changeNoteText; // PMT_CHG_NTE_TXT VARCHAR2 250
038 private Person changeUser;
039 private String changeUserId; // PMT_CHG_USR_ID VARCHAR2 8
040 private Timestamp changeTime; // PMT_CHG_TS DATE 7
041 private Date origPaymentDate; // ORIG_PMT_DT DATE 7
042 private String origAchBankRouteNbr; // ORIG_ACH_BNK_RTNG_NBR VARCHAR2 17 0
043 private String origAdviceEmail; // ORIG_ADV_EMAIL_ADDR VARCHAR2 50
044 private KualiInteger origDisburseNbr; // ORIG_DISB_NBR NUMBER 9 0
045 private Timestamp origDisburseDate; // ORIG_DISB_TS DATE 7
046 private Boolean origProcessImmediate; // ORIG_PROC_IMD_IND VARCHAR2 1
047 private Boolean origPmtSpecHandling; // ORIG_PMT_SPCL_HANDLG_IND VARCHAR2 1
048 private Boolean pmtCancelExtractStat; // PMT_CNCL_EXTRT_STAT_IND VARCHAR2 1
049 private Timestamp pmtCancelExtractDate; // PMT_CNCL_EXTRT_TS
050
051 private String disbursementTypeCode;
052 private DisbursementType disbursementType;
053
054 private String origBankCode;
055 private Bank bank;
056
057 private String paymentStatusCode;
058 private PaymentStatus origPaymentStatus; // ORIG_PMT_STAT_CD VARCHAR2 4
059
060 private KualiInteger processId;
061 private PaymentProcess paymentProcess;
062
063 private String paymentChangeCode;
064 private PaymentChangeCode paymentChange; // PMT_CHG_CD VARCHAR2 4
065
066 private KualiInteger paymentGroupId;
067 private PaymentGroup paymentGroup; // PMT_GRP_ID
068
069 public PaymentGroupHistory() {
070 super();
071 }
072
073 /**
074 * @hibernate.id column="PMT_GRP_HIST_ID" generator-class="sequence"
075 * @hibernate.generator-param name="sequence" value="PDP.PDP_PMT_GRP_HIST_ID_SEQ"
076 * @return
077 */
078 public KualiInteger getId() {
079 return id;
080 }
081
082 /**
083 * @hibernate.many-to-one column="PMT_GRP_ID" class="edu.iu.uis.pdp.bo.PaymentGroup"
084 * @return Returns the paymentGroup.
085 */
086 public PaymentGroup getPaymentGroup() {
087 return paymentGroup;
088 }
089
090 /**
091 * @return
092 * @hibernate.property column="PMT_CNCL_EXTRT_TS"
093 */
094 public Timestamp getPmtCancelExtractDate() {
095 return pmtCancelExtractDate;
096 }
097
098 /**
099 * @return
100 * @hibernate.many-to-one column="PMT_CHG_CD" class="edu.iu.uis.pdp.bo.PaymentChange"
101 */
102 public PaymentChangeCode getPaymentChange() {
103 return paymentChange;
104 }
105
106 /**
107 * @return
108 * @hibernate.property column="PMT_CHG_NTE_TXT" length="250"
109 */
110 public String getChangeNoteText() {
111 return changeNoteText;
112 }
113
114 /**
115 * @return
116 * @hibernate.property column="PMT_CHG_TS"
117 */
118 public Timestamp getChangeTime() {
119 return changeTime;
120 }
121
122 /**
123 * @return
124 * @hibernate.property column="ORIG_ACH_BNK_RTNG_NBR" length="17"
125 */
126 public String getOrigAchBankRouteNbr() {
127 return origAchBankRouteNbr;
128 }
129
130 /**
131 * @return
132 * @hibernate.property column="ORIG_ADV_EMAIL_ADDR" length="50"
133 */
134 public String getOrigAdviceEmail() {
135 return origAdviceEmail;
136 }
137
138 /**
139 * @return
140 * @hibernate.property column="ORIG_DISB_TS"
141 */
142 public Timestamp getOrigDisburseDate() {
143 return origDisburseDate;
144 }
145
146 /**
147 * @return
148 * @hibernate.property column="ORIG_DISB_NBR"
149 */
150 public KualiInteger getOrigDisburseNbr() {
151 return origDisburseNbr;
152 }
153
154 /**
155 * @return
156 * @hibernate.property column="ORIG_PMT_DT"
157 */
158 public Date getOrigPaymentDate() {
159 return origPaymentDate;
160 }
161
162 /**
163 * @return
164 * @hibernate.property column="ORIG_PMT_SPCL_HANDLG_IND" type="yes_no"
165 */
166 public Boolean getOrigPmtSpecHandling() {
167 return origPmtSpecHandling;
168 }
169
170 /**
171 * @return
172 * @hibernate.many-to-one column="ORIG_PMT_STAT_CD" class="edu.iu.uis.pdp.bo.PaymentStatus"
173 */
174 public PaymentStatus getOrigPaymentStatus() {
175 return origPaymentStatus;
176 }
177
178 /**
179 * @return
180 * @hibernate.property column="ORIG_PROC_IMD_IND" type="yes_no"
181 */
182 public Boolean getOrigProcessImmediate() {
183 return origProcessImmediate;
184 }
185
186 /**
187 * @return
188 * @hibernate.property column="PMT_CNCL_EXTRT_STAT_IND" type="yes_no"
189 */
190 public Boolean getPmtCancelExtractStat() {
191 return pmtCancelExtractStat;
192 }
193
194 /**
195 * @param string
196 */
197 public void setPaymentChange(PaymentChangeCode pc) {
198 paymentChange = pc;
199 }
200
201 /**
202 * @param string
203 */
204 public void setChangeNoteText(String string) {
205 changeNoteText = string;
206 }
207
208 /**
209 * @param timestamp
210 */
211 public void setChangeTime(Timestamp timestamp) {
212 changeTime = timestamp;
213 }
214
215 /**
216 * @param integer
217 */
218 public void setId(KualiInteger integer) {
219 id = integer;
220 }
221
222 /**
223 * @param integer
224 */
225 public void setOrigAchBankRouteNbr(String s) {
226 origAchBankRouteNbr = s;
227 }
228
229 /**
230 * @param string
231 */
232 public void setOrigAdviceEmail(String string) {
233 origAdviceEmail = string;
234 }
235
236 /**
237 * @param timestamp
238 */
239 public void setOrigDisburseDate(Timestamp timestamp) {
240 origDisburseDate = timestamp;
241 }
242
243 /**
244 * @param integer
245 */
246 public void setOrigDisburseNbr(KualiInteger integer) {
247 origDisburseNbr = integer;
248 }
249
250 /**
251 * @param timestamp
252 */
253 public void setOrigPaymentDate(Date timestamp) {
254 origPaymentDate = timestamp;
255 }
256
257 /**
258 * @param boolean1
259 */
260 public void setOrigPmtSpecHandling(Boolean boolean1) {
261 origPmtSpecHandling = boolean1;
262 }
263
264 /**
265 * @param string
266 */
267 public void setOrigPaymentStatus(PaymentStatus ps) {
268 origPaymentStatus = ps;
269 }
270
271 /**
272 * @param boolean1
273 */
274 public void setOrigProcessImmediate(Boolean boolean1) {
275 origProcessImmediate = boolean1;
276 }
277
278 /**
279 * @param timestamp
280 */
281 public void setPmtCancelExtractDate(Timestamp timestamp) {
282 pmtCancelExtractDate = timestamp;
283 }
284
285 /**
286 * @param boolean1
287 */
288 public void setPmtCancelExtractStat(Boolean boolean1) {
289 pmtCancelExtractStat = boolean1;
290 }
291
292 /**
293 * @param paymentGroupId The paymentGroupId to set.
294 */
295 public void setPaymentGroup(PaymentGroup pd) {
296 this.paymentGroup = pd;
297 }
298
299 /**
300 * @param DisbursementType
301 */
302 public void setDisbursementType(DisbursementType dt) {
303 disbursementType = dt;
304 }
305
306 /**
307 * @return
308 * @hibernate.many-to-one column="ORIG_DISB_TYP_CD" class="edu.iu.uis.pdp.bo.DisbursementType"
309 */
310 public DisbursementType getDisbursementType() {
311 return disbursementType;
312 }
313
314 /**
315 * @param Bank
316 */
317 public void setBank(Bank bank) {
318 this.bank = bank;
319 }
320
321 /**
322 * @return
323 * @hibernate.many-to-one column="ORIG_BNK_ID" class="edu.iu.uis.pdp.bo.Bank"
324 */
325 public Bank getBank() {
326 return bank;
327 }
328
329 /**
330 * Gets the bankCode attribute.
331 *
332 * @return Returns the bankCode.
333 */
334 public String getOrigBankCode() {
335 return origBankCode;
336 }
337
338 /**
339 * Sets the bankCode attribute value.
340 *
341 * @param bankCode The bankCode to set.
342 */
343 public void setOrigBankCode(String bankCode) {
344 this.origBankCode = bankCode;
345 }
346
347 /**
348 * @param PaymentProcess
349 */
350 public void setProcess(PaymentProcess ppl) {
351 paymentProcess = ppl;
352 }
353
354 /**
355 * @return
356 * @hibernate.many-to-one column="ORIG_PROC_ID" class="edu.iu.uis.pdp.bo.PaymentProcess"
357 */
358 public PaymentProcess getProcess() {
359 return paymentProcess;
360 }
361
362 /**
363 * @hibernate.property column="PMT_CHG_USR_ID" length="11" not-null="true"
364 * @return Returns the changeUserId.
365 */
366 public String getChangeUserId() {
367 return changeUserId;
368 }
369
370 /**
371 * This method gets the change user.
372 * @return the changeUser
373 */
374 public Person getChangeUser() {
375 changeUser = SpringContext.getBean(org.kuali.rice.kim.service.PersonService.class).updatePersonIfNecessary(changeUserId, changeUser);
376 return changeUser;
377 }
378
379 /**
380 * This method sets the changeUser.
381 * @param changeUser
382 */
383 public void setChangeUser(Person changeUser) {
384 if (changeUser != null) {
385 changeUserId = changeUser.getPrincipalId();
386 }
387 this.changeUser = changeUser;
388 }
389
390 /**
391 * @param changeUserId The changeUserId to set.
392 */
393 public void setChangeUserId(String changeUserId) {
394 this.changeUserId = changeUserId;
395 }
396
397 /**
398 * Gets the disbursementTypeCode attribute.
399 *
400 * @return Returns the disbursementTypeCode.
401 */
402 public String getDisbursementTypeCode() {
403 return disbursementTypeCode;
404 }
405
406 /**
407 * Sets the disbursementTypeCode attribute value.
408 *
409 * @param disbursementTypeCode The disbursementTypeCode to set.
410 */
411 public void setDisbursementTypeCode(String disbursementTypeCode) {
412 this.disbursementTypeCode = disbursementTypeCode;
413 }
414
415 /**
416 * Gets the paymentStatusCode attribute.
417 *
418 * @return Returns the paymentStatusCode.
419 */
420 public String getPaymentStatusCode() {
421 return paymentStatusCode;
422 }
423
424 /**
425 * Sets the paymentStatusCode attribute value.
426 *
427 * @param paymentStatusCode The paymentStatusCode to set.
428 */
429 public void setPaymentStatusCode(String paymentStatusCode) {
430 this.paymentStatusCode = paymentStatusCode;
431 }
432
433 /**
434 * Gets the paymentProcess attribute.
435 *
436 * @return Returns the paymentProcess.
437 */
438 public PaymentProcess getPaymentProcess() {
439 return paymentProcess;
440 }
441
442 /**
443 * Sets the paymentProcess attribute value.
444 *
445 * @param paymentProcess The paymentProcess to set.
446 */
447 public void setPaymentProcess(PaymentProcess paymentProcess) {
448 this.paymentProcess = paymentProcess;
449 }
450
451 /**
452 * Gets the paymentChangeCode attribute.
453 *
454 * @return Returns the paymentChangeCode.
455 */
456 public String getPaymentChangeCode() {
457 return paymentChangeCode;
458 }
459
460 /**
461 * Sets the paymentChangeCode attribute value.
462 *
463 * @param paymentChangeCode The paymentChangeCode to set.
464 */
465 public void setPaymentChangeCode(String paymentChangeCode) {
466 this.paymentChangeCode = paymentChangeCode;
467 }
468
469 /**
470 * Gets the paymentGroupId attribute.
471 *
472 * @return Returns the paymentGroupId.
473 */
474 public KualiInteger getPaymentGroupId() {
475 return paymentGroupId;
476 }
477
478 /**
479 * Sets the paymentGroupId attribute value.
480 *
481 * @param paymentGroupId The paymentGroupId to set.
482 */
483 public void setPaymentGroupId(KualiInteger paymentGroupId) {
484 this.paymentGroupId = paymentGroupId;
485 }
486
487 public void updateUser(org.kuali.rice.kim.service.PersonService userService) {
488 Person u = userService.getPerson(changeUserId);
489 setChangeUser(u);
490 }
491
492 public KualiInteger getProcessId() {
493 return processId;
494 }
495
496 public void setProcessId(KualiInteger processId) {
497 this.processId = processId;
498 }
499
500 /**
501 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
502 */
503 @Override
504 protected LinkedHashMap toStringMapper() {
505 LinkedHashMap m = new LinkedHashMap();
506
507 m.put(KFSPropertyConstants.ID, this.id);
508
509 return m;
510 }
511
512 }