View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.kfs.gl.businessobject;
20  
21  import java.sql.Date;
22  import java.util.LinkedHashMap;
23  
24  import org.kuali.kfs.coa.businessobject.Account;
25  import org.kuali.kfs.coa.businessobject.BalanceType;
26  import org.kuali.kfs.coa.businessobject.Chart;
27  import org.kuali.kfs.coa.businessobject.ObjectCode;
28  import org.kuali.kfs.coa.businessobject.ObjectType;
29  import org.kuali.kfs.coa.businessobject.PriorYearAccount;
30  import org.kuali.kfs.coa.businessobject.SubAccount;
31  import org.kuali.kfs.coa.businessobject.SubObjectCode;
32  import org.kuali.kfs.sys.KFSConstants;
33  import org.kuali.kfs.sys.KFSPropertyConstants;
34  import org.kuali.kfs.sys.businessobject.SystemOptions;
35  import org.kuali.rice.core.api.util.type.KualiDecimal;
36  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
37  
38  /**
39   * This class contains the monthly balance amounts for a specific fiscal year, chart of accounts code, account number, 
40   * sub account number, object code, sub object code, balance type code, object type code
41   * 
42   */
43  public class Balance extends PersistableBusinessObjectBase {
44      static final long serialVersionUID = 6581797610149985575L;
45  
46      private Integer universityFiscalYear;
47      private String chartOfAccountsCode;
48      private String accountNumber;
49      private String subAccountNumber;
50      private String objectCode;
51      private String subObjectCode;
52      private String balanceTypeCode;
53      private String objectTypeCode;
54      private KualiDecimal accountLineAnnualBalanceAmount;
55     
56      private KualiDecimal beginningBalanceLineAmount;
57      private KualiDecimal contractsGrantsBeginningBalanceAmount;
58      private KualiDecimal month1Amount;
59      private KualiDecimal month2Amount;
60      private KualiDecimal month3Amount;
61      private KualiDecimal month4Amount;
62      private KualiDecimal month5Amount;
63      private KualiDecimal month6Amount;
64      private KualiDecimal month7Amount;
65      private KualiDecimal month8Amount;
66      private KualiDecimal month9Amount;
67      private KualiDecimal month10Amount;
68      private KualiDecimal month11Amount;
69      private KualiDecimal month12Amount;
70      private KualiDecimal month13Amount;
71      private Date timestamp;
72  
73      private Chart chart;
74      private Account account;
75      private PriorYearAccount priorYearAccount;
76      private ObjectCode financialObject;
77      private SubObjectCode financialSubObject;
78      private SubAccount subAccount;
79      private BalanceType balanceType;
80      private ObjectType objectType;
81  
82      private TransientBalanceInquiryAttributes dummyBusinessObject;
83      private SystemOptions option;
84  
85      /**
86       * @return Returns the options.
87       */
88      public SystemOptions getOption() {
89          return option;
90      }
91  
92      /**
93       * @param options The options to set.
94       */
95      public void setOption(SystemOptions opt) {
96          this.option = opt;
97      }
98  
99      public Balance() {
100         accountLineAnnualBalanceAmount = KualiDecimal.ZERO;
101         beginningBalanceLineAmount = KualiDecimal.ZERO;
102         contractsGrantsBeginningBalanceAmount = KualiDecimal.ZERO;
103         month1Amount = KualiDecimal.ZERO;
104         month2Amount = KualiDecimal.ZERO;
105         month3Amount = KualiDecimal.ZERO;
106         month4Amount = KualiDecimal.ZERO;
107         month5Amount = KualiDecimal.ZERO;
108         month6Amount = KualiDecimal.ZERO;
109         month7Amount = KualiDecimal.ZERO;
110         month8Amount = KualiDecimal.ZERO;
111         month9Amount = KualiDecimal.ZERO;
112         month10Amount = KualiDecimal.ZERO;
113         month11Amount = KualiDecimal.ZERO;
114         month12Amount = KualiDecimal.ZERO;
115         month13Amount = KualiDecimal.ZERO;
116         this.dummyBusinessObject = new TransientBalanceInquiryAttributes();
117     }
118 
119     public Balance(Transaction t) {
120         this();
121         setUniversityFiscalYear(t.getUniversityFiscalYear());
122         setChartOfAccountsCode(t.getChartOfAccountsCode());
123         setAccountNumber(t.getAccountNumber());
124         setSubAccountNumber(t.getSubAccountNumber());
125         setObjectCode(t.getFinancialObjectCode());
126         setSubObjectCode(t.getFinancialSubObjectCode());
127         setBalanceTypeCode(t.getFinancialBalanceTypeCode());
128         setObjectTypeCode(t.getFinancialObjectTypeCode());
129     }
130 
131 
132     /**
133      * Constructs a Balance.java.
134      * 
135      * @param transaction
136      */
137     public Balance(BalanceHistory balanceHistory) {
138         this();
139         this.setChartOfAccountsCode(balanceHistory.getChartOfAccountsCode());
140         this.setAccountNumber(balanceHistory.getAccountNumber());
141         this.setBalanceTypeCode(balanceHistory.getBalanceTypeCode());
142         this.setObjectCode(balanceHistory.getObjectCode());
143         this.setObjectTypeCode(balanceHistory.getObjectTypeCode());
144         this.setSubObjectCode(balanceHistory.getSubObjectCode());
145         this.setUniversityFiscalYear(balanceHistory.getUniversityFiscalYear());
146         this.setSubAccountNumber(balanceHistory.getSubAccountNumber());
147     }
148     
149     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
150         LinkedHashMap map = new LinkedHashMap();
151         map.put(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, getUniversityFiscalYear());
152         map.put(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, getChartOfAccountsCode());
153         map.put(KFSPropertyConstants.ACCOUNT_NUMBER, getAccountNumber());
154         map.put(KFSPropertyConstants.SUB_ACCOUNT_NUMBER, getSubAccountNumber());
155         map.put(KFSPropertyConstants.OBJECT_CODE, getObjectCode());
156         map.put(KFSPropertyConstants.SUB_OBJECT_CODE, getSubObjectCode());
157         map.put(KFSPropertyConstants.BALANCE_TYPE_CODE, getBalanceTypeCode());
158         map.put(KFSPropertyConstants.OBJECT_TYPE_CODE, getObjectTypeCode());
159         return map;
160     }
161 
162     /**
163      * Returns an amount for a specific period
164      * 
165      * @param period period to grab amount for
166      * @return KualiDecimal amount for that specific period
167      */
168     public KualiDecimal getAmount(String period) {
169         if (KFSConstants.PERIOD_CODE_ANNUAL_BALANCE.equals(period)) {
170             return getAccountLineAnnualBalanceAmount();
171         }
172         else if (KFSConstants.PERIOD_CODE_BEGINNING_BALANCE.equals(period)) {
173             return getBeginningBalanceLineAmount();
174         }
175         else if (KFSConstants.PERIOD_CODE_CG_BEGINNING_BALANCE.equals(period)) {
176             return getContractsGrantsBeginningBalanceAmount();
177         }
178         else if (KFSConstants.MONTH1.equals(period)) {
179             return getMonth1Amount();
180         }
181         else if (KFSConstants.MONTH2.equals(period)) {
182             return getMonth2Amount();
183         }
184         else if (KFSConstants.MONTH3.equals(period)) {
185             return getMonth3Amount();
186         }
187         else if (KFSConstants.MONTH4.equals(period)) {
188             return getMonth4Amount();
189         }
190         else if (KFSConstants.MONTH5.equals(period)) {
191             return getMonth5Amount();
192         }
193         else if (KFSConstants.MONTH6.equals(period)) {
194             return getMonth6Amount();
195         }
196         else if (KFSConstants.MONTH7.equals(period)) {
197             return getMonth7Amount();
198         }
199         else if (KFSConstants.MONTH8.equals(period)) {
200             return getMonth8Amount();
201         }
202         else if (KFSConstants.MONTH9.equals(period)) {
203             return getMonth9Amount();
204         }
205         else if (KFSConstants.MONTH10.equals(period)) {
206             return getMonth10Amount();
207         }
208         else if (KFSConstants.MONTH11.equals(period)) {
209             return getMonth11Amount();
210         }
211         else if (KFSConstants.MONTH12.equals(period)) {
212             return getMonth12Amount();
213         }
214         else if (KFSConstants.MONTH13.equals(period)) {
215             return getMonth13Amount();
216         }
217         else {
218             return null;
219         }
220     }
221 
222     /**
223      * Add an amount to a specific period
224      * 
225      * @param period period to add amount to
226      * @param amount amount to add to period
227      */
228     public void addAmount(String period, KualiDecimal amount) {
229 
230         if (KFSConstants.PERIOD_CODE_ANNUAL_BALANCE.equals(period)) {
231             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
232         }
233         else if (KFSConstants.PERIOD_CODE_BEGINNING_BALANCE.equals(period)) {
234             beginningBalanceLineAmount = beginningBalanceLineAmount.add(amount);
235         }
236         else if (KFSConstants.PERIOD_CODE_CG_BEGINNING_BALANCE.equals(period)) {
237             contractsGrantsBeginningBalanceAmount = contractsGrantsBeginningBalanceAmount.add(amount);
238         }
239         else if (KFSConstants.MONTH1.equals(period)) {
240             month1Amount = month1Amount.add(amount);
241             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
242         }
243         else if (KFSConstants.MONTH2.equals(period)) {
244             month2Amount = month2Amount.add(amount);
245             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
246         }
247         else if (KFSConstants.MONTH3.equals(period)) {
248             month3Amount = month3Amount.add(amount);
249             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
250         }
251         else if (KFSConstants.MONTH4.equals(period)) {
252             month4Amount = month4Amount.add(amount);
253             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
254         }
255         else if (KFSConstants.MONTH5.equals(period)) {
256             month5Amount = month5Amount.add(amount);
257             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
258         }
259         else if (KFSConstants.MONTH6.equals(period)) {
260             month6Amount = month6Amount.add(amount);
261             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
262         }
263         else if (KFSConstants.MONTH7.equals(period)) {
264             month7Amount = month7Amount.add(amount);
265             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
266         }
267         else if (KFSConstants.MONTH8.equals(period)) {
268             month8Amount = month8Amount.add(amount);
269             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
270         }
271         else if (KFSConstants.MONTH9.equals(period)) {
272             month9Amount = month9Amount.add(amount);
273             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
274         }
275         else if (KFSConstants.MONTH10.equals(period)) {
276             month10Amount = month10Amount.add(amount);
277             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
278         }
279         else if (KFSConstants.MONTH11.equals(period)) {
280             month11Amount = month11Amount.add(amount);
281             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
282         }
283         else if (KFSConstants.MONTH12.equals(period)) {
284             month12Amount = month12Amount.add(amount);
285             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
286         }
287         else if (KFSConstants.MONTH13.equals(period)) {
288             month13Amount = month13Amount.add(amount);
289             accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount.add(amount);
290         }
291     }
292 
293     /**
294      * @return Returns the accountLineAnnualBalanceAmount.
295      */
296     public KualiDecimal getAccountLineAnnualBalanceAmount() {
297         return accountLineAnnualBalanceAmount;
298     }
299 
300     /**
301      * @param accountLineAnnualBalanceAmount The accountLineAnnualBalanceAmount to set.
302      */
303     public void setAccountLineAnnualBalanceAmount(KualiDecimal accountLineAnnualBalanceAmount) {
304         this.accountLineAnnualBalanceAmount = accountLineAnnualBalanceAmount;
305     }
306 
307     /**
308      * @return Returns the accountNumber.
309      */
310     public String getAccountNumber() {
311         return accountNumber;
312     }
313 
314     /**
315      * @param accountNumber The accountNumber to set.
316      */
317     public void setAccountNumber(String accountNumber) {
318         this.accountNumber = accountNumber;
319     }
320 
321     /**
322      * @return Returns the balanceTypeCode.
323      */
324     public String getBalanceTypeCode() {
325         return balanceTypeCode;
326     }
327 
328     /**
329      * @param balanceTypeCode The balanceTypeCode to set.
330      */
331     public void setBalanceTypeCode(String balanceTypeCode) {
332         this.balanceTypeCode = balanceTypeCode;
333     }
334 
335     /**
336      * @return Returns the beginningBalanceLineAmount.
337      */
338     public KualiDecimal getBeginningBalanceLineAmount() {
339         return beginningBalanceLineAmount;
340     }
341 
342     /**
343      * @param beginningBalanceLineAmount The beginningBalanceLineAmount to set.
344      */
345     public void setBeginningBalanceLineAmount(KualiDecimal beginningBalanceLineAmount) {
346         this.beginningBalanceLineAmount = beginningBalanceLineAmount;
347     }
348 
349     /**
350      * @return Returns the chartOfAccountsCode.
351      */
352     public String getChartOfAccountsCode() {
353         return chartOfAccountsCode;
354     }
355 
356     /**
357      * @param chartOfAccountsCode The chartOfAccountsCode to set.
358      */
359     public void setChartOfAccountsCode(String chartOfAccountsCode) {
360         this.chartOfAccountsCode = chartOfAccountsCode;
361     }
362 
363     /**
364      * @return Returns the contractsGrantsBeginningBalanceAmount.
365      */
366     public KualiDecimal getContractsGrantsBeginningBalanceAmount() {
367         return contractsGrantsBeginningBalanceAmount;
368     }
369 
370     /**
371      * @param contractsGrantsBeginningBalanceAmount The contractsGrantsBeginningBalanceAmount to set.
372      */
373     public void setContractsGrantsBeginningBalanceAmount(KualiDecimal contractsGrantsBeginningBalanceAmount) {
374         this.contractsGrantsBeginningBalanceAmount = contractsGrantsBeginningBalanceAmount;
375     }
376 
377     /**
378      * @return Returns the month10Amount.
379      */
380     public KualiDecimal getMonth10Amount() {
381         return month10Amount;
382     }
383 
384     /**
385      * @param month10Amount The month10Amount to set.
386      */
387     public void setMonth10Amount(KualiDecimal month10Amount) {
388         this.month10Amount = month10Amount;
389     }
390 
391     /**
392      * @return Returns the month11Amount.
393      */
394     public KualiDecimal getMonth11Amount() {
395         return month11Amount;
396     }
397 
398     /**
399      * @param month11Amount The month11Amount to set.
400      */
401     public void setMonth11Amount(KualiDecimal month11Amount) {
402         this.month11Amount = month11Amount;
403     }
404 
405     /**
406      * @return Returns the month12Amount.
407      */
408     public KualiDecimal getMonth12Amount() {
409         return month12Amount;
410     }
411 
412     /**
413      * @param month12Amount The month12Amount to set.
414      */
415     public void setMonth12Amount(KualiDecimal month12Amount) {
416         this.month12Amount = month12Amount;
417     }
418 
419     /**
420      * @return Returns the month13Amount.
421      */
422     public KualiDecimal getMonth13Amount() {
423         return month13Amount;
424     }
425 
426     /**
427      * @param month13Amount The month13Amount to set.
428      */
429     public void setMonth13Amount(KualiDecimal month13Amount) {
430         this.month13Amount = month13Amount;
431     }
432 
433     /**
434      * @return Returns the month1Amount.
435      */
436     public KualiDecimal getMonth1Amount() {
437         return month1Amount;
438     }
439 
440     /**
441      * @param month1Amount The month1Amount to set.
442      */
443     public void setMonth1Amount(KualiDecimal month1Amount) {
444         this.month1Amount = month1Amount;
445     }
446 
447     /**
448      * @return Returns the month2Amount.
449      */
450     public KualiDecimal getMonth2Amount() {
451         return month2Amount;
452     }
453 
454     /**
455      * @param month2Amount The month2Amount to set.
456      */
457     public void setMonth2Amount(KualiDecimal month2Amount) {
458         this.month2Amount = month2Amount;
459     }
460 
461     /**
462      * @return Returns the month3Amount.
463      */
464     public KualiDecimal getMonth3Amount() {
465         return month3Amount;
466     }
467 
468     /**
469      * @param month3Amount The month3Amount to set.
470      */
471     public void setMonth3Amount(KualiDecimal month3Amount) {
472         this.month3Amount = month3Amount;
473     }
474 
475     /**
476      * @return Returns the month4Amount.
477      */
478     public KualiDecimal getMonth4Amount() {
479         return month4Amount;
480     }
481 
482     /**
483      * @param month4Amount The month4Amount to set.
484      */
485     public void setMonth4Amount(KualiDecimal month4Amount) {
486         this.month4Amount = month4Amount;
487     }
488 
489     /**
490      * @return Returns the month5Amount.
491      */
492     public KualiDecimal getMonth5Amount() {
493         return month5Amount;
494     }
495 
496     /**
497      * @param month5Amount The month5Amount to set.
498      */
499     public void setMonth5Amount(KualiDecimal month5Amount) {
500         this.month5Amount = month5Amount;
501     }
502 
503     /**
504      * @return Returns the month6Amount.
505      */
506     public KualiDecimal getMonth6Amount() {
507         return month6Amount;
508     }
509 
510     /**
511      * @param month6Amount The month6Amount to set.
512      */
513     public void setMonth6Amount(KualiDecimal month6Amount) {
514         this.month6Amount = month6Amount;
515     }
516 
517     /**
518      * @return Returns the month7Amount.
519      */
520     public KualiDecimal getMonth7Amount() {
521         return month7Amount;
522     }
523 
524     /**
525      * @param month7Amount The month7Amount to set.
526      */
527     public void setMonth7Amount(KualiDecimal month7Amount) {
528         this.month7Amount = month7Amount;
529     }
530 
531     /**
532      * @return Returns the month8Amount.
533      */
534     public KualiDecimal getMonth8Amount() {
535         return month8Amount;
536     }
537 
538     /**
539      * @param month8Amount The month8Amount to set.
540      */
541     public void setMonth8Amount(KualiDecimal month8Amount) {
542         this.month8Amount = month8Amount;
543     }
544 
545     /**
546      * @return Returns the month9Amount.
547      */
548     public KualiDecimal getMonth9Amount() {
549         return month9Amount;
550     }
551 
552     /**
553      * @param month9Amount The month9Amount to set.
554      */
555     public void setMonth9Amount(KualiDecimal month9Amount) {
556         this.month9Amount = month9Amount;
557     }
558 
559     /**
560      * @return Returns the objectCode.
561      */
562     public String getObjectCode() {
563         return objectCode;
564     }
565 
566     /**
567      * @param objectCode The objectCode to set.
568      */
569     public void setObjectCode(String objectCode) {
570         this.objectCode = objectCode;
571     }
572 
573     /**
574      * @return Returns the objectTypeCode.
575      */
576     public String getObjectTypeCode() {
577         return objectTypeCode;
578     }
579 
580     /**
581      * @param objectTypeCode The objectTypeCode to set.
582      */
583     public void setObjectTypeCode(String objectTypeCode) {
584         this.objectTypeCode = objectTypeCode;
585     }
586 
587     /**
588      * @return Returns the subAccountNumber.
589      */
590     public String getSubAccountNumber() {
591         return subAccountNumber;
592     }
593 
594     /**
595      * @param subAccountNumber The subAccountNumber to set.
596      */
597     public void setSubAccountNumber(String subAccountNumber) {
598         this.subAccountNumber = subAccountNumber;
599     }
600 
601     /**
602      * @return Returns the subObjectCode.
603      */
604     public String getSubObjectCode() {
605         return subObjectCode;
606     }
607 
608     /**
609      * @param subObjectCode The subObjectCode to set.
610      */
611     public void setSubObjectCode(String subObjectCode) {
612         this.subObjectCode = subObjectCode;
613     }
614 
615     /**
616      * @return Returns the timestamp.
617      */
618     public Date getTimestamp() {
619         return timestamp;
620     }
621 
622     /**
623      * @param timestamp The timestamp to set.
624      */
625     public void setTimestamp(Date timestamp) {
626         this.timestamp = timestamp;
627     }
628 
629     /**
630      * @return Returns the universityFiscalYear.
631      */
632     public Integer getUniversityFiscalYear() {
633         return universityFiscalYear;
634     }
635 
636     /**
637      * @param universityFiscalYear The universityFiscalYear to set.
638      */
639     public void setUniversityFiscalYear(Integer universityFiscalYear) {
640         this.universityFiscalYear = universityFiscalYear;
641     }
642 
643     /**
644      * Gets the chart attribute.
645      * 
646      * @return Returns the chart.
647      */
648     public Chart getChart() {
649         return chart;
650     }
651 
652     /**
653      * Sets the chart attribute value.
654      * 
655      * @param chart The chart to set.
656      */
657     public void setChart(Chart chart) {
658         this.chart = chart;
659     }
660 
661     /**
662      * Gets the account attribute.
663      * 
664      * @return Returns the account.
665      */
666     public Account getAccount() {
667         return account;
668     }
669 
670     /**
671      * Sets the account attribute value.
672      * 
673      * @param account The account to set.
674      */
675     public void setAccount(Account account) {
676         this.account = account;
677     }
678 
679     /**
680      * Gets the dummyBusinessObject attribute.
681      * 
682      * @return Returns the dummyBusinessObject.
683      */
684     public TransientBalanceInquiryAttributes getDummyBusinessObject() {
685         return dummyBusinessObject;
686     }
687 
688     /**
689      * Sets the dummyBusinessObject attribute value.
690      * 
691      * @param dummyBusinessObject The dummyBusinessObject to set.
692      */
693     public void setDummyBusinessObject(TransientBalanceInquiryAttributes dummyBusinessObject) {
694         this.dummyBusinessObject = dummyBusinessObject;
695     }
696 
697     /**
698      * Gets the financialObject attribute.
699      * 
700      * @return Returns the financialObject.
701      */
702     public ObjectCode getFinancialObject() {
703         return financialObject;
704     }
705 
706     /**
707      * Sets the financialObject attribute value.
708      * 
709      * @param financialObject The financialObject to set.
710      */
711     public void setFinancialObject(ObjectCode financialObject) {
712         this.financialObject = financialObject;
713     }
714 
715     /**
716      * Gets the balanceType attribute.
717      * 
718      * @return Returns the balanceType.
719      */
720     public BalanceType getBalanceType() {
721         return balanceType;
722     }
723 
724     /**
725      * Sets the balanceType attribute value.
726      * 
727      * @param balanceType The balanceType to set.
728      */
729     public void setBalanceType(BalanceType balanceType) {
730         this.balanceType = balanceType;
731     }
732 
733     /**
734      * Gets the financialSubObject attribute.
735      * 
736      * @return Returns the financialSubObject.
737      */
738     public SubObjectCode getFinancialSubObject() {
739         return financialSubObject;
740     }
741 
742     /**
743      * Sets the financialSubObject attribute value.
744      * 
745      * @param financialSubObject The financialSubObject to set.
746      */
747     public void setFinancialSubObject(SubObjectCode financialSubObject) {
748         this.financialSubObject = financialSubObject;
749     }
750 
751     /**
752      * Gets the subAccount attribute.
753      * 
754      * @return Returns the subAccount.
755      */
756     public SubAccount getSubAccount() {
757         return subAccount;
758     }
759 
760     /**
761      * Sets the subAccount attribute value.
762      * 
763      * @param subAccount The subAccount to set.
764      */
765     public void setSubAccount(SubAccount subAccount) {
766         this.subAccount = subAccount;
767     }
768 
769     /**
770      * Gets the objectType attribute.
771      * 
772      * @return Returns the objectType.
773      */
774     public ObjectType getObjectType() {
775         return objectType;
776     }
777 
778     /**
779      * Sets the objectType attribute value.
780      * 
781      * @param objectType The objectType to set.
782      */
783     public void setObjectType(ObjectType objectType) {
784         this.objectType = objectType;
785     }
786 
787     /**
788      * Gets the priorYearAccount attribute.
789      * 
790      * @return Returns the priorYearAccount.
791      */
792     public PriorYearAccount getPriorYearAccount() {
793         return priorYearAccount;
794     }
795 
796     /**
797      * Sets the priorYearAccount attribute value.
798      * 
799      * @param priorYearAccount The priorYearAccount to set.
800      */
801     public void setPriorYearAccount(PriorYearAccount priorYearAccount) {
802         this.priorYearAccount = priorYearAccount;
803     }
804     
805     private String fundGroup; // a transient attribute
806     private KualiDecimal yearBalance = KualiDecimal.ZERO; // a transient attribute
807     private KualiDecimal yearToDayBalance = KualiDecimal.ZERO; // a transient attribute
808 
809     /**
810      * Gets the fundGroup attribute. 
811      * @return Returns the fundGroup.
812      */
813     public String getFundGroup() {
814         return fundGroup;
815     }
816 
817     /**
818      * Sets the fundGroup attribute value.
819      * @param fundGroup The fundGroup to set.
820      */
821     public void setFundGroup(String fundGroup) {
822         this.fundGroup = fundGroup;
823     }
824 
825     /**
826      * Gets the yearBalance attribute. 
827      * @return Returns the yearBalance.
828      */
829     public KualiDecimal getYearBalance() {
830         return yearBalance;
831     }
832 
833     /**
834      * Sets the yearBalance attribute value.
835      * @param yearBalance The yearBalance to set.
836      */
837     public void setYearBalance(KualiDecimal yearBalance) {
838         this.yearBalance = yearBalance;
839     }
840 
841     /**
842      * Gets the yearToDayBalance attribute. 
843      * @return Returns the yearToDayBalance.
844      */
845     public KualiDecimal getYearToDayBalance() {
846         return yearToDayBalance;
847     }
848 
849     /**
850      * Sets the yearToDayBalance attribute value.
851      * @param yearToDayBalance The yearToDayBalance to set.
852      */
853     public void setYearToDayBalance(KualiDecimal yearToDayBalance) {
854         this.yearToDayBalance = yearToDayBalance;
855     }    
856  
857 
858     public KualiDecimal getCombinedBeginningBalanceAmount() {
859         KualiDecimal combinedBeginningBalanceAmount;
860         combinedBeginningBalanceAmount = KualiDecimal.ZERO;
861         combinedBeginningBalanceAmount = combinedBeginningBalanceAmount.add(getBeginningBalanceLineAmount());
862         combinedBeginningBalanceAmount = combinedBeginningBalanceAmount.add(getContractsGrantsBeginningBalanceAmount());
863         return combinedBeginningBalanceAmount;
864     }
865 }