01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.labor.dao;
17:
18: import java.util.Iterator;
19: import java.util.Map;
20:
21: import org.kuali.module.labor.bo.LedgerEntry;
22:
23: /**
24: * This is the data access object for ledger entry.
25: *
26: * @see org.kuali.module.labor.bo.LedgerEntry
27: */
28: public interface LaborLedgerEntryDao {
29:
30: /**
31: * The sequence number is one of the primary keys of ledger entry. The entries can be grouped by other keys. This method is used
32: * to get the maximum sequence number in the group of entries.
33: *
34: * @param ledgerEntry the given ledger entry
35: * @return the maximum sequence number in a group of entries. If the group doesn't exist, return 0.
36: */
37: Integer getMaxSquenceNumber(LedgerEntry ledgerEntry);
38:
39: /**
40: * Find the ledger entries that satisfy the all entries in the given field-value pair
41: *
42: * @param fieldValues the given field-value pair
43: * @return the ledger entries that satisfy the all entries in the given field-value pair
44: */
45: Iterator<LedgerEntry> find(Map<String, String> fieldValues);
46:
47: /**
48: * save the given ledger entry into the underlying data store
49: *
50: * @param ledgerEntry the given ledger entry
51: */
52: void save(LedgerEntry ledgerEntry);
53: }
|