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.time.roles.dao; 17 18 import java.sql.Date; 19 import java.util.List; 20 21 import org.kuali.hr.time.roles.TkRole; 22 23 public interface TkRoleDao { 24 25 /** 26 * Returns a list of roles matching the specified criteria. Nulls are valid 27 * as parameters, see parameter comments. 28 * 29 * @param principalId (optional - null is allowed) 30 * @param asOfDate The effective date (required) 31 * @param roleName (optional - null is allowed) 32 * @param workArea (optional - null is allowed) 33 * @param department (optional - null is allowed) 34 * @param chart (optional - null is allowed) 35 * @return A List<TkRole> of roles matching the specified parameters. 36 */ 37 public List<TkRole> findRoles(String principalId, Date asOfDate, String roleName, Long workArea, String department, String chart); 38 /** 39 * 40 * @param positionNumber 41 * @param asOfDate 42 * @param roleName 43 * @param workArea 44 * @param department 45 * @param chart 46 * @return 47 */ 48 public List<TkRole> findPositionRoles(String positionNumber, Date asOfDate, String roleName, Long workArea, String department, String chart); 49 /** 50 * Returns a list of inactive roles matching the specified criteria. Nulls are valid 51 * as parameters, see parameter comments. 52 * 53 * @param principalId (optional - null is allowed) 54 * @param asOfDate The effective date (required) 55 * @param roleName (optional - null is allowed) 56 * @param workArea (optional - null is allowed) 57 * @param department (optional - null is allowed) 58 * @param chart (optional - null is allowed) 59 * @return A List<TkRole> of roles matching the specified parameters. 60 */ 61 public List<TkRole> findInActiveRoles(String principalId, Date asOfDate, String roleName, Long workArea, String department, String chart); 62 63 /** 64 * A role to update/save 65 * @param role 66 */ 67 public void saveOrUpdateRole(TkRole role); 68 69 /** 70 * A list of roles to save. 71 * @param roles 72 * @return 73 */ 74 public void saveOrUpdateRoles(List<TkRole> roles); 75 76 public TkRole getRole(String tkRoleId); 77 78 public TkRole getRolesByPosition(String positionNumber); 79 80 public TkRole getInactiveRolesByPosition(String positionNumber); 81 82 public List<TkRole> getPositionRolesForWorkArea(Long workArea, Date asOfDate); 83 84 }