001/* 002 * Copyright 2005 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 */ 016package org.kuali.ole.gl.dataaccess; 017 018import java.util.Iterator; 019 020import org.kuali.ole.gl.businessobject.ExpenditureTransaction; 021import org.kuali.ole.gl.businessobject.Transaction; 022 023/** 024 * An DAO interface to deal help expenditure transactions to deal with the database 025 */ 026public interface ExpenditureTransactionDao { 027 /** 028 * Returns the expenditure transaction in the database that would be affected if the given transaction is posted 029 * 030 * @param t a transaction to find a related expenditure transaction for 031 * @return the expenditure transaction if found, null otherwise 032 */ 033 public ExpenditureTransaction getByTransaction(Transaction t); 034 035 /** 036 * Returns all expenditure transactions currently in the database 037 * 038 * @return an Iterator with all expenditure transactions from the database 039 */ 040 public Iterator getAllExpenditureTransactions(); 041 042 /** 043 * Deletes the given expenditure transaction 044 * 045 * @param et the expenditure transaction that will be removed, as such, from the database 046 */ 047 public void delete(ExpenditureTransaction et); 048 049 /** 050 * Since expenditure transactions are temporary, this method removes all of the currently existing 051 * expenditure transactions from the database 052 */ 053 public void deleteAllExpenditureTransactions(); 054}