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