001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.kfs.module.purap.dataaccess; 017 018 import java.util.List; 019 020 import org.kuali.kfs.module.purap.businessobject.ElectronicInvoiceItemMapping; 021 import org.kuali.kfs.module.purap.businessobject.ItemType; 022 023 /** 024 * @author This dao and its implementation is used for data retrieval/insertion/deletion by the 025 * ElectronicInvoiceItemMappingService which is used by the maintenance page for Electronic Invoice Item Mapping. 026 */ 027 public interface ElectronicInvoiceItemMappingDao { 028 029 /** 030 * Save a ElectronicInvoiceItemMapping. 031 * 032 * @param row ElectronicInvoiceItemMapping to save 033 */ 034 public void save(ElectronicInvoiceItemMapping row); 035 036 /** 037 * Get list of all ElectronicInvoiceItemMappings 038 */ 039 public List getAll(); 040 041 /** 042 * Get an ElectronicInvoiceItemMapping by primary key. 043 * 044 * @param id the id to lookup 045 */ 046 public ElectronicInvoiceItemMapping getById(String id); 047 048 /** 049 * Get an ElectronicInvoiceItemMapping based on the 3 unique keys. This method is used to ensure that the user is not inserting 050 * a row that contains the same 3 keys that have already existed in the database 051 * 052 * @param headerId the vendorHeaderGeneratedId 053 * @param detailId the vendorDetailAssignedId 054 * @param invoiceTypeCode the electronicInvoiceTypeCode 055 * @return 056 */ 057 public ElectronicInvoiceItemMapping getByUniqueKeys(Integer headerId, Integer detailId, String invoiceTypeCode); 058 059 /** 060 * Delete a ElectronicInvoiceItemMapping. 061 * 062 * @param row 063 */ 064 public void delete(ElectronicInvoiceItemMapping row); 065 066 /** 067 * This method returns a list of all Item Types from the PUR_AP_ITM_TYP_T table 068 * 069 * @return 070 */ 071 public List getAllItemTypes(); 072 073 public ItemType getItemTypeByCode(String code); 074 }