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    package org.kuali.kfs.module.endow.businessobject;
017    
018    import java.sql.Date;
019    import java.util.LinkedHashMap;
020    import java.util.List;
021    
022    import org.kuali.kfs.module.endow.EndowConstants;
023    import org.kuali.kfs.module.endow.EndowPropertyConstants;
024    import org.kuali.kfs.module.endow.document.service.KEMService;
025    import org.kuali.kfs.sys.KFSConstants;
026    import org.kuali.kfs.sys.context.SpringContext;
027    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
028    import org.kuali.rice.kns.service.DateTimeService;
029    import org.kuali.rice.kns.util.TypedArrayList;
030    
031    /**
032     * This KEMID class is an identifier for a specific set of Funds held by the institution as an endowment of funds functioning as an
033     * endowment. Associated with each KEMID are fields containing information that determine what sort of activity may take place for
034     * the KEMID and how and when automated activity is yo occur. In addition, fields will be used to define the KEMID that can be
035     * instrumental in the development of reports for the institution.
036     */
037    public class KEMID extends PersistableBusinessObjectBase {
038    
039        private String kemid;
040        private String shortTitle;
041        private String longTitle;
042        private Date dateOpened;
043        private Date dateEstablished;
044        private String typeCode;
045        private String incomeRestrictionCode;
046        private String principalRestrictionCode;
047        private String incomeCAECode;
048        private String principalCAECode;
049        private String responsibleAdminCode;
050        private String transactionRestrictionCode;
051        private Integer cashSweepModelId;
052        private Integer incomeACIModelId;
053        private Integer principalACIModelId;
054        private boolean dormantIndicator;
055        private String purposeCode;
056        private boolean close;
057    
058        private String closedToKEMID;
059        private String closeCode;
060        private String dispositionOfFunds;
061        private Date dateClosed;
062    
063        private PurposeCode purpose;
064        private CloseCode reasonClosed;
065        private TypeCode type;
066        private TypeRestrictionCode typeRestrictionCodeForIncomeRestrictionCode;
067        private TypeRestrictionCode typeRestrictionCodeForPrincipalRestrictionCode;
068        private CAECode incomeCAE;
069        private CAECode principalCAE;
070        private ResponsibleAdministrationCode responsibleAdministration;
071        private TransactionRestrictionCode transactionRestriction;
072        private CashSweepModel cashSweepModel;
073        private AutomatedCashInvestmentModel incomeACIModel;
074        private AutomatedCashInvestmentModel principalACIModel;
075    
076        private EndowmentCorpusValues endowmentCorpusValues;
077    
078        // collections
079        private List<KemidAgreement> kemidAgreements;
080        private List<KemidSourceOfFunds> kemidSourcesOfFunds;
081        private List<KemidBenefittingOrganization> kemidBenefittingOrganizations;
082        private List<KemidGeneralLedgerAccount> kemidGeneralLedgerAccounts;
083        private List<KemidPayoutInstruction> kemidPayoutInstructions;
084        private List<KemidUseCriteria> kemidUseCriteria;
085        private List<KemidSpecialInstruction> kemidSpecialInstructions;
086        private List<KemidFee> kemidFees;
087        private List<KemidReportGroup> kemidReportGroups;
088        private List<KemidDonorStatement> kemidDonorStatements;
089        private List<KemidCombineDonorStatement> kemidCombineDonorStatements;
090        private List<KemidAuthorizations> kemidAuthorizations;
091    
092        /**
093         * Constructs a KEMID.java.
094         */
095        public KEMID() {
096            super();
097            kemidAgreements = new TypedArrayList(KemidAgreement.class);
098            kemidSourcesOfFunds = new TypedArrayList(KemidSourceOfFunds.class);
099            kemidBenefittingOrganizations = new TypedArrayList(KemidBenefittingOrganization.class);
100            kemidGeneralLedgerAccounts = new TypedArrayList(KemidGeneralLedgerAccount.class);
101            kemidPayoutInstructions = new TypedArrayList(KemidPayoutInstruction.class);
102            kemidUseCriteria = new TypedArrayList(KemidUseCriteria.class);
103            kemidSpecialInstructions = new TypedArrayList(KemidSpecialInstruction.class);
104            kemidFees = new TypedArrayList(KemidFee.class);
105            kemidReportGroups = new TypedArrayList(KemidReportGroup.class);
106            kemidDonorStatements = new TypedArrayList(KemidDonorStatement.class);
107            kemidCombineDonorStatements = new TypedArrayList(KemidCombineDonorStatement.class);
108            kemidAuthorizations = new TypedArrayList(KemidAuthorizations.class);
109        }
110    
111        /**
112         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
113         */
114        @Override
115        protected LinkedHashMap<String, String> toStringMapper() {
116            LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
117            m.put(EndowPropertyConstants.KEMID, this.kemid);
118            return m;
119        }
120    
121        /**
122         * Gets the longTitle.
123         * 
124         * @return longTitle
125         */
126        public String getLongTitle() {
127            return longTitle;
128        }
129    
130        /**
131         * Sets the longTitle.
132         * 
133         * @param longTitle
134         */
135        public void setLongTitle(String longTitle) {
136            this.longTitle = longTitle;
137        }
138    
139        /**
140         * Gets the dateOpened.
141         * 
142         * @return dateOpened
143         */
144        public Date getDateOpened() {
145            return dateOpened;
146        }
147    
148        /**
149         * Sets the dateOpened.
150         * 
151         * @param dateOpened
152         */
153        public void setDateOpened(Date dateOpened) {
154            this.dateOpened = dateOpened;
155        }
156    
157        /**
158         * Gets the dateEstablished.
159         * 
160         * @return dateEstablished
161         */
162        public Date getDateEstablished() {
163            return dateEstablished;
164        }
165    
166        /**
167         * Sets the dateEstablished.
168         * 
169         * @param dateEstablished
170         */
171        public void setDateEstablished(Date dateEstablished) {
172            this.dateEstablished = dateEstablished;
173        }
174    
175        /**
176         * Gets the typeCode.
177         * 
178         * @return typeCode
179         */
180        public String getTypeCode() {
181            return typeCode;
182        }
183    
184        /**
185         * Sets the typeCode.
186         * 
187         * @param typeCode
188         */
189        public void setTypeCode(String typeCode) {
190            this.typeCode = typeCode;
191        }
192    
193        /**
194         * This method gets incomeRestrictionCode
195         * 
196         * @return incomeRestrictionCode
197         */
198        public String getIncomeRestrictionCode() {
199            return incomeRestrictionCode;
200        }
201    
202        /**
203         * This method sets incomeRestrictionCode.
204         * 
205         * @param incomeRestrictionCode
206         */
207        public void setIncomeRestrictionCode(String incomeRestrictionCode) {
208            this.incomeRestrictionCode = incomeRestrictionCode;
209        }
210    
211        /**
212         * This method gets the principalRestrictionCode.
213         * 
214         * @return principalRestrictionCode
215         */
216        public String getPrincipalRestrictionCode() {
217            return principalRestrictionCode;
218        }
219    
220        /**
221         * This method sets the principalRestrictionCode.
222         * 
223         * @param principalRestrictionCode
224         */
225        public void setPrincipalRestrictionCode(String principalRestrictionCode) {
226            this.principalRestrictionCode = principalRestrictionCode;
227        }
228    
229        /**
230         * Gets the incomeCAECode.
231         * 
232         * @return incomeCAECode
233         */
234        public String getIncomeCAECode() {
235            return incomeCAECode;
236        }
237    
238        /**
239         * Sets the incomeCAECode.
240         * 
241         * @param incomeCAECode
242         */
243        public void setIncomeCAECode(String incomeCAECode) {
244            this.incomeCAECode = incomeCAECode;
245        }
246    
247        /**
248         * Gets the incomeCAECode.
249         * 
250         * @return incomeCAECode
251         */
252        public String getPrincipalCAECode() {
253            return principalCAECode;
254        }
255    
256        /**
257         * Sets the incomeCAECode.
258         * 
259         * @param principalCAECode
260         */
261        public void setPrincipalCAECode(String principalCAECode) {
262            this.principalCAECode = principalCAECode;
263        }
264    
265        /**
266         * Gets the responsibleAdminCode.
267         * 
268         * @return responsibleAdminCode
269         */
270        public String getResponsibleAdminCode() {
271            return responsibleAdminCode;
272        }
273    
274        /**
275         * Sets the responsibleAdminCode.
276         * 
277         * @param responsibleAdminCode
278         */
279        public void setResponsibleAdminCode(String responsibleAdminCode) {
280            this.responsibleAdminCode = responsibleAdminCode;
281        }
282    
283        /**
284         * Gets the transactionRestrictionCode.
285         * 
286         * @return transactionRestrictionCode
287         */
288        public String getTransactionRestrictionCode() {
289            return transactionRestrictionCode;
290        }
291    
292        /**
293         * Sets the transactionRestrictionCode.
294         * 
295         * @param transactionRestrictionCode
296         */
297        public void setTransactionRestrictionCode(String transactionRestrictionCode) {
298            this.transactionRestrictionCode = transactionRestrictionCode;
299        }
300    
301        /**
302         * Gets the cashSweepModelId;
303         * 
304         * @return cashSweepModelId
305         */
306        public Integer getCashSweepModelId() {
307            return cashSweepModelId;
308        }
309    
310        /**
311         * Sets the cashSweepModelId.
312         * 
313         * @param cashSweepModelId
314         */
315        public void setCashSweepModelId(Integer cashSweepModelId) {
316            this.cashSweepModelId = cashSweepModelId;
317        }
318    
319        /**
320         * Gets the incomeACIModelId.
321         * 
322         * @return incomeACIModelId
323         */
324        public Integer getIncomeACIModelId() {
325            return incomeACIModelId;
326        }
327    
328        /**
329         * Sets the incomeACIModelId.
330         * 
331         * @param incomeACIModelId
332         */
333        public void setIncomeACIModelId(Integer incomeACIModelId) {
334            this.incomeACIModelId = incomeACIModelId;
335        }
336    
337        /**
338         * Gets the principalACIModelId.
339         * 
340         * @return principalACIModelId
341         */
342        public Integer getPrincipalACIModelId() {
343            return principalACIModelId;
344        }
345    
346        /**
347         * Sets the principalACIModelId.
348         * 
349         * @param principalACIModelId
350         */
351        public void setPrincipalACIModelId(Integer principalACIModelId) {
352            this.principalACIModelId = principalACIModelId;
353        }
354    
355        /**
356         * Gets the dormantIndicator.
357         * 
358         * @return dormantIndicator
359         */
360        public boolean isDormantIndicator() {
361            return dormantIndicator;
362        }
363    
364        /**
365         * Sets the dormantIndicator.
366         * 
367         * @param dormantIndicator
368         */
369        public void setDormantIndicator(boolean dormantIndicator) {
370            this.dormantIndicator = dormantIndicator;
371        }
372    
373        /**
374         * Gets the closedToKEMID.
375         * 
376         * @return closedToKEMID
377         */
378        public String getClosedToKEMID() {
379            return closedToKEMID;
380        }
381    
382        /**
383         * Sets the closedToKEMID.
384         * 
385         * @param closedToKEMID
386         */
387        public void setClosedToKEMID(String closedToKEMID) {
388            this.closedToKEMID = closedToKEMID;
389        }
390    
391        /**
392         * Gets the closeCode.
393         * 
394         * @return closeCode
395         */
396        public String getCloseCode() {
397            return closeCode;
398        }
399    
400        /**
401         * Sets the closeCode.
402         * 
403         * @param closeCode
404         */
405        public void setCloseCode(String closeCode) {
406            this.closeCode = closeCode;
407        }
408    
409        /**
410         * Gets the dispositionOfFunds.
411         * 
412         * @return dispositionOfFunds
413         */
414        public String getDispositionOfFunds() {
415            return dispositionOfFunds;
416        }
417    
418        /**
419         * Sets the dispositionOfFunds.
420         * 
421         * @param dispositionOfFunds
422         */
423        public void setDispositionOfFunds(String dispositionOfFunds) {
424            this.dispositionOfFunds = dispositionOfFunds;
425        }
426    
427        /**
428         * Gets the dateClosed.
429         * 
430         * @return dateClosed
431         */
432        public Date getDateClosed() {
433            return dateClosed;
434        }
435    
436        /**
437         * Sets the dateClosed.
438         * 
439         * @param dateClosed
440         */
441        public void setDateClosed(Date dateClosed) {
442            this.dateClosed = dateClosed;
443        }
444    
445    
446        /**
447         * Gets the kemid.
448         * 
449         * @return
450         */
451        public String getKemid() {
452            return kemid;
453        }
454    
455        /**
456         * Sets the kemid.
457         * 
458         * @param kemid
459         */
460        public void setKemid(String kemid) {
461            this.kemid = kemid;
462        }
463    
464        /**
465         * Gets the shortTitle.
466         * 
467         * @return shortTitle
468         */
469        public String getShortTitle() {
470            return shortTitle;
471        }
472    
473        /**
474         * Sets the shortTitle.
475         * 
476         * @param shortTitle
477         */
478        public void setShortTitle(String shortTitle) {
479            this.shortTitle = shortTitle;
480        }
481    
482        /**
483         * Gets kemid-shortTitle.
484         * 
485         * @return kemid-shortTitle
486         */
487        public String getKemidAndShortTitle() {
488            return getKemid() + " - " + getShortTitle();
489        }
490    
491        /**
492         * Setter for kemidAndShortTitle. Does nothing.
493         * 
494         * @param kemidAndShortTitle
495         */
496        public void setKemidAndShortTitle(String kemidAndShortTitle) {
497    
498        }
499    
500    
501        /**
502         * Get the close indicator.
503         * 
504         * @return close
505         */
506        public boolean isClose() {
507            return close;
508        }
509    
510        /**
511         * Sets the close indicator.
512         * 
513         * @param close
514         */
515        public void setClose(boolean close) {
516            this.close = close;
517        }
518    
519        /**
520         * Gets the purpose.
521         * 
522         * @return purpose
523         */
524        public PurposeCode getPurpose() {
525            return purpose;
526        }
527    
528        /**
529         * Sets the purpose.
530         * 
531         * @param purpose
532         */
533        public void setPurpose(PurposeCode purpose) {
534            this.purpose = purpose;
535        }
536    
537        /**
538         * Gets the purposeCode.
539         * 
540         * @return purposeCode
541         */
542        public String getPurposeCode() {
543            return purposeCode;
544        }
545    
546        /**
547         * Sets the purposeCode.
548         * 
549         * @param purposeCode
550         */
551        public void setPurposeCode(String purposeCode) {
552            this.purposeCode = purposeCode;
553        }
554    
555        /**
556         * Gets the reasonClosed.
557         * 
558         * @return reasonClosed
559         */
560        public CloseCode getReasonClosed() {
561            return reasonClosed;
562        }
563    
564        /**
565         * Sets the reasonClosed.
566         * 
567         * @param reasonClosed
568         */
569        public void setReasonClosed(CloseCode reasonClosed) {
570            this.reasonClosed = reasonClosed;
571        }
572    
573        /**
574         * Gets the type.
575         * 
576         * @return type
577         */
578        public TypeCode getType() {
579            return type;
580        }
581    
582        /**
583         * Sets the type.
584         * 
585         * @param type
586         */
587        public void setType(TypeCode type) {
588            this.type = type;
589        }
590    
591        /**
592         * This method gets the typeRestrictionCodeForIncomeRestrictionCode.
593         * 
594         * @return typeRestrictionCodeForIncomeRestrictionCode
595         */
596        public TypeRestrictionCode getTypeRestrictionCodeForPrincipalRestrictionCode() {
597            return typeRestrictionCodeForPrincipalRestrictionCode;
598        }
599    
600        /**
601         * This method sets the typeRestrictionCodeForPrincipalRestrictionCode.
602         * 
603         * @param typeRestrictionCodeForPrincipalRestrictionCode
604         */
605        public void setTypeRestrictionCodeForPrincipalRestrictionCode(TypeRestrictionCode typeRestrictionCodeForPrincipalRestrictionCode) {
606            this.typeRestrictionCodeForPrincipalRestrictionCode = typeRestrictionCodeForPrincipalRestrictionCode;
607        }
608    
609        /**
610         * This method gets the typeRestrictionCodeForIncomeRestrictionCode.
611         * 
612         * @return typeRestrictionCodeForIncomeRestrictionCode
613         */
614        public TypeRestrictionCode getTypeRestrictionCodeForIncomeRestrictionCode() {
615            return typeRestrictionCodeForIncomeRestrictionCode;
616        }
617    
618        /**
619         * This method sets the typeRestrictionCodeForIncomeRestrictionCode.
620         * 
621         * @param typeRestrictionCodeForIncomeRestrictionCode
622         */
623        public void setTypeRestrictionCodeForIncomeRestrictionCode(TypeRestrictionCode typeRestrictionCodeForIncomeRestrictionCode) {
624            this.typeRestrictionCodeForIncomeRestrictionCode = typeRestrictionCodeForIncomeRestrictionCode;
625        }
626    
627        /**
628         * Gets the transactionRestriction.
629         * 
630         * @return transactionRestriction
631         */
632        public TransactionRestrictionCode getTransactionRestriction() {
633            return transactionRestriction;
634        }
635    
636        /**
637         * Sets the transactionRestriction.
638         * 
639         * @param transactionRestriction
640         */
641        public void setTransactionRestriction(TransactionRestrictionCode transactionRestriction) {
642            this.transactionRestriction = transactionRestriction;
643        }
644    
645        /**
646         * Gets the cashSweepModel.
647         * 
648         * @return cashSweepModel
649         */
650        public CashSweepModel getCashSweepModel() {
651            return cashSweepModel;
652        }
653    
654        /**
655         * Sets the cashSweepModel.
656         * 
657         * @param cashSweepModel
658         */
659        public void setCashSweepModel(CashSweepModel cashSweepModel) {
660            this.cashSweepModel = cashSweepModel;
661        }
662    
663        /**
664         * Gets the incomeACIModel.
665         * 
666         * @return incomeACIModel
667         */
668        public AutomatedCashInvestmentModel getIncomeACIModel() {
669            return incomeACIModel;
670        }
671    
672        /**
673         * Sets the incomeACIModel.
674         * 
675         * @param incomeACIModel
676         */
677        public void setIncomeACIModel(AutomatedCashInvestmentModel incomeACIModel) {
678            this.incomeACIModel = incomeACIModel;
679        }
680    
681        /**
682         * Gets the principalACIModel.
683         * 
684         * @return principalACIModel
685         */
686        public AutomatedCashInvestmentModel getPrincipalACIModel() {
687            return principalACIModel;
688        }
689    
690        /**
691         * Sets the principalACIModel.
692         * 
693         * @param principalACIModel
694         */
695        public void setPrincipalACIModel(AutomatedCashInvestmentModel principalACIModel) {
696            this.principalACIModel = principalACIModel;
697        }
698    
699        /**
700         * Gets the kemidAgreements.
701         * 
702         * @return kemidAgreements
703         */
704        public List<KemidAgreement> getKemidAgreements() {
705            return kemidAgreements;
706        }
707    
708        /**
709         * Sets the kemidAgreements.
710         * 
711         * @param kemidAgreements
712         */
713        public void setKemidAgreements(List<KemidAgreement> kemidAgreements) {
714            this.kemidAgreements = kemidAgreements;
715        }
716    
717        /**
718         * Gets the kemidSourcesOfFunds.
719         * 
720         * @return kemidSourcesOfFunds
721         */
722        public List<KemidSourceOfFunds> getKemidSourcesOfFunds() {
723            return kemidSourcesOfFunds;
724        }
725    
726        /**
727         * Sets the kemidSourcesOfFunds.
728         * 
729         * @param kemidSourcesOfFunds
730         */
731        public void setKemidSourcesOfFunds(List<KemidSourceOfFunds> kemidSourcesOfFunds) {
732            this.kemidSourcesOfFunds = kemidSourcesOfFunds;
733        }
734    
735        /**
736         * Gets the kemidBenefittingOrganizations.
737         * 
738         * @return kemidBenefittingOrganizations
739         */
740        public List<KemidBenefittingOrganization> getKemidBenefittingOrganizations() {
741            return kemidBenefittingOrganizations;
742        }
743    
744        /**
745         * Sets the kemidBenefittingOrganizations.
746         * 
747         * @param kemidBenefittingOrganizations
748         */
749        public void setKemidBenefittingOrganizations(List<KemidBenefittingOrganization> kemidBenefittingOrganizations) {
750            this.kemidBenefittingOrganizations = kemidBenefittingOrganizations;
751        }
752    
753        /**
754         * Gets the kemidGeneralLedgerAccounts.
755         * 
756         * @return kemidGeneralLedgerAccounts
757         */
758        public List<KemidGeneralLedgerAccount> getKemidGeneralLedgerAccounts() {
759            return kemidGeneralLedgerAccounts;
760        }
761    
762        /**
763         * Sets the kemidGeneralLedgerAccounts.
764         * 
765         * @param kemidGeneralLedgerAccounts
766         */
767        public void setKemidGeneralLedgerAccounts(List<KemidGeneralLedgerAccount> kemidGeneralLedgerAccounts) {
768            this.kemidGeneralLedgerAccounts = kemidGeneralLedgerAccounts;
769        }
770    
771        /**
772         * Gets the kemidPayoutInstructions.
773         * 
774         * @return kemidPayoutInstructions
775         */
776        public List<KemidPayoutInstruction> getKemidPayoutInstructions() {
777            return kemidPayoutInstructions;
778        }
779    
780        /**
781         * Sets the kemidPayoutInstructions.
782         * 
783         * @param kemidPayoutInstructions
784         */
785        public void setKemidPayoutInstructions(List<KemidPayoutInstruction> kemidPayoutInstructions) {
786            this.kemidPayoutInstructions = kemidPayoutInstructions;
787        }
788    
789        /**
790         * Gets the kemidUseCriteria.
791         * 
792         * @return kemidUseCriteria
793         */
794        public List<KemidUseCriteria> getKemidUseCriteria() {
795            return kemidUseCriteria;
796        }
797    
798        /**
799         * Sets the kemidUseCriteria.
800         * 
801         * @param kemidUseCriteria
802         */
803        public void setKemidUseCriteria(List<KemidUseCriteria> kemidUseCriteria) {
804            this.kemidUseCriteria = kemidUseCriteria;
805        }
806    
807        /**
808         * Gets the kemidSpecialInstructions.
809         * 
810         * @return kemidSpecialInstructions
811         */
812        public List<KemidSpecialInstruction> getKemidSpecialInstructions() {
813            return kemidSpecialInstructions;
814        }
815    
816        /**
817         * Sets the kemidSpecialInstructions.
818         * 
819         * @param kemidSpecialInstructions
820         */
821        public void setKemidSpecialInstructions(List<KemidSpecialInstruction> kemidSpecialInstructions) {
822            this.kemidSpecialInstructions = kemidSpecialInstructions;
823        }
824    
825        /**
826         * Gets the kemidFees.
827         * 
828         * @return kemidFees
829         */
830        public List<KemidFee> getKemidFees() {
831            return kemidFees;
832        }
833    
834        /**
835         * Sets the kemidFees.
836         * 
837         * @param kemidFees
838         */
839        public void setKemidFees(List<KemidFee> kemidFees) {
840            this.kemidFees = kemidFees;
841        }
842    
843        /**
844         * Gets the kemidReportGroups.
845         * 
846         * @return kemidReportGroups
847         */
848        public List<KemidReportGroup> getKemidReportGroups() {
849            return kemidReportGroups;
850        }
851    
852        /**
853         * Sets the kemidReportGroups.
854         * 
855         * @param kemidReportGroups
856         */
857        public void setKemidReportGroups(List<KemidReportGroup> kemidReportGroups) {
858            this.kemidReportGroups = kemidReportGroups;
859        }
860    
861        /**
862         * Gets the kemidDonorStatements.
863         * 
864         * @return kemidDonorStatements
865         */
866        public List<KemidDonorStatement> getKemidDonorStatements() {
867            return kemidDonorStatements;
868        }
869    
870        /**
871         * Sets the kemidDonorStatements.
872         * 
873         * @param kemidDonorStatements
874         */
875        public void setKemidDonorStatements(List<KemidDonorStatement> kemidDonorStatements) {
876            this.kemidDonorStatements = kemidDonorStatements;
877        }
878    
879        /**
880         * Gets the kemidCombineDonorStatements.
881         * 
882         * @return kemidCombineDonorStatements
883         */
884        public List<KemidCombineDonorStatement> getKemidCombineDonorStatements() {
885            return kemidCombineDonorStatements;
886        }
887    
888        /**
889         * Sets the kemidCombineDonorStatements.
890         * 
891         * @param kemidCombineDonorStatements
892         */
893        public void setKemidCombineDonorStatements(List<KemidCombineDonorStatement> kemidCombineDonorStatements) {
894            this.kemidCombineDonorStatements = kemidCombineDonorStatements;
895        }
896    
897        /**
898         * Gets the endowmentCorpusValues.
899         * 
900         * @return endowmentCorpusValues
901         */
902        public EndowmentCorpusValues getEndowmentCorpusValues() {
903            return endowmentCorpusValues;
904        }
905    
906        /**
907         * Sets the endowmentCorpusValues.
908         * 
909         * @param endowmentCorpusValues
910         */
911        public void setEndowmentCorpusValues(EndowmentCorpusValues endowmentCorpusValues) {
912            this.endowmentCorpusValues = endowmentCorpusValues;
913        }
914    
915        /**
916         * Gets the incomeCAE.
917         * 
918         * @return incomeCAE
919         */
920        public CAECode getIncomeCAE() {
921            return incomeCAE;
922        }
923    
924        /**
925         * Sets the incomeCAE.
926         * 
927         * @param incomeCAE
928         */
929        public void setIncomeCAE(CAECode incomeCAE) {
930            this.incomeCAE = incomeCAE;
931        }
932    
933        /**
934         * Gets the principalCAE.
935         * 
936         * @return principalCAE
937         */
938        public CAECode getPrincipalCAE() {
939            return principalCAE;
940        }
941    
942        /**
943         * Sets the principalCAE.
944         * 
945         * @param principalCAE
946         */
947        public void setPrincipalCAE(CAECode principalCAE) {
948            this.principalCAE = principalCAE;
949        }
950    
951        /**
952         * Gets the responsibleAdministration.
953         * 
954         * @return responsibleAdministration
955         */
956        public ResponsibleAdministrationCode getResponsibleAdministration() {
957            return responsibleAdministration;
958        }
959    
960        /**
961         * Sets the responsibleAdministration.
962         * 
963         * @param responsibleAdministration
964         */
965        public void setResponsibleAdministration(ResponsibleAdministrationCode responsibleAdministration) {
966            this.responsibleAdministration = responsibleAdministration;
967        }
968    
969        /**
970         * Returns KEMID concatenated with Short Label
971         * 
972         * @return
973         */
974        public String getKemIdLabel() {
975            String kemID = getKemid() != null ? getKemid() : "";
976            String shortTitle = getShortTitle() != null ? getShortTitle() : "";
977            String kemIdLabel = kemID + " - " + shortTitle;
978            return kemIdLabel;
979        }
980    
981        /**
982         * Gets the typeRestrictionCodeForIncomeRestrictionCode description.
983         * 
984         * @return typeRestrictionCodeForIncomeRestrictionCode description
985         */
986        public String getTypeRestrictionCodeForIncomeRestrictionCodeDesc() {
987    
988            if (typeRestrictionCodeForIncomeRestrictionCode != null) {
989                return typeRestrictionCodeForIncomeRestrictionCode.getCodeAndDescription();
990            }
991            else
992                return KFSConstants.EMPTY_STRING;
993        }
994    
995        /**
996         * Gets the typeRestrictionCodeForPrincipalRestrictionCode description.
997         * 
998         * @return typeRestrictionCodeForPrincipalRestrictionCode description
999         */
1000        public String getTypeRestrictionCodeForPrincipalRestrictionCodeDesc() {
1001    
1002            if (typeRestrictionCodeForPrincipalRestrictionCode != null) {
1003                return typeRestrictionCodeForPrincipalRestrictionCode.getCodeAndDescription();
1004            }
1005            else
1006                return KFSConstants.EMPTY_STRING;
1007        }
1008    
1009        /**
1010         * Gets the Current Available Funds link text.
1011         * 
1012         * @return the text to be displayed for the current Available Funds link
1013         */
1014        public String getCurrentAvailableFunds() {
1015            return EndowConstants.LOOKUP_LINK;
1016        }
1017    
1018        /**
1019         * Gets the Current Balances link text.
1020         * 
1021         * @return the text to be displayed for the current balances link
1022         */
1023        public String getCurrentBalances() {
1024            return EndowConstants.LOOKUP_LINK;
1025        }
1026    
1027        /**
1028         * Gets the Historical Balances link text.
1029         * 
1030         * @return the text to be displayed for the historical balances link
1031         */
1032        public String getHistoricalBalances() {
1033            return EndowConstants.LOOKUP_LINK;
1034        }
1035    
1036        /**
1037         * Gets the Ticklers link text.
1038         * 
1039         * @return the text to be displayed for the ticklers link
1040         */
1041        public String getTicklers() {
1042            return EndowConstants.LOOKUP_LINK;
1043        }
1044    
1045        /**
1046         * Gets the Recurring Transfers link text.
1047         * 
1048         * @return the text to be displayed for the recurring transfers link
1049         */
1050        public String getRecurringTransfers() {
1051            return EndowConstants.LOOKUP_LINK;
1052        }
1053    
1054        /**
1055         * Gets the kemidAuthorizations.
1056         * 
1057         * @return kemidAuthorizations
1058         */
1059        public List<KemidAuthorizations> getKemidAuthorizations() {
1060            return kemidAuthorizations;
1061        }
1062    
1063        /**
1064         * Sets the kemidAuthorizations.
1065         * 
1066         * @param kemidAuthorizations
1067         */
1068        public void setKemidAuthorizations(List<KemidAuthorizations> kemidAuthorizations) {
1069            this.kemidAuthorizations = kemidAuthorizations;
1070        }
1071        
1072        /**
1073         * Gets kemid for report
1074         * 
1075         * @return kemid
1076         */
1077        public String getKemidForReport() {
1078            return this.kemid;
1079        }
1080        
1081        /**
1082         * Gets the current date for report
1083         * 
1084         * @return
1085         */
1086        public String getReportDate() {
1087            KEMService kemService = SpringContext.getBean(KEMService.class);
1088            DateTimeService dateTimeService = SpringContext.getBean(DateTimeService.class);
1089            Date currentDate = kemService.getCurrentDate();
1090            return dateTimeService.toDateString(currentDate);
1091        }
1092    }