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.kpme.tklm.time.rules.overtime.weekly;
017
018 import java.math.BigDecimal;
019
020 import org.kuali.kpme.core.earncode.EarnCode;
021 import org.kuali.kpme.core.earncode.group.EarnCodeGroup;
022 import org.kuali.kpme.tklm.api.time.rules.overtime.weekly.WeeklyOvertimeRuleContract;
023 import org.kuali.kpme.tklm.common.TkConstants;
024 import org.kuali.kpme.tklm.time.rules.TkRule;
025
026 public class WeeklyOvertimeRule extends TkRule implements WeeklyOvertimeRuleContract {
027
028 private static final long serialVersionUID = 5229797885418317405L;
029
030 public static final String CACHE_NAME = TkConstants.CacheNamespace.NAMESPACE_PREFIX + "WeeklyOvertimeRule";
031
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 EarnCodeGroup maxHoursEarnGroupObj;
044 private EarnCodeGroup 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 public String getConvertToEarnCode() {
073 return convertToEarnCode;
074 }
075
076 public void setConvertToEarnCode(String convertToEarnCode) {
077 this.convertToEarnCode = convertToEarnCode;
078 }
079
080 public BigDecimal getStep() {
081 return step;
082 }
083
084 public void setStep(BigDecimal step) {
085 this.step = step;
086 }
087
088 public BigDecimal getMaxHours() {
089 return maxHours;
090 }
091
092 public void setMaxHours(BigDecimal maxHours) {
093 this.maxHours = maxHours;
094 }
095
096 public String getUserPrincipalId() {
097 return userPrincipalId;
098 }
099
100 public void setUserPrincipalId(String userPrincipalId) {
101 this.userPrincipalId = userPrincipalId;
102 }
103
104
105 public Boolean getOvtEarnCode() {
106 return ovtEarnCode;
107 }
108
109 public void setOvtEarnCode(Boolean ovtEarnCode) {
110 this.ovtEarnCode = ovtEarnCode;
111 }
112
113 public EarnCodeGroup getMaxHoursEarnGroupObj() {
114 return maxHoursEarnGroupObj;
115 }
116
117 public void setMaxHoursEarnGroupObj(EarnCodeGroup maxHoursEarnGroupObj) {
118 this.maxHoursEarnGroupObj = maxHoursEarnGroupObj;
119 }
120
121 public EarnCodeGroup getConvertFromEarnGroupObj() {
122 return convertFromEarnGroupObj;
123 }
124
125 public void setConvertFromEarnGroupObj(EarnCodeGroup convertFromEarnGroupObj) {
126 this.convertFromEarnGroupObj = convertFromEarnGroupObj;
127 }
128
129 public EarnCode getConvertToEarnCodeObj() {
130 return convertToEarnCodeObj;
131 }
132
133 public void setConvertToEarnCodeObj(EarnCode convertToEarnCodeObj) {
134 this.convertToEarnCodeObj = convertToEarnCodeObj;
135 }
136
137 public Long getTkWeeklyOvertimeRuleGroupId() {
138 return tkWeeklyOvertimeRuleGroupId;
139 }
140
141 public void setTkWeeklyOvertimeRuleGroupId(Long tkWeeklyOvertimeRuleGroupId) {
142 this.tkWeeklyOvertimeRuleGroupId = tkWeeklyOvertimeRuleGroupId;
143 }
144
145 @Override
146 public String getUniqueKey() {
147 return convertFromEarnGroup + "_" + maxHoursEarnGroup;
148 }
149
150 @Override
151 public String getId() {
152 return getTkWeeklyOvertimeRuleId();
153 }
154
155 @Override
156 public void setId(String id) {
157 setTkWeeklyOvertimeRuleId(id);
158 }
159 }