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.service;
17:
18: import java.util.Iterator;
19: import java.util.Map;
20:
21: import org.kuali.module.labor.bo.LedgerEntry;
22:
23: /**
24: * This interface provides its clients with access to labor leger entries in the backend data store.
25: */
26: public interface LaborLedgerEntryService {
27:
28: /**
29: * Save the given ledger entry or update it if it exsits
30: *
31: * @param ledgerEntry the given ledger entry
32: */
33: void save(LedgerEntry ledgerEntry);
34:
35: /**
36: * The sequence number is one of the primary keys of ledger entry. The entries can be grouped by other keys. This method is used
37: * to get the maximum sequence number in the group of entries.
38: *
39: * @param ledgerEntry the given ledger entry
40: * @return the maximum sequence number in a group of entries. If the group doesn't exist, return 0.
41: */
42: Integer getMaxSequenceNumber(LedgerEntry ledgerEntry);
43:
44: /**
45: * Find the ledger entries that satisfy the all entries in the given field-value pair
46: *
47: * @param fieldValues the given field-value pair
48: * @return the ledger entries that satisfy the all entries in the given field-value pair
49: */
50: Iterator<LedgerEntry> find(Map<String, String> fieldValues);
51: }
|