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.sys.batch.dataaccess; 017 018 import java.util.Collection; 019 import java.util.Map; 020 import java.util.Set; 021 022 import org.kuali.rice.kns.bo.PersistableBusinessObject; 023 024 /** 025 * Provides data access methods for the fiscal year maker process 026 */ 027 public interface FiscalYearMakersDao { 028 029 /** 030 * Clears out records for the new year and object being copied 031 * 032 * @param baseYear fiscal year that we are copying 033 * @param objectFiscalYearMaker FiscalYearMaker implementation for the object we are copying 034 */ 035 public void deleteNewYearRows(Integer baseYear, FiscalYearMaker objectFiscalYearMaker); 036 037 /** 038 * Populates records for the new year and object 039 * 040 * @param baseYear fiscal year that we are copying 041 * @param objectFiscalYearMaker FiscalYearMaker implementation for the object we are copying 042 * @param replaceMode indicates whether records found for the new year should be replaced or left alone 043 * @param parentKeysWritten Map that contains class as key and Set of of primary key strings representing records written 044 * @param isParentClass indicates whether the class being copied is a parent to another FYM class that will be copied 045 * @return Collection of error messages encountered while attempting to copy a record 046 */ 047 public Collection<String> createNewYearRows(Integer baseYear, FiscalYearMaker objectFiscalYearMaker, boolean replaceMode, Map<Class<? extends PersistableBusinessObject>, Set<String>> parentKeysWritten, boolean isParentClass); 048 049 }