1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.roles.service;
17
18 import org.kuali.hr.time.roles.TkRole;
19 import org.kuali.hr.time.roles.TkRoleGroup;
20 import org.springframework.cache.annotation.CacheEvict;
21 import org.springframework.cache.annotation.Cacheable;
22
23 import java.util.List;
24
25 public interface TkRoleGroupService {
26 @CacheEvict(value={TkRole.CACHE_NAME, TkRoleGroup.CACHE_NAME}, allEntries = true)
27 public void saveOrUpdate(TkRoleGroup roleGroup);
28
29
30
31
32 @CacheEvict(value={TkRole.CACHE_NAME, TkRoleGroup.CACHE_NAME}, allEntries = true)
33 public void saveOrUpdate(List<TkRoleGroup> roleGroups);
34
35
36
37
38
39 @Cacheable(value= TkRoleGroup.CACHE_NAME, key="'principalId=' + #p0")
40 public TkRoleGroup getRoleGroup(String principalId);
41
42 public void populateRoles(TkRoleGroup tkRoleGroup);
43
44 @Cacheable(value= TkRoleGroup.CACHE_NAME,
45 key="'principalId=' + #p0" +
46 "+ '|' + 'principalName=' + #p1" +
47 "+ '|' + 'workArea=' + #p2" +
48 "+ '|' + 'dept=' + #p3" +
49 "+ '|' + 'roleName=' + #p4")
50 List<TkRoleGroup> getRoleGroups(String principalId, String principalName, String workArea, String dept, String roleName);
51 }