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.overtime.daily.rule; 017 018 import java.math.BigDecimal; 019 import java.sql.Date; 020 021 import org.kuali.hr.core.KPMEConstants; 022 import org.kuali.hr.location.Location; 023 import org.kuali.hr.time.department.Department; 024 import org.kuali.hr.time.earncode.EarnCode; 025 import org.kuali.hr.time.earngroup.EarnGroup; 026 import org.kuali.hr.time.paytype.PayType; 027 import org.kuali.hr.time.rule.TkRule; 028 import org.kuali.hr.time.task.Task; 029 import org.kuali.hr.time.workarea.WorkArea; 030 031 032 public class DailyOvertimeRule extends TkRule { 033 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "DailyOvertimeRule"; 034 private static final long serialVersionUID = 1L; 035 private String tkDailyOvertimeRuleId; 036 037 private String fromEarnGroup; 038 private String earnCode; 039 040 private String location; 041 private String paytype; 042 private String dept; 043 private Long workArea; 044 045 private BigDecimal maxGap; 046 private BigDecimal minHours; 047 private String userPrincipalId; 048 private boolean history; 049 private Boolean ovtEarnCode; 050 051 private String tkWorkAreaId; 052 private String hrDeptId; 053 private String hrLocationId; 054 055 private Task taskObj; 056 private WorkArea workAreaObj; 057 private Department departmentObj; 058 private PayType payTypeObj; 059 060 private EarnGroup fromEarnGroupObj; 061 private EarnCode earnCodeObj; 062 private Location locationObj; 063 064 public String getTkDailyOvertimeRuleId() { 065 return tkDailyOvertimeRuleId; 066 } 067 068 public void setTkDailyOvertimeRuleId(String tkDailyOvertimeRuleId) { 069 this.tkDailyOvertimeRuleId = tkDailyOvertimeRuleId; 070 } 071 072 public String getLocation() { 073 return location; 074 } 075 076 public void setLocation(String location) { 077 this.location = location; 078 } 079 080 public BigDecimal getMaxGap() { 081 return maxGap; 082 } 083 084 public void setMaxGap(BigDecimal maxGap) { 085 this.maxGap = maxGap; 086 } 087 088 public Date getEffectiveDate() { 089 return effectiveDate; 090 } 091 092 public void setEffectiveDate(Date effectiveDate) { 093 this.effectiveDate = effectiveDate; 094 } 095 096 public String getUserPrincipalId() { 097 return userPrincipalId; 098 } 099 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 }