001 /** 002 * Copyright 2004-2013 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.hr.time.earncodegroup.service; 017 018 import org.kuali.hr.time.earncodegroup.EarnCodeGroup; 019 import org.kuali.hr.time.timesheet.TimesheetDocument; 020 021 import java.sql.Date; 022 import java.util.List; 023 import java.util.Set; 024 025 public interface EarnCodeGroupService { 026 /** 027 * Fetch earn group for a particular date 028 * @param earnCodeGroup 029 * @param asOfDate 030 * @return 031 */ 032 public EarnCodeGroup getEarnCodeGroup(String earnCodeGroup, Date asOfDate); 033 /** 034 * Fetch earn group for an earn code as of a particular date 035 * @param earnCode 036 * @param asOfDate 037 * @return 038 */ 039 public EarnCodeGroup getEarnCodeGroupForEarnCode(String earnCode, Date asOfDate); 040 /** 041 * Fetch Set of earn codes for earn group 042 * @param earnGroup 043 * @param asOfDate 044 * @return 045 */ 046 public Set<String> getEarnCodeListForEarnCodeGroup(String earnCodeGroup, Date asOfDate); 047 /** 048 * Used to get earn group that this earn code belongs on in context to the summary 049 * CAUTION this is used only for the timesheet summary 050 */ 051 public EarnCodeGroup getEarnCodeGroupSummaryForEarnCode(String earnCode, Date asOfDate); 052 053 public EarnCodeGroup getEarnCodeGroup(String hrEarnCodeGroupId); 054 055 /** 056 * Returns list of warning text from earn group that is used by time blocks of the timesheetDocument 057 * @param timesheetDocument 058 * @return 059 */ 060 public List<String> warningTextFromEarnCodeGroupsOfDocument(TimesheetDocument timesheetDocument); 061 /** 062 * get the count of earn groups by given earnGroup 063 * @param earnGroup 064 * @return int 065 */ 066 public int getEarnCodeGroupCount(String earnGroup); 067 /** 068 * get the count of newer version of earn groups by given earnGroup and date 069 * @param earnGroup 070 * @param effdt 071 * @return int 072 */ 073 public int getNewerEarnCodeGroupCount(String earnGroup, Date effdt); 074 }