View Javadoc
1   /*
2    * Copyright 2006-2009 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  
17  package org.kuali.ole.gl.businessobject;
18  
19  import java.sql.Date;
20  import java.sql.Timestamp;
21  
22  import org.kuali.rice.core.api.util.type.KualiDecimal;
23  
24  /**
25   * General Ledger business object for LedgerEntryHistory
26   */
27  public class EntryHistory extends Entry implements LedgerEntryHistory {
28  
29      private Integer rowCount;
30  
31      /**
32       * Default constructor.
33       */
34      public EntryHistory() {
35          super();
36          this.setTransactionLedgerEntryAmount(KualiDecimal.ZERO);
37          this.setRowCount(0);
38      }
39      
40      /**
41       * Constructs a EntryHistory.java.
42       * 
43       * @param transaction
44       */
45      public EntryHistory(OriginEntryInformation originEntry) {
46          this();
47          this.setUniversityFiscalYear(originEntry.getUniversityFiscalYear());
48          this.setChartOfAccountsCode(originEntry.getChartOfAccountsCode());
49          this.setFinancialObjectCode(originEntry.getFinancialObjectCode());
50          this.setFinancialBalanceTypeCode(originEntry.getFinancialBalanceTypeCode());
51          this.setUniversityFiscalPeriodCode(originEntry.getUniversityFiscalPeriodCode());
52          this.setTransactionDebitCreditCode(originEntry.getTransactionDebitCreditCode());
53      }
54      
55      /**
56       * Adds a transactionLedgerEntryAmount and increments the rowCount.
57       * 
58       * @param transactionLedgerEntryAmount
59       */
60      public void addAmount(KualiDecimal transactionLedgerEntryAmount) {
61          this.setTransactionLedgerEntryAmount(this.getTransactionLedgerEntryAmount().add(transactionLedgerEntryAmount));
62          rowCount++;
63      }
64      
65      /**
66       * Gets the rowCount
67       * 
68       * @return Returns the rowCount
69       */
70      public Integer getRowCount() {
71          return rowCount;
72      }
73  
74      /**
75       * Sets the rowCount
76       * 
77       * @param rowCount The rowCount to set.
78       */
79      public void setRowCount(Integer rowCount) {
80          this.rowCount = rowCount;
81      }
82      
83      /**
84       * History does not track this field.
85       * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getAccountNumber()
86       */
87      @Override
88      public String getAccountNumber() {
89          throw new UnsupportedOperationException();
90      }
91  
92      /**
93       * History does not track this field.
94       * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setAccountNumber(java.lang.String)
95       */
96      @Override
97      public void setAccountNumber(String accountNumber) {
98          throw new UnsupportedOperationException();
99      }
100 
101     /**
102      * History does not track this field.
103      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getSubAccountNumber()
104      */
105     @Override
106     public String getSubAccountNumber() {
107         throw new UnsupportedOperationException();
108     }
109 
110     /**
111      * History does not track this field.
112      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setSubAccountNumber(java.lang.String)
113      */
114     @Override
115     public void setSubAccountNumber(String subAccountNumber) {
116         throw new UnsupportedOperationException();
117     }
118 
119     /**
120      * History does not track this field.
121      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getFinancialSubObjectCode()
122      */
123     @Override
124     public String getFinancialSubObjectCode() {
125         throw new UnsupportedOperationException();
126     }
127 
128     /**
129      * History does not track this field.
130      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setFinancialSubObjectCode(java.lang.String)
131      */
132     @Override
133     public void setFinancialSubObjectCode(String financialSubObjectCode) {
134         throw new UnsupportedOperationException();
135     }
136 
137     /**
138      * History does not track this field.
139      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getFinancialObjectTypeCode()
140      */
141     @Override
142     public String getFinancialObjectTypeCode() {
143         throw new UnsupportedOperationException();
144     }
145 
146     /**
147      * History does not track this field.
148      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setFinancialObjectTypeCode(java.lang.String)
149      */
150     @Override
151     public void setFinancialObjectTypeCode(String financialObjectTypeCode) {
152         throw new UnsupportedOperationException();
153     }
154 
155     /**
156      * History does not track this field.
157      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getFinancialDocumentTypeCode()
158      */
159     @Override
160     public String getFinancialDocumentTypeCode() {
161         throw new UnsupportedOperationException();
162     }
163 
164     /**
165      * History does not track this field.
166      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getFinancialSystemOriginationCode()
167      */
168     @Override
169     public String getFinancialSystemOriginationCode() {
170         throw new UnsupportedOperationException();
171     }
172 
173     /**
174      * History does not track this field.
175      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setFinancialSystemOriginationCode(java.lang.String)
176      */
177     @Override
178     public void setFinancialSystemOriginationCode(String financialSystemOriginationCode) {
179         throw new UnsupportedOperationException();
180     }
181 
182     /**
183      * History does not track this field.
184      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setFinancialDocumentTypeCode(java.lang.String)
185      */
186     @Override
187     public void setFinancialDocumentTypeCode(String financialDocumentTypeCode) {
188         throw new UnsupportedOperationException();
189     }
190 
191     /**
192      * History does not track this field.
193      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getDocumentNumber()
194      */
195     @Override
196     public String getDocumentNumber() {
197         throw new UnsupportedOperationException();
198     }
199 
200     /**
201      * History does not track this field.
202      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setDocumentNumber(java.lang.String)
203      */
204     @Override
205     public void setDocumentNumber(String documentNumber) {
206         throw new UnsupportedOperationException();
207     }
208 
209     /**
210      * History does not track this field.
211      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getTransactionLedgerEntrySequenceNumber()
212      */
213     @Override
214     public Integer getTransactionLedgerEntrySequenceNumber() {
215         throw new UnsupportedOperationException();
216     }
217 
218     /**
219      * History does not track this field.
220      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setTransactionLedgerEntrySequenceNumber(java.lang.Integer)
221      */
222     @Override
223     public void setTransactionLedgerEntrySequenceNumber(Integer transactionLedgerEntrySequenceNumber) {
224         throw new UnsupportedOperationException();
225     }
226 
227     /**
228      * History does not track this field.
229      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getProjectCode()
230      */
231     @Override
232     public String getProjectCode() {
233         throw new UnsupportedOperationException();
234     }
235 
236     /**
237      * History does not track this field.
238      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setProjectCode(java.lang.String)
239      */
240     @Override
241     public void setProjectCode(String projectCode) {
242         throw new UnsupportedOperationException();
243     }
244 
245     /**
246      * History does not track this field.
247      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getTransactionLedgerEntryDescription()
248      */
249     @Override
250     public String getTransactionLedgerEntryDescription() {
251         throw new UnsupportedOperationException();
252     }
253 
254     /**
255      * History does not track this field.
256      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setTransactionLedgerEntryDescription(java.lang.String)
257      */
258     @Override
259     public void setTransactionLedgerEntryDescription(String transactionLedgerEntryDescription) {
260         throw new UnsupportedOperationException();
261     }
262 
263     /**
264      * History does not track this field.
265      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getTransactionDate()
266      */
267     @Override
268     public Date getTransactionDate() {
269         throw new UnsupportedOperationException();
270     }
271 
272     /**
273      * History does not track this field.
274      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setTransactionDate(java.sql.Date)
275      */
276     @Override
277     public void setTransactionDate(Date transactionDate) {
278         throw new UnsupportedOperationException();
279     }
280 
281     /**
282      * History does not track this field.
283      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getOrganizationDocumentNumber()
284      */
285     @Override
286     public String getOrganizationDocumentNumber() {
287         throw new UnsupportedOperationException();
288     }
289 
290     /**
291      * History does not track this field.
292      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setOrganizationDocumentNumber(java.lang.String)
293      */
294     @Override
295     public void setOrganizationDocumentNumber(String organizationDocumentNumber) {
296         throw new UnsupportedOperationException();
297     }
298 
299     /**
300      * History does not track this field.
301      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getOrganizationReferenceId()
302      */
303     @Override
304     public String getOrganizationReferenceId() {
305         throw new UnsupportedOperationException();
306     }
307 
308     /**
309      * History does not track this field.
310      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setOrganizationReferenceId(java.lang.String)
311      */
312     @Override
313     public void setOrganizationReferenceId(String organizationReferenceId) {
314         throw new UnsupportedOperationException();
315     }
316 
317     /**
318      * History does not track this field.
319      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getReferenceFinancialDocumentTypeCode()
320      */
321     @Override
322     public String getReferenceFinancialDocumentTypeCode() {
323         throw new UnsupportedOperationException();
324     }
325 
326     /**
327      * History does not track this field.
328      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setReferenceFinancialDocumentTypeCode(java.lang.String)
329      */
330     @Override
331     public void setReferenceFinancialDocumentTypeCode(String referenceFinancialDocumentTypeCode) {
332         throw new UnsupportedOperationException();
333     }
334 
335     /**
336      * History does not track this field.
337      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getReferenceFinancialSystemOriginationCode()
338      */
339     @Override
340     public String getReferenceFinancialSystemOriginationCode() {
341         throw new UnsupportedOperationException();
342     }
343 
344     /**
345      * History does not track this field.
346      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setReferenceFinancialSystemOriginationCode(java.lang.String)
347      */
348     @Override
349     public void setReferenceFinancialSystemOriginationCode(String referenceFinancialSystemOriginationCode) {
350         throw new UnsupportedOperationException();
351     }
352 
353     /**
354      * History does not track this field.
355      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getReferenceFinancialDocumentNumber()
356      */
357     @Override
358     public String getReferenceFinancialDocumentNumber() {
359         throw new UnsupportedOperationException();
360     }
361 
362     /**
363      * History does not track this field.
364      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setReferenceFinancialDocumentNumber(java.lang.String)
365      */
366     @Override
367     public void setReferenceFinancialDocumentNumber(String referenceFinancialDocumentNumber) {
368         throw new UnsupportedOperationException();
369     }
370 
371     /**
372      * History does not track this field.
373      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getFinancialDocumentReversalDate()
374      */
375     @Override
376     public Date getFinancialDocumentReversalDate() {
377         throw new UnsupportedOperationException();
378     }
379 
380     /**
381      * History does not track this field.
382      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setFinancialDocumentReversalDate(java.sql.Date)
383      */
384     @Override
385     public void setFinancialDocumentReversalDate(Date financialDocumentReversalDate) {
386         throw new UnsupportedOperationException();
387     }
388 
389     /**
390      * History does not track this field.
391      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getTransactionEncumbranceUpdateCode()
392      */
393     @Override
394     public String getTransactionEncumbranceUpdateCode() {
395         throw new UnsupportedOperationException();
396     }
397 
398     /**
399      * History does not track this field.
400      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setTransactionEncumbranceUpdateCode(java.lang.String)
401      */
402     @Override
403     public void setTransactionEncumbranceUpdateCode(String transactionEncumbranceUpdateCode) {
404         throw new UnsupportedOperationException();
405     }
406 
407     /**
408      * History does not track this field.
409      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getTransactionPostingDate()
410      */
411     @Override
412     public Date getTransactionPostingDate() {
413         throw new UnsupportedOperationException();
414     }
415 
416     /**
417      * History does not track this field.
418      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setTransactionPostingDate(java.sql.Date)
419      */
420     @Override
421     public void setTransactionPostingDate(Date transactionPostingDate) {
422         throw new UnsupportedOperationException();
423     }
424 
425     /**
426      * History does not track this field.
427      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#getTransactionDateTimeStamp()
428      */
429     @Override
430     public Timestamp getTransactionDateTimeStamp() {
431         throw new UnsupportedOperationException();
432     }
433 
434     /**
435      * History does not track this field.
436      * @see org.kuali.ole.module.ld.businessobject.LedgerEntry#setTransactionDateTimeStamp(java.sql.Timestamp)
437      */
438     @Override
439     public void setTransactionDateTimeStamp(Timestamp transactionDateTimeStamp) {
440         throw new UnsupportedOperationException();
441     }
442 }