View Javadoc
1   /*
2    * Copyright 2006 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 org.kuali.rice.core.api.util.type.KualiDecimal;
19  
20  /**
21   * This class represents origin entry statistics for debit, credit, and budget total amounts 
22   */
23  public class OriginEntryStatistics {
24      private KualiDecimal debitTotalAmount = KualiDecimal.ZERO;
25      private KualiDecimal creditTotalAmount = KualiDecimal.ZERO;
26      private KualiDecimal budgetTotalAmount = KualiDecimal.ZERO;
27      private Integer rowCount = 0;
28  
29      public void addDebit(KualiDecimal d) {
30          if (d != null) {
31              debitTotalAmount = debitTotalAmount.add(d);
32          }
33      }
34  
35      public void addCredit(KualiDecimal c) {
36          if (c != null) {
37              creditTotalAmount = creditTotalAmount.add(c);
38          }
39      }
40  
41      public void addBudget(KualiDecimal b) {
42          if (b != null) {
43              budgetTotalAmount = budgetTotalAmount.add(b);
44          }
45      }
46  
47      public void incrementCount() {
48          rowCount++;
49      }
50  
51      public KualiDecimal getCreditTotalAmount() {
52          return creditTotalAmount;
53      }
54  
55      public void setCreditTotalAmount(KualiDecimal creditTotalAmount) {
56          this.creditTotalAmount = creditTotalAmount;
57      }
58  
59      public KualiDecimal getDebitTotalAmount() {
60          return debitTotalAmount;
61      }
62  
63      public void setDebitTotalAmount(KualiDecimal debitTotalAmount) {
64          this.debitTotalAmount = debitTotalAmount;
65      }
66  
67      public KualiDecimal getBudgetTotalAmount() {
68          return budgetTotalAmount;
69      }
70  
71      public void setBudgetTotalAmount(KualiDecimal budgetTotalAmount) {
72          this.budgetTotalAmount = budgetTotalAmount;
73      }
74  
75      public Integer getRowCount() {
76          return rowCount;
77      }
78  
79      public void setRowCount(Integer rowCount) {
80          this.rowCount = rowCount;
81      }
82  }