001    /**
002     * Copyright 2004-2012 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.graceperiod.rule;
017    
018    import org.kuali.hr.core.KPMEConstants;
019    import org.kuali.hr.time.HrBusinessObject;
020    
021    import java.math.BigDecimal;
022    import java.sql.Timestamp;
023    import java.util.LinkedHashMap;
024    
025    
026    
027    public class GracePeriodRule extends HrBusinessObject {
028        public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "GracePeriodRule";
029            private static final long serialVersionUID = 1L;
030    
031            private String tkGracePeriodRuleId;
032            private BigDecimal hourFactor;
033            private String userPrincipalId;
034            
035            protected LinkedHashMap<String,Object> toStringMapper() {
036                    LinkedHashMap<String, Object> toStringMap = new LinkedHashMap<String,Object>();
037                    toStringMap.put("effDt", effectiveDate);
038                    toStringMap.put("hourFactor", hourFactor);
039                    return toStringMap;
040            }
041    
042            public boolean isActive() {
043                return active;
044            }
045    
046            public void setActive(boolean active) {
047                this.active = active;
048            }
049    
050            public BigDecimal getHourFactor() {
051                return hourFactor;
052            }
053    
054            public void setHourFactor(BigDecimal hourFactor) {
055                this.hourFactor = hourFactor;
056            }
057    
058    
059            public String getUserPrincipalId() {
060                return userPrincipalId;
061            }
062    
063    
064            public void setUserPrincipalId(String userPrincipalId) {
065                this.userPrincipalId = userPrincipalId;
066            }
067    
068    
069            public Timestamp getTimestamp() {
070                return timestamp;
071            }
072    
073            public void setTimestamp(Timestamp timestamp) {
074                this.timestamp = timestamp;
075            }
076    
077    
078            public String getTkGracePeriodRuleId() {
079                    return tkGracePeriodRuleId;
080            }
081    
082    
083            public void setTkGracePeriodRuleId(String tkGracePeriodRuleId) {
084                    this.tkGracePeriodRuleId = tkGracePeriodRuleId;
085            }
086    
087    
088            @Override
089            public String getUniqueKey() {
090                    return hourFactor + "";
091            }
092    
093            @Override
094            public String getId() {
095                    return getTkGracePeriodRuleId();
096            }
097    
098            @Override
099            public void setId(String id) {
100                    setTkGracePeriodRuleId(id);
101            }
102    
103    
104    }