1 /*
2 * Copyright 2008-2009 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.dataaccess;
17
18 import org.kuali.ole.module.purap.businessobject.ElectronicInvoiceItemMapping;
19 import org.kuali.ole.module.purap.businessobject.ItemType;
20
21 import java.util.List;
22
23 /**
24 * @author This dao and its implementation is used for data retrieval/insertion/deletion by the
25 * ElectronicInvoiceItemMappingService which is used by the maintenance page for Electronic Invoice Item Mapping.
26 */
27 public interface ElectronicInvoiceItemMappingDao {
28
29 /**
30 * Get list of all ElectronicInvoiceItemMappings
31 */
32 public List getAll();
33
34 /**
35 * Get an ElectronicInvoiceItemMapping by primary key.
36 *
37 * @param id the id to lookup
38 */
39 public ElectronicInvoiceItemMapping getById(String id);
40
41 /**
42 * Get an ElectronicInvoiceItemMapping based on the 3 unique keys. This method is used to ensure that the user is not inserting
43 * a row that contains the same 3 keys that have already existed in the database
44 *
45 * @param headerId the vendorHeaderGeneratedId
46 * @param detailId the vendorDetailAssignedId
47 * @param invoiceTypeCode the electronicInvoiceTypeCode
48 * @return
49 */
50 public ElectronicInvoiceItemMapping getByUniqueKeys(Integer headerId, Integer detailId, String invoiceTypeCode);
51
52 /**
53 * Delete a ElectronicInvoiceItemMapping.
54 *
55 * @param row
56 */
57 public void delete(ElectronicInvoiceItemMapping row);
58
59 /**
60 * This method returns a list of all Item Types from the PUR_AP_ITM_TYP_T table
61 *
62 * @return
63 */
64 public List getAllItemTypes();
65
66 public ItemType getItemTypeByCode(String code);
67 }