View Javadoc
1   /**
2    * Copyright 2004-2014 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.kpme.tklm.time.rules.graceperiod;
17  
18  import java.math.BigDecimal;
19  
20  import org.kuali.kpme.core.bo.HrBusinessObject;
21  import org.kuali.kpme.tklm.api.time.rules.graceperiod.GracePeriodRuleContract;
22  import org.kuali.kpme.tklm.api.common.TkConstants;
23  
24  import com.google.common.collect.ImmutableMap;
25  
26  public class GracePeriodRule extends HrBusinessObject implements GracePeriodRuleContract {
27  
28  	private static final long serialVersionUID = 2756221187837436165L;
29  
30  	public static final String CACHE_NAME = TkConstants.Namespace.NAMESPACE_PREFIX + "GracePeriodRule";
31  
32  	private String tkGracePeriodRuleId;
33  	private BigDecimal hourFactor;
34  	private boolean history; // KPME-2543
35  	
36  	// TODO returning an empty map for the time-being, until the BK is finalized
37  	@Override
38  	public ImmutableMap<String, Object> getBusinessKeyValuesMap() {
39  		return new ImmutableMap.Builder<String, Object>()
40  				.build();
41  	}
42  
43  	public BigDecimal getHourFactor() {
44  	    return hourFactor;
45  	}
46  
47  	public void setHourFactor(BigDecimal hourFactor) {
48  	    this.hourFactor = hourFactor;
49  	}
50  
51  	public String getTkGracePeriodRuleId() {
52  		return tkGracePeriodRuleId;
53  	}
54  
55  	public void setTkGracePeriodRuleId(String tkGracePeriodRuleId) {
56  		this.tkGracePeriodRuleId = tkGracePeriodRuleId;
57  	}
58  
59  	@Override
60  	public String getUniqueKey() {
61  		return hourFactor + "";
62  	}
63  
64  	@Override
65  	public String getId() {
66  		return getTkGracePeriodRuleId();
67  	}
68  
69  	@Override
70  	public void setId(String id) {
71  		setTkGracePeriodRuleId(id);
72  	}
73  
74  	public boolean isHistory() {
75  		return history;
76  	}
77  
78  	public void setHistory(boolean history) {
79  		this.history = history;
80  	}
81  
82  }