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.hr.time.accrual;
017    
018    import java.math.BigDecimal;
019    
020    import org.kuali.hr.core.KPMEConstants;
021    import org.kuali.hr.lm.accrual.AccrualCategory;
022    import org.kuali.hr.time.HrBusinessObject;
023    import org.kuali.rice.kim.api.identity.Person;
024    import org.kuali.rice.kim.impl.identity.PersonImpl;
025    
026    public class TimeOffAccrual extends HrBusinessObject {
027    
028            private static final long serialVersionUID = -3882880617812198775L;
029    
030            public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "TimeOffAccrual";
031    
032            private String lmAccrualId;
033            private String principalId;
034            private String accrualCategory;
035            private BigDecimal yearlyCarryover = new BigDecimal(0);
036            private BigDecimal hoursAccrued = new BigDecimal(0);
037            private BigDecimal hoursTaken = new BigDecimal(0);
038            private BigDecimal hoursAdjust = new BigDecimal(0);
039    
040            private String lmAccrualCategoryId;
041            
042            private AccrualCategory accrualCategoryObj;
043    
044            protected PersonImpl principal;
045    
046            public String getPrincipalId() {
047                    return principalId;
048            }
049    
050            public void setPrincipalId(String principalId) {
051                    this.principalId = principalId;
052            }
053    
054            public String getAccrualCategory() {
055                    return accrualCategory;
056            }
057    
058            public void setAccrualCategory(String accrualCategory) {
059                    this.accrualCategory = accrualCategory;
060            }
061    
062            public BigDecimal getHoursAccrued() {
063                    return hoursAccrued;
064            }
065    
066            public void setHoursAccrued(BigDecimal hoursAccrued) {
067                    this.hoursAccrued = hoursAccrued;
068            }
069    
070            public BigDecimal getHoursTaken() {
071                    return hoursTaken;
072            }
073    
074            public void setHoursTaken(BigDecimal hoursTaken) {
075                    this.hoursTaken = hoursTaken;
076            }
077    
078            public BigDecimal getHoursAdjust() {
079                    return hoursAdjust;
080            }
081    
082            public void setHoursAdjust(BigDecimal hoursAdjust) {
083                    this.hoursAdjust = hoursAdjust;
084            }
085    
086            public void setAccrualCategoryObj(AccrualCategory accrualCategoryObj) {
087                    this.accrualCategoryObj = accrualCategoryObj;
088            }
089    
090            public AccrualCategory getAccrualCategoryObj() {
091                    return accrualCategoryObj;
092            }
093    
094            public Person getPrincipal() {
095                    return principal;
096            }
097    
098    
099            public String getLmAccrualId() {
100                    return lmAccrualId;
101            }
102    
103    
104            public void setLmAccrualId(String lmAccrualId) {
105                    this.lmAccrualId = lmAccrualId;
106            }
107    
108    
109            public void setPrincipal(PersonImpl principal) {
110                    this.principal = principal;
111            }
112    
113    
114            public String getLmAccrualCategoryId() {
115                    return lmAccrualCategoryId;
116            }
117    
118    
119            public void setLmAccrualCategoryId(String lmAccrualCategoryId) {
120                    this.lmAccrualCategoryId = lmAccrualCategoryId;
121            }
122    
123    
124            @Override
125            public String getUniqueKey() {
126                    return accrualCategory;
127            }
128            
129            @Override
130            public String getId() {
131                    return getLmAccrualId();
132            }
133    
134            @Override
135            public void setId(String id) {
136                    setLmAccrualId(id);
137            }
138    
139    
140            public BigDecimal getYearlyCarryover() {
141                    return yearlyCarryover;
142            }
143    
144    
145            public void setYearlyCarryover(BigDecimal yearlyCarryover) {
146                    this.yearlyCarryover = yearlyCarryover;
147            }
148    
149    }