1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package org.kuali.ole.gl.businessobject;
18  
19  import java.sql.Date;
20  
21  import org.kuali.rice.krad.util.ObjectUtils;
22  
23  
24  
25  
26  public class BalanceHistory extends Balance implements LedgerBalanceHistory {
27      
28  
29  
30      public BalanceHistory() {
31          super();
32      }
33  
34      
35  
36  
37  
38  
39      public BalanceHistory(OriginEntryInformation originEntry) {
40          this();
41          this.setChartOfAccountsCode(originEntry.getChartOfAccountsCode());
42          this.setAccountNumber(originEntry.getAccountNumber());
43          this.setBalanceTypeCode(originEntry.getFinancialBalanceTypeCode());
44          this.setObjectCode(originEntry.getFinancialObjectCode());
45          this.setObjectTypeCode(originEntry.getFinancialObjectTypeCode());
46          this.setSubObjectCode(originEntry.getFinancialSubObjectCode());
47          this.setUniversityFiscalYear(originEntry.getUniversityFiscalYear());
48          this.setSubAccountNumber(originEntry.getSubAccountNumber());
49      }
50      
51      
52  
53  
54  
55  
56  
57      public boolean compareAmounts(Balance balance) {
58          if (ObjectUtils.isNotNull(balance)
59                  && balance.getAccountLineAnnualBalanceAmount().equals(this.getAccountLineAnnualBalanceAmount())
60                  && balance.getBeginningBalanceLineAmount().equals(this.getBeginningBalanceLineAmount())
61                  && balance.getContractsGrantsBeginningBalanceAmount().equals(this.getContractsGrantsBeginningBalanceAmount())
62                  && balance.getMonth1Amount().equals(this.getMonth1Amount())
63                  && balance.getMonth2Amount().equals(this.getMonth2Amount())
64                  && balance.getMonth3Amount().equals(this.getMonth3Amount())
65                  && balance.getMonth4Amount().equals(this.getMonth4Amount())
66                  && balance.getMonth5Amount().equals(this.getMonth5Amount())
67                  && balance.getMonth6Amount().equals(this.getMonth6Amount())
68                  && balance.getMonth7Amount().equals(this.getMonth7Amount())
69                  && balance.getMonth8Amount().equals(this.getMonth8Amount())
70                  && balance.getMonth9Amount().equals(this.getMonth9Amount())
71                  && balance.getMonth10Amount().equals(this.getMonth10Amount())
72                  && balance.getMonth11Amount().equals(this.getMonth11Amount())
73                  && balance.getMonth12Amount().equals(this.getMonth12Amount())
74                  && balance.getMonth13Amount().equals(this.getMonth13Amount())) {
75              return true;
76          }
77          
78          return false;
79      }
80      
81      
82  
83  
84  
85      @Override
86      public Date getTimestamp() {
87          throw new UnsupportedOperationException();
88      }
89  
90      
91  
92  
93  
94      @Override
95      public void setTimestamp(Date timestamp) {
96          throw new UnsupportedOperationException();
97      }
98      
99  
100     
101 
102 
103 
104 
105     public String getFinancialBalanceTypeCode() {
106         return getBalanceTypeCode();
107     }
108 
109     
110 
111 
112 
113 
114     public void setFinancialBalanceTypeCode(String financialBalanceTypeCode) {
115         this.setBalanceTypeCode(financialBalanceTypeCode);
116     }
117     
118     
119 
120 
121 
122 
123     public String getFinancialObjectCode() {
124         return getObjectCode();
125     }
126 
127     
128 
129 
130 
131 
132     public void setFinancialObjectCode(String financialObjectCode) {
133         this.setObjectCode(financialObjectCode);
134     }
135     
136     
137 
138 
139 
140 
141     public String getFinancialObjectTypeCode() {
142         return getObjectTypeCode();
143     }
144 
145     
146 
147 
148 
149 
150     public void setFinancialObjectTypeCode(String financialObjectTypeCode) {
151         this.setObjectTypeCode(financialObjectTypeCode);
152     }
153     
154     
155 
156 
157 
158 
159     public String getFinancialSubObjectCode() {
160         return getSubObjectCode();
161     }
162 
163     
164 
165 
166 
167 
168     public void setFinancialSubObjectCode(String financialSubObjectCode) {
169         this.setSubObjectCode(financialSubObjectCode);
170     }
171 }