1 /**
2 * Copyright 2004-2013 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.job.dao;
17
18 import org.kuali.hr.job.Job;
19
20 import java.util.Date;
21 import java.util.List;
22
23 public interface JobDao {
24
25 /**
26 * Saves or Updates a Job
27 * @param job
28 */
29 public void saveOrUpdate(Job job);
30 /**
31 * Saves or updates a job list
32 * @param jobList
33 */
34 public void saveOrUpdate(List<Job> jobList);
35
36 /**
37 * Provides a list of current jobs that are valid relative to the provided effective date.
38 * Timestamp of row creation is taken into account when two rows with the same job number
39 * have the same effective date.
40 *
41 * @param principalId
42 * @param payPeriodEndDate
43 * @return
44 */
45 public List<Job> getJobs(String principalId, Date payPeriodEndDate);
46 /**
47 *
48 * @param principalId
49 * @param jobNumber
50 * @param asOfDate
51 * @return a Job per the critieria passed in
52 */
53 public Job getJob(String principalId, Long jobNumber, Date asOfDate);
54
55 /**
56 * Get Primary Job as indicated by primary indicator on Job table
57 * @param principalId
58 * @param payPeriodEndDate
59 * @return
60 */
61 public Job getPrimaryJob(String principalId, Date payPeriodEndDate);
62 /**
63 * Fetch active jobs that are incumbents of the position
64 * @param positionNbr
65 * @param asOfDate
66 * @return
67 */
68 public List<Job> getActiveJobsForPosition(String positionNbr, Date asOfDate);
69
70 /**
71 * Fetch active jobs that are incumbents of the payType
72 * @param hrPayType
73 * @param asOfDate
74 * @return
75 */
76 public List<Job> getActiveJobsForPayType(String hrPayType, Date asOfDate);
77
78 /**
79 * Get job based on id
80 * @param hrJobId
81 * @return
82 */
83 public Job getJob(String hrJobId);
84
85 /**
86 * Get job with max(jobNumber) for a certain principalId
87 * @param principalId
88 * @return
89 */
90 public Job getMaxJob(String principalId);
91
92 List<Job> getJobs(String principalId, String jobNumber, String dept, String positionNbr, String payType, Date fromEffdt, Date toEffdt, String active,
93 String showHistory);
94
95 /**
96 * Fetch the count of the jobs with the given principalId and jobNumber
97 * @param principalId
98 * @param jobNumber
99 * @return the count of the jobs with the given principalId and jobNumber
100 */
101 public int getJobCount(String principalId, Long jobNumber, String dept);
102 }