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