001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.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/ecl2.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    
017    package org.kuali.kfs.gl.businessobject;
018    
019    import java.sql.Date;
020    import java.sql.Timestamp;
021    
022    import org.kuali.rice.kns.util.KualiDecimal;
023    
024    /**
025     * General Ledger business object for LedgerEntryHistory
026     */
027    public class EntryHistory extends Entry implements LedgerEntryHistory {
028    
029        private Integer rowCount;
030    
031        /**
032         * Default constructor.
033         */
034        public EntryHistory() {
035            super();
036            this.setTransactionLedgerEntryAmount(KualiDecimal.ZERO);
037            this.setRowCount(0);
038        }
039        
040        /**
041         * Constructs a EntryHistory.java.
042         * 
043         * @param transaction
044         */
045        public EntryHistory(OriginEntryInformation originEntry) {
046            this();
047            this.setUniversityFiscalYear(originEntry.getUniversityFiscalYear());
048            this.setChartOfAccountsCode(originEntry.getChartOfAccountsCode());
049            this.setFinancialObjectCode(originEntry.getFinancialObjectCode());
050            this.setFinancialBalanceTypeCode(originEntry.getFinancialBalanceTypeCode());
051            this.setUniversityFiscalPeriodCode(originEntry.getUniversityFiscalPeriodCode());
052            this.setTransactionDebitCreditCode(originEntry.getTransactionDebitCreditCode());
053        }
054        
055        /**
056         * Adds a transactionLedgerEntryAmount and increments the rowCount.
057         * 
058         * @param transactionLedgerEntryAmount
059         */
060        public void addAmount(KualiDecimal transactionLedgerEntryAmount) {
061            this.setTransactionLedgerEntryAmount(this.getTransactionLedgerEntryAmount().add(transactionLedgerEntryAmount));
062            rowCount++;
063        }
064        
065        /**
066         * Gets the rowCount
067         * 
068         * @return Returns the rowCount
069         */
070        public Integer getRowCount() {
071            return rowCount;
072        }
073    
074        /**
075         * Sets the rowCount
076         * 
077         * @param rowCount The rowCount to set.
078         */
079        public void setRowCount(Integer rowCount) {
080            this.rowCount = rowCount;
081        }
082        
083        /**
084         * History does not track this field.
085         * @see org.kuali.kfs.module.ld.businessobject.LedgerEntry#getAccountNumber()
086         */
087        @Override
088        public String getAccountNumber() {
089            throw new UnsupportedOperationException();
090        }
091    
092        /**
093         * History does not track this field.
094         * @see org.kuali.kfs.module.ld.businessobject.LedgerEntry#setAccountNumber(java.lang.String)
095         */
096        @Override
097        public void setAccountNumber(String accountNumber) {
098            throw new UnsupportedOperationException();
099        }
100    
101        /**
102         * History does not track this field.
103         * @see org.kuali.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.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.kfs.module.ld.businessobject.LedgerEntry#setTransactionDateTimeStamp(java.sql.Timestamp)
437         */
438        @Override
439        public void setTransactionDateTimeStamp(Timestamp transactionDateTimeStamp) {
440            throw new UnsupportedOperationException();
441        }
442    }