1 /*
2 * Copyright 2007 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.module.purap.document.dataaccess;
17
18 import org.kuali.ole.module.purap.businessobject.AutoClosePurchaseOrderView;
19 import org.kuali.ole.module.purap.document.PurchaseOrderDocument;
20
21 import java.util.List;
22
23
24 /**
25 * Purchase Order DAO Interface.
26 */
27 public interface PurchaseOrderDao {
28
29 public Integer getPurchaseOrderIdForCurrentPurchaseOrderByRelatedDocId(Integer accountsPayablePurchasingDocumentLinkIdentifier);
30
31 public PurchaseOrderDocument getCurrentPurchaseOrder(Integer id);
32
33 /**
34 * Retrieves the Purchase Order Document's document number using the purapDocumentIdentifier as criteria
35 *
36 * @param id - purapDocument Identifier
37 * @return - the document number of the purchase order found or null if no purchase order found
38 */
39 public String getDocumentNumberForPurchaseOrderId(Integer id);
40
41 /**
42 * Retrieves the current Purchase Order Document's document number by the purapDocumentIdentifier.
43 *
44 * @param id - purapDocument Identifier
45 * @return - the document number of the purchase order found or null if no purchase order found
46 */
47 public String getDocumentNumberForCurrentPurchaseOrder(Integer id);
48
49 /**
50 * Retrieves the oldest purchase order's (defined by the one having the smallest document number) document number.
51 *
52 * @param id - the purapDocumentIdentifier.
53 * @return - the document numbers of the purchase order found or null if none found
54 */
55 public String getOldestPurchaseOrderDocumentNumber(Integer id);
56
57 /**
58 * Determines if the purchase order item exists on the current purchase order.
59 *
60 * @param poItemLineNumber
61 * @param docNumber
62 * @return
63 */
64 public boolean itemExistsOnPurchaseOrder(Integer poItemLineNumber, String docNumber);
65
66 /**
67 * This method gets all the PurchaseOrderView objects that relate to POs
68 * with no recurring payment type, status of 'OPEN', and total encumbrance
69 * of 0 that do not have any of the excluded vendor choice codes.
70 *
71 * @param excludedVendorChoiceCodes - list of strings of excluded vendor choice codes
72 * @return List of PurchaseOrderAutoClose objects
73 */
74 public List<AutoClosePurchaseOrderView> getAllOpenPurchaseOrders(List<String> excludedVendorChoiceCodes);
75
76 /**
77 * This method gets all the PurchaseOrderView objects that relate to POs
78 * with a recurring payment type, status of 'OPEN', and that do not have any
79 * of the excluded vendor choice codes.
80 *
81 * @param excludedVendorChoiceCodes - list of strings of excluded vendor choice codes
82 * @return List of PurchaseOrderAutoClose objects
83 */
84 public List<AutoClosePurchaseOrderView> getAutoCloseRecurringPurchaseOrders(List<String> excludedVendorChoiceCodes);
85
86 /**
87 * This method gets all the Purchase orders that are waiting for faxing
88 *
89 * @return List of POs
90 */
91 public List<PurchaseOrderDocument> getPendingPurchaseOrdersForFaxing();
92 }