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.graceperiod.rule;
17  
18  import org.kuali.hr.core.KPMEConstants;
19  import org.kuali.hr.time.HrBusinessObject;
20  
21  import java.math.BigDecimal;
22  import java.sql.Timestamp;
23  import java.util.LinkedHashMap;
24  
25  
26  
27  public class GracePeriodRule extends HrBusinessObject {
28      public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "GracePeriodRule";
29  	private static final long serialVersionUID = 1L;
30  
31  	private String tkGracePeriodRuleId;
32  	private BigDecimal hourFactor;
33  	private String userPrincipalId;
34  	
35  	protected LinkedHashMap<String,Object> toStringMapper() {
36  		LinkedHashMap<String, Object> toStringMap = new LinkedHashMap<String,Object>();
37  		toStringMap.put("effDt", effectiveDate);
38  		toStringMap.put("hourFactor", hourFactor);
39  		return toStringMap;
40  	}
41  
42  	public boolean isActive() {
43  	    return active;
44  	}
45  
46  	public void setActive(boolean active) {
47  	    this.active = active;
48  	}
49  
50  	public BigDecimal getHourFactor() {
51  	    return hourFactor;
52  	}
53  
54  	public void setHourFactor(BigDecimal hourFactor) {
55  	    this.hourFactor = hourFactor;
56  	}
57  
58  
59  	public String getUserPrincipalId() {
60  	    return userPrincipalId;
61  	}
62  
63  
64  	public void setUserPrincipalId(String userPrincipalId) {
65  	    this.userPrincipalId = userPrincipalId;
66  	}
67  
68  
69  	public Timestamp getTimestamp() {
70  	    return timestamp;
71  	}
72  
73  	public void setTimestamp(Timestamp timestamp) {
74  	    this.timestamp = timestamp;
75  	}
76  
77  
78  	public String getTkGracePeriodRuleId() {
79  		return tkGracePeriodRuleId;
80  	}
81  
82  
83  	public void setTkGracePeriodRuleId(String tkGracePeriodRuleId) {
84  		this.tkGracePeriodRuleId = tkGracePeriodRuleId;
85  	}
86  
87  
88  	@Override
89  	public String getUniqueKey() {
90  		return hourFactor + "";
91  	}
92  
93  	@Override
94  	public String getId() {
95  		return getTkGracePeriodRuleId();
96  	}
97  
98  	@Override
99  	public void setId(String id) {
100 		setTkGracePeriodRuleId(id);
101 	}
102 
103 
104 }