1 /** 2 * Copyright 2004-2013 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.hr.time.earncodegroup.service; 17 18 import org.kuali.hr.time.earncodegroup.EarnCodeGroup; 19 import org.kuali.hr.time.timesheet.TimesheetDocument; 20 21 import java.sql.Date; 22 import java.util.List; 23 import java.util.Set; 24 25 public interface EarnCodeGroupService { 26 /** 27 * Fetch earn group for a particular date 28 * @param earnCodeGroup 29 * @param asOfDate 30 * @return 31 */ 32 public EarnCodeGroup getEarnCodeGroup(String earnCodeGroup, Date asOfDate); 33 /** 34 * Fetch earn group for an earn code as of a particular date 35 * @param earnCode 36 * @param asOfDate 37 * @return 38 */ 39 public EarnCodeGroup getEarnCodeGroupForEarnCode(String earnCode, Date asOfDate); 40 /** 41 * Fetch Set of earn codes for earn group 42 * @param earnGroup 43 * @param asOfDate 44 * @return 45 */ 46 public Set<String> getEarnCodeListForEarnCodeGroup(String earnCodeGroup, Date asOfDate); 47 /** 48 * Used to get earn group that this earn code belongs on in context to the summary 49 * CAUTION this is used only for the timesheet summary 50 */ 51 public EarnCodeGroup getEarnCodeGroupSummaryForEarnCode(String earnCode, Date asOfDate); 52 53 public EarnCodeGroup getEarnCodeGroup(String hrEarnCodeGroupId); 54 55 /** 56 * Returns list of warning text from earn group that is used by time blocks of the timesheetDocument 57 * @param timesheetDocument 58 * @return 59 */ 60 public List<String> warningTextFromEarnCodeGroupsOfDocument(TimesheetDocument timesheetDocument); 61 /** 62 * get the count of earn groups by given earnGroup 63 * @param earnGroup 64 * @return int 65 */ 66 public int getEarnCodeGroupCount(String earnGroup); 67 /** 68 * get the count of newer version of earn groups by given earnGroup and date 69 * @param earnGroup 70 * @param effdt 71 * @return int 72 */ 73 public int getNewerEarnCodeGroupCount(String earnGroup, Date effdt); 74 }