001: /*
002: * Copyright 2006 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.gl.bo;
017:
018: import org.kuali.core.util.KualiDecimal;
019:
020: /**
021: * This class represents a G/L Summary object which contains monthly amounts
022: */
023: public class GlSummary {
024: private String fundGroup;
025: private KualiDecimal beginningBalance;
026: private KualiDecimal cgBeginningBalance;
027: private KualiDecimal annualBalance;
028: private KualiDecimal month1;
029: private KualiDecimal month2;
030: private KualiDecimal month3;
031: private KualiDecimal month4;
032: private KualiDecimal month5;
033: private KualiDecimal month6;
034: private KualiDecimal month7;
035: private KualiDecimal month8;
036: private KualiDecimal month9;
037: private KualiDecimal month10;
038: private KualiDecimal month11;
039: private KualiDecimal month12;
040: private KualiDecimal month13;
041:
042: public GlSummary() {
043: beginningBalance = KualiDecimal.ZERO;
044: cgBeginningBalance = KualiDecimal.ZERO;
045: annualBalance = KualiDecimal.ZERO;
046: month1 = KualiDecimal.ZERO;
047: month2 = KualiDecimal.ZERO;
048: month3 = KualiDecimal.ZERO;
049: month4 = KualiDecimal.ZERO;
050: month5 = KualiDecimal.ZERO;
051: month6 = KualiDecimal.ZERO;
052: month7 = KualiDecimal.ZERO;
053: month8 = KualiDecimal.ZERO;
054: month9 = KualiDecimal.ZERO;
055: month10 = KualiDecimal.ZERO;
056: month11 = KualiDecimal.ZERO;
057: month12 = KualiDecimal.ZERO;
058: month13 = KualiDecimal.ZERO;
059: }
060:
061: public GlSummary(Object[] data) {
062: fundGroup = (String) data[0];
063:
064: setAnnualBalance((KualiDecimal) data[1]);
065: setBeginningBalance((KualiDecimal) data[2]);
066: setCgBeginningBalance((KualiDecimal) data[3]);
067: setMonth1((KualiDecimal) data[4]);
068: setMonth2((KualiDecimal) data[5]);
069: setMonth3((KualiDecimal) data[6]);
070: setMonth4((KualiDecimal) data[7]);
071: setMonth5((KualiDecimal) data[8]);
072: setMonth6((KualiDecimal) data[9]);
073: setMonth7((KualiDecimal) data[10]);
074: setMonth8((KualiDecimal) data[11]);
075: setMonth9((KualiDecimal) data[12]);
076: setMonth10((KualiDecimal) data[13]);
077: setMonth11((KualiDecimal) data[14]);
078: setMonth12((KualiDecimal) data[15]);
079: setMonth13((KualiDecimal) data[16]);
080: }
081:
082: public void add(GlSummary sum) {
083: beginningBalance = beginningBalance.add(sum.beginningBalance);
084: cgBeginningBalance = cgBeginningBalance
085: .add(sum.cgBeginningBalance);
086: annualBalance = annualBalance.add(sum.annualBalance);
087: month1 = month1.add(sum.month1);
088: month2 = month2.add(sum.month2);
089: month3 = month3.add(sum.month3);
090: month4 = month4.add(sum.month4);
091: month5 = month5.add(sum.month5);
092: month6 = month6.add(sum.month6);
093: month7 = month7.add(sum.month7);
094: month8 = month8.add(sum.month8);
095: month9 = month9.add(sum.month9);
096: month10 = month10.add(sum.month10);
097: month11 = month11.add(sum.month11);
098: month12 = month12.add(sum.month12);
099: month13 = month13.add(sum.month13);
100: }
101:
102: public KualiDecimal getYearBalance() {
103: KualiDecimal sum = KualiDecimal.ZERO;
104: sum = sum.add(month1);
105: sum = sum.add(month2);
106: sum = sum.add(month3);
107: sum = sum.add(month4);
108: sum = sum.add(month5);
109: sum = sum.add(month6);
110: sum = sum.add(month7);
111: sum = sum.add(month8);
112: sum = sum.add(month9);
113: sum = sum.add(month10);
114: sum = sum.add(month11);
115: sum = sum.add(month12);
116: sum = sum.add(month13);
117: return sum;
118: }
119:
120: public KualiDecimal getCgBeginningBalance() {
121: return cgBeginningBalance;
122: }
123:
124: public void setCgBeginningBalance(KualiDecimal cgBeginningBalance) {
125: this .cgBeginningBalance = cgBeginningBalance;
126: }
127:
128: public KualiDecimal getAnnualBalance() {
129: return annualBalance;
130: }
131:
132: public void setAnnualBalance(KualiDecimal annualBalance) {
133: this .annualBalance = annualBalance;
134: }
135:
136: public KualiDecimal getBeginningBalance() {
137: return beginningBalance;
138: }
139:
140: public void setBeginningBalance(KualiDecimal beginningBalance) {
141: this .beginningBalance = beginningBalance;
142: }
143:
144: public String getFundGroup() {
145: return fundGroup;
146: }
147:
148: public void setFundGroup(String fundGroup) {
149: this .fundGroup = fundGroup;
150: }
151:
152: public KualiDecimal getMonth1() {
153: return month1;
154: }
155:
156: public void setMonth1(KualiDecimal month1) {
157: this .month1 = month1;
158: }
159:
160: public KualiDecimal getMonth10() {
161: return month10;
162: }
163:
164: public void setMonth10(KualiDecimal month10) {
165: this .month10 = month10;
166: }
167:
168: public KualiDecimal getMonth11() {
169: return month11;
170: }
171:
172: public void setMonth11(KualiDecimal month11) {
173: this .month11 = month11;
174: }
175:
176: public KualiDecimal getMonth12() {
177: return month12;
178: }
179:
180: public void setMonth12(KualiDecimal month12) {
181: this .month12 = month12;
182: }
183:
184: public KualiDecimal getMonth13() {
185: return month13;
186: }
187:
188: public void setMonth13(KualiDecimal month13) {
189: this .month13 = month13;
190: }
191:
192: public KualiDecimal getMonth2() {
193: return month2;
194: }
195:
196: public void setMonth2(KualiDecimal month2) {
197: this .month2 = month2;
198: }
199:
200: public KualiDecimal getMonth3() {
201: return month3;
202: }
203:
204: public void setMonth3(KualiDecimal month3) {
205: this .month3 = month3;
206: }
207:
208: public KualiDecimal getMonth4() {
209: return month4;
210: }
211:
212: public void setMonth4(KualiDecimal month4) {
213: this .month4 = month4;
214: }
215:
216: public KualiDecimal getMonth5() {
217: return month5;
218: }
219:
220: public void setMonth5(KualiDecimal month5) {
221: this .month5 = month5;
222: }
223:
224: public KualiDecimal getMonth6() {
225: return month6;
226: }
227:
228: public void setMonth6(KualiDecimal month6) {
229: this .month6 = month6;
230: }
231:
232: public KualiDecimal getMonth7() {
233: return month7;
234: }
235:
236: public void setMonth7(KualiDecimal month7) {
237: this .month7 = month7;
238: }
239:
240: public KualiDecimal getMonth8() {
241: return month8;
242: }
243:
244: public void setMonth8(KualiDecimal month8) {
245: this .month8 = month8;
246: }
247:
248: public KualiDecimal getMonth9() {
249: return month9;
250: }
251:
252: public void setMonth9(KualiDecimal month9) {
253: this.month9 = month9;
254: }
255:
256: }
|