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.lm.earncodesec.service;
017
018 import org.kuali.hr.lm.earncodesec.EarnCodeSecurity;
019 import org.springframework.cache.annotation.Cacheable;
020
021 import java.util.Date;
022 import java.util.List;
023
024 public interface EarnCodeSecurityService {
025
026 /** This should handle wild cards on department and hr_sal_group.
027 *
028 */
029 @Cacheable(value= EarnCodeSecurity.CACHE_NAME,
030 key="'department=' + #p0" +
031 "+ '|' + 'hrSalGroup=' + #p1" +
032 "+ '|' + 'location=' + #p2" +
033 "+ '|' + 'asOfDate=' + #p3")
034 public List<EarnCodeSecurity> getEarnCodeSecurities(String department, String hrSalGroup, String location, Date asOfDate);
035
036 /**
037 * Fetch department earn code by id
038 * @param hrDeptEarnCodeId
039 * @return
040 */
041 @Cacheable(value= EarnCodeSecurity.CACHE_NAME, key="'hrEarnCodeSecId=' + #p0")
042 public EarnCodeSecurity getEarnCodeSecurity(String hrEarnCodeSecId);
043
044 public List<EarnCodeSecurity> searchEarnCodeSecurities(String dept, String salGroup, String earnCode, String location,
045 java.sql.Date fromEffdt, java.sql.Date toEffdt, String active, String showHistory);
046
047 /**
048 * get the count of Department Earn Code by given parameters
049 * @param earnGroup
050 * @return int
051 */
052 public int getEarnCodeSecurityCount(String dept, String salGroup, String earnCode, String employee, String approver, String location,
053 String active, java.sql.Date effdt,String hrDeptEarnCodeId);
054
055 /**
056 * get the count of newer versions of the given earnCode
057 * @param earnCode
058 * @param effdt
059 * @return int
060 */
061 public int getNewerEarnCodeSecurityCount(String earnCode, Date effdt);
062 }