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.fp.document.dataaccess;
017    
018    import java.util.List;
019    
020    import org.kuali.kfs.fp.businessobject.CashieringItemInProcess;
021    import org.kuali.kfs.fp.businessobject.Check;
022    import org.kuali.kfs.fp.businessobject.CoinDetail;
023    import org.kuali.kfs.fp.businessobject.CurrencyDetail;
024    
025    public interface CashManagementDao {
026    
027        /**
028         * This method returns a list of open items in process for a given campus code
029         * 
030         * @param campusCode the campus code to use to search open items in process for
031         * @return a list of open items in process
032         */
033        public List<CashieringItemInProcess> findOpenItemsInProcessByCampusCode(String campusCode);
034    
035        /**
036         * This finds items in process associated with the given campus code closed within the past 30 days.
037         * 
038         * @param campusCode the campus code that the found items in process should be associated with
039         * @return a list of CashieringItemInProcess records
040         */
041        public List<CashieringItemInProcess> findRecentlyClosedItemsInProcess(String campusCode);
042    
043        /**
044         * Retrieves all currency detail records with the given document number, document type code, and cashiering record source
045         * 
046         * @param documentNumber the document number this currency detail was associated with
047         * @param documentTypeCode the type code of that document
048         * @param cashieringRecordSource the cashiering record source
049         * @return a list of currency details matching that criteria
050         */
051        public CurrencyDetail findCurrencyDetailByCashieringRecordSource(String documentNumber, String documentTypeCode, String cashieringRecordSource);
052    
053        /**
054         * Retrieves all coin detail records with the given document number, document type code, and cashiering record source
055         * 
056         * @param documentNumber the document the coin details were associated with
057         * @param documentTypeCode the type of that document
058         * @param cashieringRecordSource the cashiering record source
059         * @return a list of coin details meeting those criteria
060         */
061        public CoinDetail findCoinDetailByCashieringRecordSource(String documentNumber, String documentTypeCode, String cashieringRecordSource);
062    
063        /**
064         * Retrieves from the database any undeposited cashiering transaction checks associated with the given cash management document
065         * 
066         * @param documentNumber the document number of a cash management document that cashiering transaction checks may be associated
067         *        with
068         * @return a list of checks associated with the document
069         */
070        public List<Check> selectUndepositedCashieringChecks(String documentNumber);
071    
072        /**
073         * Retrieves from the database all cashiering transaction checks deposited for a given deposit
074         * 
075         * @param documentNumber the document number of a cash management document that cashiering transaction checks have been
076         *        deposited for
077         * @param depositLineNumber the line number of the deposit to find checks deposited for
078         * @return a list of checks associated with the given deposit
079         */
080        public List<Check> selectCashieringChecksForDeposit(String documentNumber, Integer depositLineNumber);
081    
082        /**
083         * Retrieves all deposited cashiering checks from the database
084         * 
085         * @param documentNumber the document to get checks associated with
086         * @return a list of deposited checks
087         */
088        public List<Check> selectDepositedCashieringChecks(String documentNumber);
089    
090        /**
091         * This method retrieves all currency details associated with a cash management document
092         * 
093         * @param documentNumber the document number of the cash management document to get currency details for
094         * @return a list of currency details
095         */
096        public List<CurrencyDetail> getAllCurrencyDetails(String documentNumber);
097    
098        /**
099         * This method gets all coin details for a particular document number, irregardless of cashiering record source
100         * 
101         * @param documentNumber the document number to find cash details for
102         * @return hopefully, a bunch of coin details
103         */
104        public List<CoinDetail> getAllCoinDetails(String documentNumber);
105    
106        /**
107         * Select the next available check line number for the given cash management document
108         * 
109         * @param documentNumber the document number of a cash management document
110         * @return the next available check line number for cashiering checks
111         */
112        public Integer selectNextAvailableCheckLineNumber(String documentNumber);
113    }