View Javadoc
1   /*
2    * Copyright 2007 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  /*
17   * Created on Jul 12, 2004
18   *
19   */
20  package org.kuali.ole.pdp.businessobject;
21  
22  import java.sql.Date;
23  import java.sql.Timestamp;
24  import java.util.LinkedHashMap;
25  
26  import org.kuali.ole.sys.OLEPropertyConstants;
27  import org.kuali.ole.sys.businessobject.Bank;
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.KualiInteger;
31  import org.kuali.rice.kim.api.identity.Person;
32  
33  public class PaymentGroupHistory extends TimestampedBusinessObjectBase {
34  
35      private KualiInteger id; // PMT_GRP_HIST_ID
36  
37      private String changeNoteText; // PMT_CHG_NTE_TXT VARCHAR2 250
38      private Person changeUser;
39      private String changeUserId; // PMT_CHG_USR_ID VARCHAR2 8
40      private Timestamp changeTime; // PMT_CHG_TS DATE 7
41      private Date origPaymentDate; // ORIG_PMT_DT DATE 7
42      private String origAchBankRouteNbr; // ORIG_ACH_BNK_RTNG_NBR VARCHAR2 17 0
43      private String origAdviceEmail; // ORIG_ADV_EMAIL_ADDR VARCHAR2 50
44      private KualiInteger origDisburseNbr; // ORIG_DISB_NBR NUMBER 9 0
45      private Timestamp origDisburseDate; // ORIG_DISB_TS DATE 7
46      private Boolean origProcessImmediate; // ORIG_PROC_IMD_IND VARCHAR2 1
47      private Boolean origPmtSpecHandling; // ORIG_PMT_SPCL_HANDLG_IND VARCHAR2 1
48      private Boolean pmtCancelExtractStat; // PMT_CNCL_EXTRT_STAT_IND VARCHAR2 1
49      private Timestamp pmtCancelExtractDate; // PMT_CNCL_EXTRT_TS
50  
51      private String disbursementTypeCode;
52      private DisbursementType disbursementType;
53  
54      private String origBankCode;
55      private Bank bank;
56  
57      private String paymentStatusCode;
58      private PaymentStatus origPaymentStatus; // ORIG_PMT_STAT_CD VARCHAR2 4
59  
60      private KualiInteger processId;
61      private PaymentProcess paymentProcess;
62  
63      private String paymentChangeCode;
64      private PaymentChangeCode paymentChange; // PMT_CHG_CD VARCHAR2 4
65  
66      private KualiInteger paymentGroupId;
67      private PaymentGroup paymentGroup; // PMT_GRP_ID
68  
69      public PaymentGroupHistory() {
70          super();
71      }
72  
73      /**
74       * @hibernate.id column="PMT_GRP_HIST_ID" generator-class="sequence"
75       * @hibernate.generator-param name="sequence" value="PDP.PDP_PMT_GRP_HIST_ID_SEQ"
76       * @return
77       */
78      public KualiInteger getId() {
79          return id;
80      }
81  
82      /**
83       * @hibernate.many-to-one column="PMT_GRP_ID" class="edu.iu.uis.pdp.bo.PaymentGroup"
84       * @return Returns the paymentGroup.
85       */
86      public PaymentGroup getPaymentGroup() {
87          return paymentGroup;
88      }
89  
90      /**
91       * @return
92       * @hibernate.property column="PMT_CNCL_EXTRT_TS"
93       */
94      public Timestamp getPmtCancelExtractDate() {
95          return pmtCancelExtractDate;
96      }
97  
98      /**
99       * @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.api.identity.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.api.identity.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.krad.bo.BusinessObjectBase#toStringMapper()
502      */
503     
504     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
505         LinkedHashMap m = new LinkedHashMap();
506 
507         m.put(OLEPropertyConstants.ID, this.id);
508 
509         return m;
510     }
511 
512 }