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  package org.kuali.ole.pdp.businessobject;
17  
18  import java.sql.Date;
19  import java.sql.Timestamp;
20  import java.text.ParseException;
21  import java.util.ArrayList;
22  import java.util.Iterator;
23  import java.util.LinkedHashMap;
24  import java.util.List;
25  
26  import org.apache.commons.lang.StringUtils;
27  import org.kuali.ole.pdp.PdpConstants;
28  import org.kuali.ole.pdp.PdpKeyConstants;
29  import org.kuali.ole.pdp.PdpPropertyConstants;
30  import org.kuali.ole.sys.OLEConstants;
31  import org.kuali.ole.sys.OLEPropertyConstants;
32  import org.kuali.ole.sys.businessobject.Bank;
33  import org.kuali.ole.sys.businessobject.TimestampedBusinessObjectBase;
34  import org.kuali.ole.sys.context.SpringContext;
35  import org.kuali.rice.core.api.config.property.ConfigurationService;
36  import org.kuali.rice.core.api.datetime.DateTimeService;
37  import org.kuali.rice.core.api.util.type.KualiDecimal;
38  import org.kuali.rice.core.api.util.type.KualiInteger;
39  import org.kuali.rice.coreservice.framework.parameter.ParameterService;
40  import org.kuali.rice.krad.service.KeyValuesService;
41  
42  /**
43   * This class represents the PaymentGroup
44   */
45  public class PaymentGroup extends TimestampedBusinessObjectBase {
46      private static KualiDecimal zero = KualiDecimal.ZERO;
47  
48      private KualiInteger id; // PMT_GRP_ID
49      private String payeeName; // PMT_PAYEE_NM
50      private String payeeId; // PAYEE_ID
51      private String payeeIdTypeCd; // PAYEE_ID_TYP_CD
52      private String alternatePayeeId; // ALTRNT_PAYEE_ID
53      private String alternatePayeeIdTypeCd; // ALTRNT_PAYEE_ID_TYP_CD
54      private String payeeOwnerCd; // PAYEE_OWNR_CD
55      private String line1Address; // PMT_LN1_ADDR
56      private String line2Address; // PMT_LN2_ADDR
57      private String line3Address; // PMT_LN3_ADDR
58      private String line4Address; // PMT_LN4_ADDR
59      private String city; // PMT_CTY_NM
60      private String state; // PMT_ST_NM
61      private String country; // PMT_CNTRY_NM
62      private String zipCd; // PMT_ZIP_CD
63      private Boolean campusAddress; // CMP_ADDR_IND
64      private Date paymentDate; // PMT_DT DATE
65      private Boolean pymtAttachment; // PMT_ATTCHMNT_IND
66      private Boolean pymtSpecialHandling; // PMT_SPCL_HANDLG_IND
67      private Boolean taxablePayment; // PMT_TXBL_IND
68      private Boolean nraPayment; // NRA_PMT_IND
69      private Boolean processImmediate; // PROC_IMD_IND
70      private boolean combineGroups; // PMT_GRP_CMB_IND
71      private String achBankRoutingNbr; // ACH_BNK_RTNG_NBR
72      private String adviceEmailAddress; // ADV_EMAIL_ADDR
73      private Boolean employeeIndicator; // EMP_IND
74      private String creditMemoNbr; // PMT_CRDT_MEMO_NBR
75      private KualiDecimal creditMemoAmount; // PMT_CRDT_MEMO_AMT
76      private KualiInteger disbursementNbr; // DISB_NBR
77      private Date disbursementDate; // DISB_TS
78      private String physCampusProcessCd; // PHYS_CMP_PROC_CD
79      private String sortValue; // PMT_SORT_ORD_VAL
80      private String achAccountType; // CUST_ACCT_TYP_CD
81      private Timestamp epicPaymentCancelledExtractedDate; // PDP_EPIC_PMT_CNCL_EXTRT_TS
82      private Timestamp epicPaymentPaidExtractedDate; // PDP_EPIC_PMT_PD_EXTRT_TS
83      private Timestamp adviceEmailSentDate; // ADV_EMAIL_SNT_TS
84      private String vendorAliasName;
85  
86      private KualiInteger batchId;
87      private Batch batch; // PMT_BATCH_ID
88  
89      private KualiInteger processId;
90      private PaymentProcess process; // PROC_ID
91  
92      private String paymentStatusCode;
93      private PaymentStatus paymentStatus; // PMT_STAT_CD
94  
95      private String disbursementTypeCode;
96      private DisbursementType disbursementType; // DISB_TYP_CD
97  
98      private String bankCode;
99      private Bank bank; // BNK_ID
100 
101     private AchAccountNumber achAccountNumber;
102 
103     private List<PaymentGroupHistory> paymentGroupHistory = new ArrayList<PaymentGroupHistory>();
104     private List<PaymentDetail> paymentDetails = new ArrayList<PaymentDetail>();
105 
106     /**
107      * Constructs a PaymentGroup.java.
108      */
109     public PaymentGroup() {
110         super();
111     }
112 
113     /**
114      * This method gets the dailyReportSpecialHandling
115      * @return dailyReportSpecialHandling
116      */
117     public boolean isDailyReportSpecialHandling() {
118         return pymtSpecialHandling && !processImmediate;
119     }
120 
121     /**
122      * This method gets the dailyReportAttachment
123      * @return dailyReportAttachment
124      */
125     public boolean isDailyReportAttachment() {
126         return !pymtSpecialHandling && !processImmediate && pymtAttachment;
127     }
128 
129     /**
130      * This method gets the paymentStatusCode
131      * @return paymentStatusCode
132      */
133     public String getPaymentStatusCode() {
134         return paymentStatusCode;
135     }
136     
137     /**
138      * @return String containing the payment status code and indication or cancel/reissued payments or stale payments
139      */
140     public String getPaymentStatusCodeWithHistory() {
141         if (paymentStatus == null) {
142             this.refreshReferenceObject(PdpPropertyConstants.PAYMENT_STATUS);
143         }
144 
145         // check for canceled and reissued
146         String paymentStatusWithHistory = "";
147         if (paymentStatus != null) {
148             paymentStatusWithHistory += paymentStatus.getName();
149         }
150 
151         boolean isCanceledReissued = false;
152         for (PaymentGroupHistory paymentGroupHistory : getPaymentGroupHistory()) {
153             if (PdpConstants.PaymentChangeCodes.CANCEL_REISSUE_DISBURSEMENT.equals(paymentGroupHistory.getPaymentChangeCode())) {
154                 isCanceledReissued = true;
155             }
156             if (PdpConstants.PaymentChangeCodes.REISSUE_DISBURSEMENT.equals(paymentGroupHistory.getPaymentChangeCode())) {
157                 isCanceledReissued = true;
158             }
159 
160         }
161 
162         if (isCanceledReissued) {
163             paymentStatusWithHistory += " (Reissued)";
164         }
165         
166         // check for stale payments, if one payment detail is stale then they all are
167         PaymentDetail paymentDetail = getPaymentDetails().get(0);
168         if (!paymentDetail.isDisbursementActionAllowed()) {
169             paymentStatusWithHistory += " (Stale)";
170         }
171 
172         return paymentStatusWithHistory;
173     }
174 
175     /**
176      * WIDTH MUST BE LESS THAN THE # OF SPACES
177      * 
178      * @param width
179      * @param val
180      * @return
181      */
182     private String getWidthString(int width, String val) {
183         return (val + "                                        ").substring(0, width - 1);
184     }
185 
186     /**
187      * This method gets the boolean valuse of a Boolean object.
188      * @param b the boolean object
189      * @return the boolean value
190      */
191     private boolean booleanValue(Boolean b) {
192         boolean bv = false;
193         if (b != null) {
194             bv = b.booleanValue();
195         }
196         return bv;
197     }
198 
199     /**
200      * This method gets the notle lines
201      * @return the note lines
202      */
203     public int getNoteLines() {
204         int count = 0;
205         for (Iterator iter = this.getPaymentDetails().iterator(); iter.hasNext();) {
206             PaymentDetail element = (PaymentDetail) iter.next();
207             count++; // Add a line for the invoice #
208             count = count + element.getNotes().size();
209         }
210         return count;
211     }
212 
213     /**
214      * Get the total of all the detail items
215      * 
216      * @return
217      */
218     public KualiDecimal getNetPaymentAmount() {
219         KualiDecimal amt = KualiDecimal.ZERO;
220         for (Iterator iter = this.getPaymentDetails().iterator(); iter.hasNext();) {
221             PaymentDetail element = (PaymentDetail) iter.next();
222             amt = amt.add(element.getNetPaymentAmount());
223         }
224         return amt;
225     }
226 
227     /**
228      * @hibernate.set name="paymentDetail"
229      * @hibernate.collection-key column="pmt_grp_id"
230      * @hibernate.collection-one-to-many class="edu.iu.uis.pdp.bo.PaymentDetail"
231      */
232     public List<PaymentDetail> getPaymentDetails() {
233         return paymentDetails;
234     }
235 
236     /**
237      * This method sets the payment details list
238      * @param paymentDetail
239      */
240     public void setPaymentDetails(List<PaymentDetail> paymentDetail) {
241         this.paymentDetails = paymentDetail;
242     }
243 
244     /**
245      * This method adds a paymentDetail
246      * @param pgh the payments detail to be added
247      */
248     public void addPaymentDetails(PaymentDetail pgh) {
249         pgh.setPaymentGroup(this);
250         paymentDetails.add(pgh);
251     }
252 
253     public void deletePaymentDetails(PaymentDetail pgh) {
254         paymentDetails.remove(pgh);
255     }
256 
257     /**
258      * @hibernate.set name="paymentGroupHistory"
259      * @hibernate.collection-key column="pmt_grp_id"
260      * @hibernate.collection-one-to-many class="edu.iu.uis.pdp.bo.PaymentGroupHistory"
261      */
262     public List<PaymentGroupHistory> getPaymentGroupHistory() {
263         return paymentGroupHistory;
264     }
265 
266     /**
267      * This method sets the payment group history list
268      * @param paymentGroupHistory
269      */
270     public void setPaymentGroupHistory(List<PaymentGroupHistory> paymentGroupHistory) {
271         this.paymentGroupHistory = paymentGroupHistory;
272     }
273 
274     /**
275      * This method adds a paymentGroupHistory
276      * @param pd the paymentGroupHistory to be added
277      */
278     public void addPaymentGroupHistory(PaymentGroupHistory pd) {
279         pd.setPaymentGroup(this);
280         paymentGroupHistory.add(pd);
281     }
282 
283     /**
284      * This method deletes a paymentGroupHistory
285      * @param pd the paymentGroupHistory to be deleted
286      */
287     public void deletePaymentGroupHistory(PaymentGroupHistory pd) {
288         paymentGroupHistory.remove(pd);
289     }
290 
291     /**
292      * @hibernate.id column="PMT_GRP_ID" generator-class="sequence"
293      * @hibernate.generator-param name="sequence" value="PDP.PDP_PMT_GRP_ID_SEQ"
294      * @return
295      */
296     public KualiInteger getId() {
297         return id;
298     }
299 
300     /**
301      * @hibernate.one-to-one class="edu.iu.uis.pdp.bo.AchAccountNumber"
302      * @return
303      */
304     public AchAccountNumber getAchAccountNumber() {
305         return achAccountNumber;
306     }
307 
308     /**
309      * This method sets the achAccountNumber
310      * @param aan
311      */
312     public void setAchAccountNumber(AchAccountNumber aan) {
313         this.achAccountNumber = aan;
314     }
315 
316     /**
317      * This method gets the sortValue
318      * @return sortValue
319      */
320     public String getSortValue() {
321         return sortValue;
322     }
323 
324     /**
325      * This method sets the sort value
326      * @param sortGroupId
327      */
328     public void setSortValue(int sortGroupId) {
329         String defaultSortOrderParameterName = SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(PdpKeyConstants.DEFAULT_SORT_GROUP_ID_PARAMETER);
330         String defaultSortOrderParameterValue = SpringContext.getBean(ParameterService.class).getParameterValueAsString(PaymentGroup.class, defaultSortOrderParameterName);
331 
332         StringBuffer sb = new StringBuffer();
333 
334         sb.append(sortGroupId);
335 
336         CustomerProfile cp = this.getBatch().getCustomerProfile();
337         sb.append(cp.getChartCode());
338         sb.append(getWidthString(4, cp.getUnitCode()));
339         sb.append(getWidthString(4, cp.getSubUnitCode()));
340 
341         if (defaultSortOrderParameterValue.equals(String.valueOf(sortGroupId))) {
342             sb.append(this.getPayeeId());
343             sb.append(this.getPayeeIdTypeCd());
344         }
345         else {
346             sb.append(this.getPayeeName());
347         }
348         this.sortValue = sb.toString();
349     }
350 
351     /**
352      * @hibernate.property column="PMT_CTY_NM" length="30"
353      * @return Returns the city.
354      */
355     public String getCity() {
356         return city;
357     }
358 
359     /**
360      * @param city The city to set.
361      */
362     public void setCity(String city) {
363         this.city = city;
364     }
365 
366     public boolean getCombineGroups() {
367         return combineGroups;
368     }
369 
370     public void setCombineGroups(boolean combineGroups) {
371         this.combineGroups = combineGroups;
372     }
373 
374     /**
375      * @hibernate.property column="PMT_CNTRY_NM" length="30"
376      * @return Returns the country.
377      */
378     public String getCountry() {
379         return country;
380     }
381 
382     /**
383      * @param country The country to set.
384      */
385     public void setCountry(String country) {
386         this.country = country;
387     }
388 
389     /**
390      * @hibernate.property column="PMT_ST_NM" length="30"
391      * @return Returns the state.
392      */
393     public String getState() {
394         return state;
395     }
396 
397     /**
398      * @param state The state to set.
399      */
400     public void setState(String state) {
401         this.state = state;
402     }
403 
404     /**
405      * @return
406      * @hibernate.property column="ACH_BNK_RTNG_NBR" length="9"
407      */
408     public String getAchBankRoutingNbr() {
409         return achBankRoutingNbr;
410     }
411 
412     /**
413      * @return
414      * @hibernate.property column="ADV_EMAIL_ADDR" length="50"
415      */
416     public String getAdviceEmailAddress() {
417         return adviceEmailAddress;
418     }
419 
420     /**
421      * @return
422      * @hibernate.property column="ALTRNT_PAYEE_ID" length="25"
423      */
424     public String getAlternatePayeeId() {
425         return alternatePayeeId;
426     }
427 
428     /**
429      * @return
430      * @hibernate.property column="ALTRNT_PAYEE_ID_TYP_CD" length="2"
431      */
432     public String getAlternatePayeeIdTypeCd() {
433         return alternatePayeeIdTypeCd;
434     }
435 
436     /**
437      * @return
438      * @hibernate.many-to-one column="BNK_ID" class="edu.iu.uis.pdp.bo.Bank" not-null="false"
439      */
440     public Bank getBank() {
441         return bank;
442     }
443 
444     /**
445      * @return
446      * @hibernate.many-to-one column="PMT_BATCH_ID" class="edu.iu.uis.pdp.bo.Batch" not-null="true"
447      */
448     public Batch getBatch() {
449         return batch;
450     }
451 
452     /**
453      * Gets the bankCode attribute.
454      * 
455      * @return Returns the bankCode.
456      */
457     public String getBankCode() {
458         return bankCode;
459     }
460 
461     /**
462      * Sets the bankCode attribute value.
463      * 
464      * @param bankCode The bankCode to set.
465      */
466     public void setBankCode(String bankCode) {
467         this.bankCode = bankCode;
468     }
469 
470     /**
471      * @return
472      * @hibernate.property column="CMP_ADDR_IND" type="yes_no"
473      */
474     public Boolean getCampusAddress() {
475         return campusAddress;
476     }
477 
478     /**
479      * @return
480      * @hibernate.property column="PMT_CRDT_MEMO_AMT" length="14"
481      */
482     public KualiDecimal getCreditMemoAmount() {
483         return creditMemoAmount;
484     }
485 
486     /**
487      * @return
488      * @hibernate.property column="PMT_CRDT_MEMO_NBR" length="14"
489      */
490     public String getCreditMemoNbr() {
491         return creditMemoNbr;
492     }
493 
494     /**
495      * This method gets the disbursementDate.
496      * @return disbursementDate
497      */
498     public Date getDisbursementDate() {
499         return disbursementDate;
500     }
501 
502     /**
503      * @return
504      * @hibernate.property column="DISB_NBR" length="9"
505      */
506     public KualiInteger getDisbursementNbr() {
507         return disbursementNbr;
508     }
509 
510     /**
511      * @return
512      * @hibernate.many-to-one column="DISB_TYP_CD" class="edu.iu.uis.pdp.bo.DisbursementType" not-null="false"
513      */
514     public DisbursementType getDisbursementType() {
515         return disbursementType;
516     }
517 
518     public Boolean getEmployeeIndicator() {
519         return employeeIndicator;
520     }
521 
522     /**
523      * @return
524      * @hibernate.property column="PMT_LN1_ADDR" length="45"
525      */
526     public String getLine1Address() {
527         return line1Address;
528     }
529 
530     /**
531      * @return
532      * @hibernate.property column="PMT_LN2_ADDR" length="45"
533      */
534     public String getLine2Address() {
535         return line2Address;
536     }
537 
538     /**
539      * @return
540      * @hibernate.property column="PMT_LN3_ADDR" length="45"
541      */
542     public String getLine3Address() {
543         return line3Address;
544     }
545 
546     /**
547      * @return
548      * @hibernate.property column="PMT_LN4_ADDR" length="45"
549      */
550     public String getLine4Address() {
551         return line4Address;
552     }
553 
554     /**
555      * @return
556      * @hibernate.property column="NRA_PMT_IND" type="yes_no"
557      */
558     public Boolean getNraPayment() {
559         return nraPayment;
560     }
561 
562     /**
563      * @return
564      * @hibernate.property column="PAYEE_ID" length="25"
565      */
566     public String getPayeeId() {
567         return payeeId;
568     }
569 
570     /**
571      * @return
572      * @hibernate.property column="PAYEE_ID_TYP_CD" length="1"
573      */
574     public String getPayeeIdTypeCd() {
575         return payeeIdTypeCd;
576     }
577 
578     /**
579      * @return
580      * @hibernate.property column="PMT_PAYEE_NM" length="40"
581      */
582     public String getPayeeName() {
583         return payeeName;
584     }
585 
586     /**
587      * @return
588      * @hibernate.property column="PAYEE_OWNR_CD" length="2"
589      */
590     public String getPayeeOwnerCd() {
591         return payeeOwnerCd;
592     }
593 
594     /**
595      * @return
596      * @hibernate.property column="PMT_DT"
597      */
598     public Date getPaymentDate() {
599         return paymentDate;
600     }
601 
602     /**
603      * @return
604      * @hibernate.many-to-one column="PMT_STAT_CD" class="edu.iu.uis.pdp.bo.PaymentStatus" not-null="true"
605      */
606     public PaymentStatus getPaymentStatus() {
607         return paymentStatus;
608     }
609 
610     /**
611      * @return
612      * @hibernate.property column="PHYS_CMP_PROC_CD" length="2"
613      */
614     public String getPhysCampusProcessCd() {
615         return physCampusProcessCd;
616     }
617 
618     /**
619      * @return
620      * @hibernate.many-to-one column="PROC_ID" class="edu.iu.uis.pdp.bo.PaymentProcess" not-null="false"
621      */
622     public PaymentProcess getProcess() {
623         return process;
624     }
625 
626     /**
627      * @return
628      * @hibernate.property column="PROC_IMD_IND" type="yes_no" length="1"
629      */
630     public Boolean getProcessImmediate() {
631         return processImmediate;
632     }
633 
634     /**
635      * @return
636      * @hibernate.property column="PMT_ATTCHMNT_IND" type="yes_no" length="1"
637      */
638     public Boolean getPymtAttachment() {
639         return pymtAttachment;
640     }
641 
642     /**
643      * @return
644      * @hibernate.property column="PMT_SPCL_HANDLG_IND" type="yes_no" length="1"
645      */
646     public Boolean getPymtSpecialHandling() {
647         return pymtSpecialHandling;
648     }
649 
650     /**
651      * @return
652      * @hibernate.property column="PMT_TXBL_IND" type="yes_no" length="1"
653      */
654     public Boolean getTaxablePayment() {
655         return taxablePayment;
656     }
657 
658     /**
659      * @return
660      * @hibernate.property column="PMT_ZIP_CD" length="2"
661      */
662     public String getZipCd() {
663         return zipCd;
664     }
665 
666     /**
667      * @param integer
668      */
669     public void setAchBankRoutingNbr(String s) {
670         achBankRoutingNbr = s;
671     }
672 
673     /**
674      * @param string
675      */
676     public void setAdviceEmailAddress(String string) {
677         adviceEmailAddress = string;
678     }
679 
680     /**
681      * @param string
682      */
683     public void setAlternatePayeeId(String string) {
684         alternatePayeeId = string;
685     }
686 
687     /**
688      * @param string
689      */
690     public void setAlternatePayeeIdTypeCd(String string) {
691         alternatePayeeIdTypeCd = string;
692     }
693 
694     /**
695      * @param integer
696      */
697     public void setBank(Bank bank) {
698         this.bank = bank;
699     }
700 
701     /**
702      * @param integer
703      */
704     public void setBatch(Batch b) {
705         batch = b;
706     }
707 
708     /**
709      * @param boolean1
710      */
711     public void setCampusAddress(Boolean boolean1) {
712         campusAddress = boolean1;
713     }
714 
715     /**
716      * @param decimal
717      */
718     public void setCreditMemoAmount(KualiDecimal decimal) {
719         creditMemoAmount = decimal;
720     }
721 
722     public void setCreditMemoAmount(String decimal) {
723         creditMemoAmount = new KualiDecimal(decimal);
724     }
725 
726     /**
727      * @param string
728      */
729     public void setCreditMemoNbr(String string) {
730         creditMemoNbr = string;
731     }
732 
733     /**
734      * @param timestamp
735      */
736     public void setDisbursementDate(Date timestamp) {
737         disbursementDate = timestamp;
738     }
739 
740     /**
741      * This method sets disbursementDate.
742      * @param disbursementDate a string representing the disbursementDate
743      * @throws ParseException
744      */
745     public void setDisbursementDate(String disbursementDate) throws ParseException {
746         this.disbursementDate = SpringContext.getBean(DateTimeService.class).convertToSqlDate(disbursementDate);
747     }
748 
749     /**
750      * @param integer
751      */
752     public void setDisbursementNbr(KualiInteger integer) {
753         disbursementNbr = integer;
754     }
755 
756     public void setDisbursementNbr(String integer) {
757         disbursementNbr = new KualiInteger(integer);
758     }
759 
760     /**
761      * @param string
762      */
763     public void setDisbursementType(DisbursementType dt) {
764         disbursementType = dt;
765     }
766 
767     /**
768      * @param integer
769      */
770     public void setId(KualiInteger integer) {
771         id = integer;
772     }
773 
774     /**
775      * @param boolean1
776      */
777     public void setEmployeeIndicator(Boolean boolean1) {
778         employeeIndicator = boolean1;
779     }
780 
781     /**
782      * @param string
783      */
784     public void setLine1Address(String string) {
785         line1Address = string;
786     }
787 
788     /**
789      * @param string
790      */
791     public void setLine2Address(String string) {
792         line2Address = string;
793     }
794 
795     /**
796      * @param string
797      */
798     public void setLine3Address(String string) {
799         line3Address = string;
800     }
801 
802     /**
803      * @param string
804      */
805     public void setLine4Address(String string) {
806         line4Address = string;
807     }
808 
809     /**
810      * @param boolean1
811      */
812     public void setNraPayment(Boolean boolean1) {
813         nraPayment = boolean1;
814     }
815 
816     /**
817      * @param string
818      */
819     public void setPayeeId(String string) {
820         payeeId = string;
821     }
822 
823     /**
824      * @param string
825      */
826     public void setPayeeIdTypeCd(String string) {
827         payeeIdTypeCd = string;
828     }
829 
830     /**
831      * @param string
832      */
833     public void setPayeeName(String string) {
834         payeeName = string;
835     }
836 
837     /**
838      * @param string
839      */
840     public void setPayeeOwnerCd(String string) {
841         payeeOwnerCd = string;
842     }
843 
844     /**
845      * @param timestamp
846      */
847     public void setPaymentDate(Date timestamp) {
848         paymentDate = timestamp;
849     }
850 
851     /**
852      * Takes a <code>String</code> and attempt to format as <code>Timestamp</code for setting the
853      * paymentDate field
854      * 
855      * @param paymentDate Timestamp as string
856      */
857     public void setPaymentDate(String paymentDate) throws ParseException {
858         this.paymentDate = SpringContext.getBean(DateTimeService.class).convertToSqlDate(paymentDate);
859     }
860 
861     /**
862      * @param string
863      */
864     public void setPaymentStatus(PaymentStatus stat) {
865         paymentStatus = stat;
866     }
867 
868     /**
869      * @param string
870      */
871     public void setPhysCampusProcessCd(String string) {
872         physCampusProcessCd = string;
873     }
874 
875     /**
876      * @param integer
877      */
878     public void setProcess(PaymentProcess p) {
879         if (p != null) {
880             processId = p.getId();
881         }
882         else {
883             processId = null;
884         }
885         this.process = p;
886     }
887 
888     /**
889      * @param boolean1
890      */
891     public void setProcessImmediate(Boolean boolean1) {
892         processImmediate = boolean1;
893     }
894 
895     /**
896      * @param boolean1
897      */
898     public void setPymtAttachment(Boolean boolean1) {
899         pymtAttachment = boolean1;
900     }
901 
902     /**
903      * @param boolean1
904      */
905     public void setTaxablePayment(Boolean boolean1) {
906         taxablePayment = boolean1;
907     }
908 
909     /**
910      * @param string
911      */
912     public void setZipCd(String string) {
913         zipCd = string;
914     }
915 
916     /**
917      * @param string
918      */
919     public void setPymtSpecialHandling(Boolean pymtSpecialHandling) {
920         this.pymtSpecialHandling = pymtSpecialHandling;
921     }
922 
923     public String toStringKey() {
924         StringBuffer buffer = new StringBuffer();
925         CustomerProfile customerProfile = batch.getCustomerProfile();
926 
927         buffer.append(PdpPropertyConstants.CustomerProfile.CUSTOMER_PROFILE_CHART_CODE);
928         buffer.append("=");
929         buffer.append(customerProfile.getChartCode());
930         buffer.append(PdpPropertyConstants.CustomerProfile.CUSTOMER_PROFILE_UNIT_CODE);
931         buffer.append("=");
932         buffer.append(customerProfile.getUnitCode());
933         buffer.append(PdpPropertyConstants.CustomerProfile.CUSTOMER_PROFILE_SUB_UNIT_CODE);
934         buffer.append("=");
935         buffer.append(customerProfile.getSubUnitCode());
936         buffer.append(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_PAYEE_NAME);
937         buffer.append("=");
938         buffer.append(payeeName);
939         buffer.append(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_LINE1_ADDRESS);
940         buffer.append("=");
941         buffer.append(line1Address);
942         buffer.append(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_PAYEE_ID);
943         buffer.append("=");
944         buffer.append(payeeId);
945         buffer.append(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_PAYEE_ID_TYPE_CODE);
946         buffer.append("=");
947         buffer.append(payeeIdTypeCd);
948         buffer.append(PdpPropertyConstants.PaymentGroup.PAYMENT_GROUP_BANK_CODE);
949         buffer.append("=");
950         buffer.append(bankCode);
951 
952         return buffer.toString();
953     }
954 
955     /**
956      * @return Returns the achAccountType.
957      */
958     public String getAchAccountType() {
959         return achAccountType;
960     }
961 
962     /**
963      * @param achAccountType The achAccountType to set.
964      */
965     public void setAchAccountType(String achAccountType) {
966         this.achAccountType = achAccountType;
967     }
968 
969     public Timestamp getEpicPaymentCancelledExtractedDate() {
970         return epicPaymentCancelledExtractedDate;
971     }
972 
973     public void setEpicPaymentCancelledExtractedDate(Timestamp epicPaymentCancelledExtractedDate) {
974         this.epicPaymentCancelledExtractedDate = epicPaymentCancelledExtractedDate;
975     }
976 
977     public Timestamp getEpicPaymentPaidExtractedDate() {
978         return epicPaymentPaidExtractedDate;
979     }
980 
981     public void setEpicPaymentPaidExtractedDate(Timestamp epicPaymentPaidExtractedDate) {
982         this.epicPaymentPaidExtractedDate = epicPaymentPaidExtractedDate;
983     }
984 
985     /**
986      * Gets the batchId attribute.
987      * 
988      * @return Returns the batchId.
989      */
990     public KualiInteger getBatchId() {
991         return batchId;
992     }
993 
994     /**
995      * Sets the batchId attribute value.
996      * 
997      * @param batchId The batchId to set.
998      */
999     public void setBatchId(KualiInteger batchId) {
1000         this.batchId = batchId;
1001     }
1002 
1003     
1004     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
1005         LinkedHashMap m = new LinkedHashMap();
1006 
1007         m.put(OLEPropertyConstants.ID, this.id);
1008 
1009         return m;
1010     }
1011 
1012     public String getDisbursementTypeCode() {
1013         return disbursementTypeCode;
1014     }
1015 
1016     public void setDisbursementTypeCode(String disbursementTypeCode) {
1017         this.disbursementTypeCode = disbursementTypeCode;
1018     }
1019 
1020     public KualiInteger getProcessId() {
1021         return processId;
1022     }
1023 
1024     public void setProcessId(KualiInteger processId) {
1025         this.processId = processId;
1026     }
1027 
1028     public void setPaymentStatusCode(String paymentStatusCode) {
1029         this.paymentStatusCode = paymentStatusCode;
1030     }
1031 
1032     public void setId_type(String idType) {
1033         this.payeeIdTypeCd = idType;
1034     }
1035 
1036     /**
1037      * Gets the adviceEmailSentDate attribute.
1038      * 
1039      * @return Returns the adviceEmailSentDate.
1040      */
1041     public Timestamp getAdviceEmailSentDate() {
1042         return adviceEmailSentDate;
1043     }
1044 
1045     /**
1046      * Sets the adviceEmailSentDate attribute value.
1047      * 
1048      * @param adviceEmailSentDate The adviceEmailSentDate to set.
1049      */
1050     public void setAdviceEmailSentDate(Timestamp adviceEmailSentDate) {
1051         this.adviceEmailSentDate = adviceEmailSentDate;
1052     }
1053 
1054     public String getVendorAliasName() {
1055         return vendorAliasName;
1056     }
1057 
1058     public void setVendorAliasName(String vendorAliasName) {
1059         this.vendorAliasName = vendorAliasName;
1060     }
1061 
1062     /**
1063      * This method gets a string representation of the address lines
1064      * @return the street as a combined representation of the address lines
1065      */
1066     public String getStreet() {
1067         StringBuffer street = new StringBuffer();
1068 
1069         street.append(StringUtils.isNotBlank(line1Address) ? (line1Address + OLEConstants.NEWLINE) : OLEConstants.EMPTY_STRING);
1070         street.append(StringUtils.isNotBlank(line2Address) ? (line2Address + OLEConstants.NEWLINE) : OLEConstants.EMPTY_STRING);
1071         street.append(StringUtils.isNotBlank(line3Address) ? (line3Address + OLEConstants.NEWLINE) : OLEConstants.EMPTY_STRING);
1072         street.append(StringUtils.isNotBlank(line4Address) ? (line4Address + OLEConstants.NEWLINE) : OLEConstants.EMPTY_STRING);
1073 
1074         return street.toString();
1075     }
1076 
1077     /**
1078      * This method gets the payeeIdTypeDesc
1079      * @return the payeeIdTypeDesc
1080      */
1081     public String getPayeeIdTypeDesc() {
1082         String payeeIdTypeCd = getPayeeIdTypeCd();
1083         List<PayeeType> boList = (List) SpringContext.getBean(KeyValuesService.class).findAll(PayeeType.class);
1084         for (PayeeType payeeType : boList) {
1085             if (payeeType.getCode().equalsIgnoreCase(payeeIdTypeCd)) {
1086                 return payeeType.getName();
1087             }
1088         }
1089         return OLEConstants.EMPTY_STRING;
1090     }
1091 }