001 /**
002 * Copyright 2004-2013 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.weekly.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.time.earncode.EarnCode;
023 import org.kuali.hr.time.earngroup.EarnGroup;
024 import org.kuali.hr.time.rule.TkRule;
025
026 public class WeeklyOvertimeRule extends TkRule {
027 public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "WeeklyOvertimeRule";
028 /**
029 *
030 */
031 private static final long serialVersionUID = 1L;
032 private String tkWeeklyOvertimeRuleId;
033 private String maxHoursEarnGroup;
034 private String convertFromEarnGroup;
035 private String convertToEarnCode;
036 private BigDecimal step;
037 private BigDecimal maxHours;
038 private String userPrincipalId;
039 private Boolean ovtEarnCode;
040
041 private Long tkWeeklyOvertimeRuleGroupId = 1L;
042
043 private EarnGroup maxHoursEarnGroupObj;
044 private EarnGroup convertFromEarnGroupObj;
045 private EarnCode convertToEarnCodeObj;
046
047
048 public String getTkWeeklyOvertimeRuleId() {
049 return tkWeeklyOvertimeRuleId;
050 }
051
052 public void setTkWeeklyOvertimeRuleId(String tkWeeklyOvertimeRuleId) {
053 this.tkWeeklyOvertimeRuleId = tkWeeklyOvertimeRuleId;
054 }
055
056 public String getMaxHoursEarnGroup() {
057 return maxHoursEarnGroup;
058 }
059
060 public void setMaxHoursEarnGroup(String maxHoursEarnGroup) {
061 this.maxHoursEarnGroup = maxHoursEarnGroup;
062 }
063
064 public String getConvertFromEarnGroup() {
065 return convertFromEarnGroup;
066 }
067
068 public void setConvertFromEarnGroup(String convertFromEarnGroup) {
069 this.convertFromEarnGroup = convertFromEarnGroup;
070 }
071
072
073
074 public String getConvertToEarnCode() {
075 return convertToEarnCode;
076 }
077
078 public void setConvertToEarnCode(String convertToEarnCode) {
079 this.convertToEarnCode = convertToEarnCode;
080 }
081
082 public Date getEffectiveDate() {
083 return effectiveDate;
084 }
085
086 public void setEffectiveDate(Date effectiveDate) {
087 this.effectiveDate = effectiveDate;
088 }
089
090 public BigDecimal getStep() {
091 return step;
092 }
093
094 public void setStep(BigDecimal step) {
095 this.step = step;
096 }
097
098 public BigDecimal getMaxHours() {
099 return maxHours;
100 }
101
102 public void setMaxHours(BigDecimal maxHours) {
103 this.maxHours = maxHours;
104 }
105
106 public String getUserPrincipalId() {
107 return userPrincipalId;
108 }
109
110 public void setUserPrincipalId(String userPrincipalId) {
111 this.userPrincipalId = userPrincipalId;
112 }
113
114
115 public Boolean getOvtEarnCode() {
116 return ovtEarnCode;
117 }
118
119 public void setOvtEarnCode(Boolean ovtEarnCode) {
120 this.ovtEarnCode = ovtEarnCode;
121 }
122
123 public EarnGroup getMaxHoursEarnGroupObj() {
124 return maxHoursEarnGroupObj;
125 }
126
127 public void setMaxHoursEarnGroupObj(EarnGroup maxHoursEarnGroupObj) {
128 this.maxHoursEarnGroupObj = maxHoursEarnGroupObj;
129 }
130
131 public EarnGroup getConvertFromEarnGroupObj() {
132 return convertFromEarnGroupObj;
133 }
134
135 public void setConvertFromEarnGroupObj(EarnGroup convertFromEarnGroupObj) {
136 this.convertFromEarnGroupObj = convertFromEarnGroupObj;
137 }
138
139 public EarnCode getConvertToEarnCodeObj() {
140 return convertToEarnCodeObj;
141 }
142
143 public void setConvertToEarnCodeObj(EarnCode convertToEarnCodeObj) {
144 this.convertToEarnCodeObj = convertToEarnCodeObj;
145 }
146
147 public Long getTkWeeklyOvertimeRuleGroupId() {
148 return tkWeeklyOvertimeRuleGroupId;
149 }
150
151 public void setTkWeeklyOvertimeRuleGroupId(Long tkWeeklyOvertimeRuleGroupId) {
152 this.tkWeeklyOvertimeRuleGroupId = tkWeeklyOvertimeRuleGroupId;
153 }
154
155 @Override
156 public String getUniqueKey() {
157 return convertFromEarnGroup + "_" + maxHoursEarnGroup;
158 }
159
160 @Override
161 public String getId() {
162 return getTkWeeklyOvertimeRuleId();
163 }
164
165 @Override
166 public void setId(String id) {
167 setTkWeeklyOvertimeRuleId(id);
168 }
169 }