View Javadoc
1   /*
2    * Copyright 2005 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  package org.kuali.ole.gl.dataaccess;
17  
18  import java.util.Iterator;
19  
20  import org.kuali.ole.gl.businessobject.ExpenditureTransaction;
21  import org.kuali.ole.gl.businessobject.Transaction;
22  
23  /**
24   * An DAO interface to deal help expenditure transactions to deal with the database 
25   */
26  public interface ExpenditureTransactionDao {
27      /**
28       * Returns the expenditure transaction in the database that would be affected if the given transaction is posted
29       * 
30       * @param t a transaction to find a related expenditure transaction for
31       * @return the expenditure transaction if found, null otherwise
32       */
33      public ExpenditureTransaction getByTransaction(Transaction t);
34  
35      /**
36       * Returns all expenditure transactions currently in the database
37       * 
38       * @return an Iterator with all expenditure transactions from the database
39       */
40      public Iterator getAllExpenditureTransactions();
41  
42      /**
43       * Deletes the given expenditure transaction
44       * 
45       * @param et the expenditure transaction that will be removed, as such, from the database
46       */
47      public void delete(ExpenditureTransaction et);
48  
49      /**
50       * Since expenditure transactions are temporary, this method removes all of the currently existing
51       * expenditure transactions from the database
52       */
53      public void deleteAllExpenditureTransactions();
54  }