001 /** 002 * Copyright 2004-2012 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.roles.dao; 017 018 import java.sql.Date; 019 import java.util.List; 020 021 import org.kuali.hr.time.roles.TkRole; 022 023 public interface TkRoleDao { 024 025 /** 026 * Returns a list of roles matching the specified criteria. Nulls are valid 027 * as parameters, see parameter comments. 028 * 029 * @param principalId (optional - null is allowed) 030 * @param asOfDate The effective date (required) 031 * @param roleName (optional - null is allowed) 032 * @param workArea (optional - null is allowed) 033 * @param department (optional - null is allowed) 034 * @param chart (optional - null is allowed) 035 * @return A List<TkRole> of roles matching the specified parameters. 036 */ 037 public List<TkRole> findRoles(String principalId, Date asOfDate, String roleName, Long workArea, String department, String chart); 038 /** 039 * 040 * @param positionNumber 041 * @param asOfDate 042 * @param roleName 043 * @param workArea 044 * @param department 045 * @param chart 046 * @return 047 */ 048 public List<TkRole> findPositionRoles(String positionNumber, Date asOfDate, String roleName, Long workArea, String department, String chart); 049 /** 050 * Returns a list of inactive roles matching the specified criteria. Nulls are valid 051 * as parameters, see parameter comments. 052 * 053 * @param principalId (optional - null is allowed) 054 * @param asOfDate The effective date (required) 055 * @param roleName (optional - null is allowed) 056 * @param workArea (optional - null is allowed) 057 * @param department (optional - null is allowed) 058 * @param chart (optional - null is allowed) 059 * @return A List<TkRole> of roles matching the specified parameters. 060 */ 061 public List<TkRole> findInActiveRoles(String principalId, Date asOfDate, String roleName, Long workArea, String department, String chart); 062 063 /** 064 * A role to update/save 065 * @param role 066 */ 067 public void saveOrUpdateRole(TkRole role); 068 069 /** 070 * A list of roles to save. 071 * @param roles 072 * @return 073 */ 074 public void saveOrUpdateRoles(List<TkRole> roles); 075 076 public TkRole getRole(String tkRoleId); 077 078 public TkRole getRolesByPosition(String positionNumber); 079 080 public TkRole getInactiveRolesByPosition(String positionNumber); 081 082 public List<TkRole> getPositionRolesForWorkArea(Long workArea, Date asOfDate); 083 084 }