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.purap.dao;
17:
18: import java.sql.Date;
19: import java.util.Iterator;
20:
21: import org.kuali.core.util.KualiDecimal;
22: import org.kuali.module.purap.document.CreditMemoDocument;
23: import org.kuali.module.purap.util.VendorGroupingHelper;
24:
25: /**
26: * Credit Memo DAO Interface. Defines DB access methods that a CreditMemoDaoImpl must implement.
27: */
28: public interface CreditMemoDao {
29:
30: /**
31: * Get all the credit memos that need to be extracted
32: *
33: * @param chartCode - if not null, limit results to a single chart
34: * @return - Iterator of credit memos
35: */
36: public Iterator<CreditMemoDocument> getCreditMemosToExtract(
37: String chartCode);
38:
39: /**
40: * Get all the credit memos that need to be extracted for a particular vendor record.
41: *
42: * @param chartCode - if not null, limit results to a single chart
43: * @param vendorHeaderGeneratedIdentifier
44: * @param vendorDetailAssignedIdentifier
45: * @return - Iterator of credit memos
46: */
47: public Iterator<CreditMemoDocument> getCreditMemosToExtractByVendor(
48: String chartCode, VendorGroupingHelper vendor);
49:
50: /**
51: * This method tests for a duplicate entry of a credit memo by the combination of vendorNumber HeaderId, vendorNumber and
52: * creditMemoNumber. This method accepts the three values as arguments, and returns a boolean, describing whether a duplicate
53: * exists in the system or not.
54: *
55: * @param vendorNumberHeaderId - vendor number header id
56: * @param vendorNumber - the composite two-part vendorNumber (headerId-detailId)
57: * @param creditMemoNumber - the vendor-supplied creditMemoNumber
58: * @return boolean - true if a match exists in the db, false if not
59: */
60: public boolean duplicateExists(Integer vendorNumberHeaderId,
61: Integer vendorNumberDetailId, String creditMemoNumber);
62:
63: /**
64: * This method tests for a duplicate entry of a credit memo by the combination of vendor number header id, vendor detail id,
65: * date and amount. This method accepts the values as arguments, and returns a boolean, describing whether a duplicate exists in
66: * the system or not.
67: *
68: * @param vendorNumberHeaderId
69: * @param vendorNumberDetailId
70: * @param date - date of transaction
71: * @param amount - amount of transaction
72: * @return boolean - true if a match exists in the db, false if not
73: */
74: public boolean duplicateExists(Integer vendorNumberHeaderId,
75: Integer vendorNumberDetailId, Date date, KualiDecimal amount);
76:
77: /**
78: * This method returns a credit memo document number by id.
79: *
80: * @param id - credit memo id
81: * @return - document number
82: */
83: public String getDocumentNumberByCreditMemoId(Integer id);
84: }
|