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.time.overtime.daily.rule;
17  
18  import java.math.BigDecimal;
19  import java.sql.Date;
20  
21  import org.kuali.hr.core.KPMEConstants;
22  import org.kuali.hr.location.Location;
23  import org.kuali.hr.time.department.Department;
24  import org.kuali.hr.time.earncode.EarnCode;
25  import org.kuali.hr.time.earngroup.EarnGroup;
26  import org.kuali.hr.time.paytype.PayType;
27  import org.kuali.hr.time.rule.TkRule;
28  import org.kuali.hr.time.task.Task;
29  import org.kuali.hr.time.workarea.WorkArea;
30  
31  
32  public class DailyOvertimeRule extends TkRule {
33      public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "DailyOvertimeRule";
34  	private static final long serialVersionUID = 1L;
35  	private String tkDailyOvertimeRuleId;
36  
37  	private String fromEarnGroup;
38  	private String earnCode;
39  
40  	private String location;
41  	private String paytype;
42  	private String dept;
43  	private Long workArea;
44  
45  	private BigDecimal maxGap;
46  	private BigDecimal minHours;
47  	private String userPrincipalId;
48  	private boolean history;
49  	private Boolean ovtEarnCode;
50  
51  	private String tkWorkAreaId;
52  	private String hrDeptId;
53  	private String hrLocationId;
54  	
55  	private Task taskObj;
56  	private WorkArea workAreaObj;
57  	private Department departmentObj;
58  	private PayType payTypeObj;
59  
60      private EarnGroup fromEarnGroupObj;
61  	private EarnCode earnCodeObj;
62  	private Location locationObj;
63  
64  	public String getTkDailyOvertimeRuleId() {
65  		return tkDailyOvertimeRuleId;
66  	}
67  
68  	public void setTkDailyOvertimeRuleId(String tkDailyOvertimeRuleId) {
69  		this.tkDailyOvertimeRuleId = tkDailyOvertimeRuleId;
70  	}
71  
72  	public String getLocation() {
73  		return location;
74  	}
75  
76  	public void setLocation(String location) {
77  		this.location = location;
78  	}
79  
80  	public BigDecimal getMaxGap() {
81  		return maxGap;
82  	}
83  
84  	public void setMaxGap(BigDecimal maxGap) {
85  		this.maxGap = maxGap;
86  	}
87  
88  	public Date getEffectiveDate() {
89  		return effectiveDate;
90  	}
91  
92  	public void setEffectiveDate(Date effectiveDate) {
93  		this.effectiveDate = effectiveDate;
94  	}
95  
96  	public String getUserPrincipalId() {
97  		return userPrincipalId;
98  	}
99  
100 	public void setUserPrincipalId(String userPrincipalId) {
101 		this.userPrincipalId = userPrincipalId;
102 	}
103 
104 	public boolean isActive() {
105 		return active;
106 	}
107 
108 	public void setActive(boolean active) {
109 		this.active = active;
110 	}
111 
112 	public Department getDepartmentObj() {
113 		return departmentObj;
114 	}
115 
116 	public void setDepartmentObj(Department departmentObj) {
117 		this.departmentObj = departmentObj;
118 	}
119 
120 	public String getPaytype() {
121 		return paytype;
122 	}
123 
124 	public void setPaytype(String paytype) {
125 		this.paytype = paytype;
126 	}
127 
128 	public String getDept() {
129 		return dept;
130 	}
131 
132 	public void setDept(String dept) {
133 		this.dept = dept;
134 	}
135 
136 	public Task getTaskObj() {
137 		return taskObj;
138 	}
139 
140 	public void setTaskObj(Task taskObj) {
141 		this.taskObj = taskObj;
142 	}
143 
144 	public WorkArea getWorkAreaObj() {
145 		return workAreaObj;
146 	}
147 
148 	public void setWorkAreaObj(WorkArea workAreaObj) {
149 		this.workAreaObj = workAreaObj;
150 	}
151 
152 	public void setWorkArea(Long workArea) {
153 		this.workArea = workArea;
154 	}
155 
156 	public Long getWorkArea() {
157 		return workArea;
158 	}
159 
160 	public PayType getPayTypeObj() {
161 		return payTypeObj;
162 	}
163 
164 	public void setPayTypeObj(PayType payTypeObj) {
165 		this.payTypeObj = payTypeObj;
166 	}
167 
168 	public String getFromEarnGroup() {
169 		return fromEarnGroup;
170 	}
171 
172 	public void setFromEarnGroup(String fromEarnGroup) {
173 		this.fromEarnGroup = fromEarnGroup;
174 	}
175 
176 	public String getEarnCode() {
177 		return earnCode;
178 	}
179 
180 	public void setEarnCode(String earnCode) {
181 		this.earnCode = earnCode;
182 	}
183 
184 	public BigDecimal getMinHours() {
185 		return minHours;
186 	}
187 
188 	public void setMinHours(BigDecimal minHours) {
189 		this.minHours = minHours;
190 	}
191 
192 	public EarnGroup getFromEarnGroupObj() {
193 		return fromEarnGroupObj;
194 	}
195 
196 	public void setFromEarnGroupObj(EarnGroup fromEarnGroupObj) {
197 		this.fromEarnGroupObj = fromEarnGroupObj;
198 	}
199 
200 	public EarnCode getEarnCodeObj() {
201 		return earnCodeObj;
202 	}
203 
204 	public void setEarnCodeObj(EarnCode earnCodeObj) {
205 		this.earnCodeObj = earnCodeObj;
206 	}
207 
208 	public Location getLocationObj() {
209 		return locationObj;
210 	}
211 
212 	public void setLocationObj(Location locationObj) {
213 		this.locationObj = locationObj;
214 	}
215 
216 	public boolean isHistory() {
217 		return history;
218 	}
219 
220 	public void setHistory(boolean history) {
221 		this.history = history;
222 	}
223 
224 	public Boolean getOvtEarnCode() {
225 		return ovtEarnCode;
226 	}
227 
228 	public void setOvtEarnCode(Boolean ovtEarnCode) {
229 		this.ovtEarnCode = ovtEarnCode;
230 	}
231 
232 	public String getTkWorkAreaId() {
233 		return tkWorkAreaId;
234 	}
235 
236 	public void setTkWorkAreaId(String tkWorkAreaId) {
237 		this.tkWorkAreaId = tkWorkAreaId;
238 	}
239 
240 	public String getHrDeptId() {
241 		return hrDeptId;
242 	}
243 
244 	public void setHrDeptId(String hrDeptId) {
245 		this.hrDeptId = hrDeptId;
246 	}
247 
248 	public String getHrLocationId() {
249 		return hrLocationId;
250 	}
251 
252 	public void setHrLocationId(String hrLocationId) {
253 		this.hrLocationId = hrLocationId;
254 	}
255 
256 	@Override
257 	public String getUniqueKey() {
258 		return location + "_" + dept + "_" + workArea + "_" + paytype;
259 	}
260 
261 	@Override
262 	public String getId() {
263 		return getTkDailyOvertimeRuleId();
264 	}
265 
266 	@Override
267 	public void setId(String id) {
268 		setTkDailyOvertimeRuleId(id);
269 	}
270 
271 }