View Javadoc

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.time.overtime.weekly.rule;
17  
18  import java.math.BigDecimal;
19  
20  import org.kuali.hr.core.KPMEConstants;
21  import org.kuali.hr.time.earncode.EarnCode;
22  import org.kuali.hr.time.earncodegroup.EarnCodeGroup;
23  import org.kuali.hr.time.rule.TkRule;
24  
25  public class WeeklyOvertimeRule extends TkRule {
26  
27  	private static final long serialVersionUID = 5229797885418317405L;
28  
29  	public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "WeeklyOvertimeRule";
30  
31  	private String tkWeeklyOvertimeRuleId;
32  	private String maxHoursEarnGroup;
33  	private String convertFromEarnGroup;
34  	private String convertToEarnCode;
35  	private BigDecimal step;
36  	private BigDecimal maxHours;
37  	private String userPrincipalId;
38  	private Boolean ovtEarnCode;
39  	
40  	private Long tkWeeklyOvertimeRuleGroupId = 1L;
41  	
42  	private EarnCodeGroup maxHoursEarnGroupObj;
43  	private EarnCodeGroup convertFromEarnGroupObj;
44  	private EarnCode convertToEarnCodeObj;
45  	
46  
47  	public String getTkWeeklyOvertimeRuleId() {
48  		return tkWeeklyOvertimeRuleId;
49  	}
50  
51  	public void setTkWeeklyOvertimeRuleId(String tkWeeklyOvertimeRuleId) {
52  		this.tkWeeklyOvertimeRuleId = tkWeeklyOvertimeRuleId;
53  	}
54  
55  	public String getMaxHoursEarnGroup() {
56  		return maxHoursEarnGroup;
57  	}
58  
59  	public void setMaxHoursEarnGroup(String maxHoursEarnGroup) {
60  		this.maxHoursEarnGroup = maxHoursEarnGroup;
61  	}
62  
63  	public String getConvertFromEarnGroup() {
64  		return convertFromEarnGroup;
65  	}
66  
67  	public void setConvertFromEarnGroup(String convertFromEarnGroup) {
68  		this.convertFromEarnGroup = convertFromEarnGroup;
69  	}
70  
71  	public String getConvertToEarnCode() {
72  		return convertToEarnCode;
73  	}
74  
75  	public void setConvertToEarnCode(String convertToEarnCode) {
76  		this.convertToEarnCode = convertToEarnCode;
77  	}
78  
79  	public BigDecimal getStep() {
80  		return step;
81  	}
82  
83  	public void setStep(BigDecimal step) {
84  		this.step = step;
85  	}
86  
87  	public BigDecimal getMaxHours() {
88  		return maxHours;
89  	}
90  
91  	public void setMaxHours(BigDecimal maxHours) {
92  		this.maxHours = maxHours;
93  	}
94  
95  	public String getUserPrincipalId() {
96  		return userPrincipalId;
97  	}
98  
99  	public void setUserPrincipalId(String userPrincipalId) {
100 		this.userPrincipalId = userPrincipalId;
101 	}
102 	
103 	
104 	public Boolean getOvtEarnCode() {
105 		return ovtEarnCode;
106 	}
107 
108 	public void setOvtEarnCode(Boolean ovtEarnCode) {
109 		this.ovtEarnCode = ovtEarnCode;
110 	}
111 
112 	public EarnCodeGroup getMaxHoursEarnGroupObj() {
113 		return maxHoursEarnGroupObj;
114 	}
115 
116 	public void setMaxHoursEarnGroupObj(EarnCodeGroup maxHoursEarnGroupObj) {
117 		this.maxHoursEarnGroupObj = maxHoursEarnGroupObj;
118 	}
119 
120 	public EarnCodeGroup getConvertFromEarnGroupObj() {
121 		return convertFromEarnGroupObj;
122 	}
123 
124 	public void setConvertFromEarnGroupObj(EarnCodeGroup convertFromEarnGroupObj) {
125 		this.convertFromEarnGroupObj = convertFromEarnGroupObj;
126 	}
127 
128 	public EarnCode getConvertToEarnCodeObj() {
129 		return convertToEarnCodeObj;
130 	}
131 
132 	public void setConvertToEarnCodeObj(EarnCode convertToEarnCodeObj) {
133 		this.convertToEarnCodeObj = convertToEarnCodeObj;
134 	}
135 
136 	public Long getTkWeeklyOvertimeRuleGroupId() {
137 		return tkWeeklyOvertimeRuleGroupId;
138 	}
139 
140 	public void setTkWeeklyOvertimeRuleGroupId(Long tkWeeklyOvertimeRuleGroupId) {
141 		this.tkWeeklyOvertimeRuleGroupId = tkWeeklyOvertimeRuleGroupId;
142 	}
143 
144 	@Override
145 	public String getUniqueKey() {
146 		return convertFromEarnGroup + "_" + maxHoursEarnGroup;
147 	}
148 
149 	@Override
150 	public String getId() {
151 		return getTkWeeklyOvertimeRuleId();
152 	}
153 
154 	@Override
155 	public void setId(String id) {
156 		setTkWeeklyOvertimeRuleId(id);
157 	}
158 }