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    package org.kuali.kfs.module.endow.dataaccess;
017    
018    import java.math.BigDecimal;
019    import java.sql.Date;
020    import java.util.Collection;
021    import java.util.HashMap;
022    import java.util.List;
023    
024    import org.kuali.kfs.module.endow.businessobject.FeeMethod;
025    import org.kuali.kfs.module.endow.businessobject.TransactionArchive;
026    
027    public interface TransactionArchiveDao {
028    
029        /**
030         * Gets a collection of records from END_TRAN_ARCHV_T table.  The data is sorted by
031         * DOC_TYP_NM, TRAN_SUB_TYP_CD, TRAN_IP_IND_CD, TRAN_KEMID, TRAN_ETRAN_CD
032         * @param postedDate
033         * @return transactionArchives
034         */
035        public Collection<TransactionArchive> getAllTransactionArchives(java.util.Date postedDate);
036        
037        /**
038         * Gets a collection of records from END_TRAN_ARCHV_T table
039         * @return transactionArchives
040         */
041        public Collection<TransactionArchive> getAllTransactionArchives();
042        
043        /**
044         * Gets a transactionArchive by primary keys.
045         * 
046         * @param documentNumber, lineNumber, lineTypeCode
047         * @return a transactionArchive
048         */
049        public TransactionArchive getByPrimaryKey(String documentNumber, int lineNumber, String lineTypeCode);
050    
051        /**
052         * Gets a count of total number of records from END_TRAN_ARCHV_T table for a given DOC_TYP_NM
053         * @param feeMethod feeMethod object
054         * @return count of transactionArhives matching the criteria
055         */
056        public long getTransactionArchivesCountForTransactions(FeeMethod feeMethod);
057        
058        /**
059         * Gets a count of total number of records from END_TRAN_ARCHV_T table for a given DOC_TYP_NM
060         * @param feeMethodCode, transactionPostedDate
061         * @return count of transactionArhives matching the passed in parameters
062         */
063        public long getTransactionArchivesCountByDocumentTypeName(String feeMethodCode, Date transactionPostedDate);
064    
065        /**
066         * Gets a count of total number of records from END_TRAN_ARCHV_T table for a given DOC_TYP_NM
067         * @param feeMethodCode, transactionPostedDate
068         * @return count of transactionArhives matching the passed in parameters
069         */
070        public long getTransactionArchivesCountByETranCode(String feeMethodCode, Date transactionPostedDate);
071        
072        /**
073         * Gets a count of total number of records from END_TRAN_ARCHV_T table for a given DOC_TYP_NM and TRAN_ETRAN_CD
074         * @param feeMethodCode, transactionPostedDate
075         * @return count of transactionArhives matching the passed in parameters
076         */
077        public long getTransactionArchivesCountByDocumentTypeNameAndETranCode(String feeMethodCode, Date transactionPostedDate);
078        
079        /**
080         * Gets a count of total number of records from END_TRAN_ARCHV_T table for a given TRAN_IP_IND_CD
081         * @param IncomeOrPrincipalIndicator
082         * @return count of transactionArhives matching the passed in parameter
083         */
084        public long getTransactionArchivesCountByIncomeOrPrincipal(String IncomeOrPrincipalIndicator);
085    
086        /**
087         * Gets a count of total number of records from END_TRAN_ARCHV_T table
088         * @param feeMethod
089         * @return count of transactionArhives based on the conditions in feeMethod object
090         */
091        public long getTransactionArchivesCountByBothIncomeAndPrincipal(FeeMethod feeMethod);
092        
093        /**
094         * Gets principal income amount from the selected records from END_TRAN_ARCHV_T table
095         * @param feeMethod feeMethod object
096         * @return incomeCashAmount of transactionArhives matching the criteria
097         */
098        public BigDecimal getTransactionArchivesIncomeCashAmountForTransactions(FeeMethod feeMethod);
099        
100        /**
101         * Gets principal cash amount from the selected records from END_TRAN_ARCHV_T table
102         * @param feeMethod feeMethod object
103         * @return incomeCashAmount of transactionArhives matching the criteria
104         */
105        public BigDecimal getTransactionArchivesPrincipalCashAmountForTransactions(FeeMethod feeMethod);
106        
107        /**
108         * Gets Income and principal cash amount from the selected records from END_TRAN_ARCHV_T table
109         * @param feeMethod feeMethod object
110         * @return Map with both income and principal cash amount of records matching the criteria
111         */
112        public HashMap<String, BigDecimal> getTransactionArchivesIncomeAndPrincipalCashAmountForTransactions(FeeMethod feeMethod);
113    
114        /**
115         * Gets total cash activity by adding income cash and principal cash amount from the selected records from END_TRAN_ARCHV_T table
116         * @param kemid, securityId
117         * @return totalCashActivity
118         */
119        public BigDecimal getTransactionArchivesTotalCashActivity(String kemid, String securityId);
120        
121        /**
122         * Gets a collection of TransactionArchive by kemids and posted dates
123         * 
124         * @param kemids
125         * @param endowmentOption
126         * @param beginningDate
127         * @param endingDate
128         * @return
129         */
130        public List<TransactionArchive> getTransactionArchiveByKemidsAndPostedDate(String kemid, String endowmentOption, java.util.Date beginningDate, java.util.Date endingDate, String closedIndicator, String transactionSubType);
131    
132        /**
133         * Gets a collection of TransactionArchive by kemid and beginning and ending dates
134         * 
135         * @param kemids
136         * @param beginningDate
137         * @param endingDate
138         * @return List<TransactionArchive>
139         */
140        public List<TransactionArchive> getTransactionArchivesByKemid(String kemid, java.util.Date beginningDate, java.util.Date endingDate);
141    
142    }