View Javadoc

1   /**
2    * Copyright 2004-2012 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.earncodesec.service;
17  
18  import org.kuali.hr.earncodesec.EarnCodeSecurity;
19  import org.springframework.cache.annotation.Cacheable;
20  
21  import java.util.Date;
22  import java.util.List;
23  
24  public interface EarnCodeSecurityService {
25  
26  	/** This should handle wild cards on department and hr_sal_group.
27  	 * 
28  	 */
29      @Cacheable(value= EarnCodeSecurity.CACHE_NAME,
30              key="'department=' + #p0" +
31                      "+ '|' + 'hrSalGroup=' + #p1" +
32                      "+ '|' + 'location=' + #p2" +
33                      "+ '|' + 'asOfDate=' + #p3")
34  	public List<EarnCodeSecurity> getEarnCodeSecurities(String department, String hrSalGroup, String location, Date asOfDate);
35  	
36  	/**
37  	 * Fetch department earn code by id
38  	 * @param hrDeptEarnCodeId
39  	 * @return
40  	 */
41      @Cacheable(value= EarnCodeSecurity.CACHE_NAME, key="'hrEarnCodeSecId=' + #p0")
42  	public EarnCodeSecurity getEarnCodeSecurity(String hrEarnCodeSecId);
43  	
44  	public List<EarnCodeSecurity> searchEarnCodeSecurities(String dept, String salGroup, String earnCode, String location,
45                                                             java.sql.Date fromEffdt, java.sql.Date toEffdt, String active, String showHistory);
46  	
47      /**
48       * get the count of Department Earn Code by given parameters
49       * @param earnGroup
50       * @return int
51       */
52  	public int getEarnCodeSecurityCount(String dept, String salGroup, String earnCode, String employee, String approver, String location,
53                                          String active, java.sql.Date effdt, String hrDeptEarnCodeId);
54  	
55      /**
56       * get the count of newer versions of the given earnCode
57       * @param earnCode
58       * @param effdt
59       * @return int
60       */
61  	public int getNewerEarnCodeSecurityCount(String earnCode, Date effdt);
62  }