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.lm.leavedonation;
17  
18  import java.math.BigDecimal;
19  
20  import org.kuali.hr.core.KPMEConstants;
21  import org.kuali.hr.lm.accrual.AccrualCategory;
22  import org.kuali.hr.time.HrBusinessObject;
23  import org.kuali.hr.time.earncode.EarnCode;
24  import org.kuali.rice.kim.api.identity.Person;
25  
26  public class LeaveDonation extends HrBusinessObject {
27      public static final String CACHE_NAME = KPMEConstants.APPLICATION_NAMESPACE_CODE + "/" + "LeaveDonation";
28  	/**
29  	 * 
30  	 */
31  	private static final long serialVersionUID = 1L;
32  	private String lmLeaveDonationId;
33  	private String donatedAccrualCategory;
34  	private String recipientsAccrualCategory;
35  	private BigDecimal amountDonated = new BigDecimal("0.0");
36  	private BigDecimal amountReceived = new BigDecimal("0.0");
37  	private String donorsPrincipalID;
38  	private String recipientsPrincipalID;
39  	private String description;
40  	
41  	private Boolean history;
42  	
43  	private AccrualCategory accrualCategoryObj;
44  	
45  	private Person personObj;
46  
47  	private EarnCode earnCodeObj;
48  	
49  	private String donatedEarnCode;
50  	private String recipientsEarnCode;
51  
52  	public EarnCode getEarnCodeObj() {
53  		return earnCodeObj;
54  	}
55  
56  	public void setEarnCodeObj(EarnCode earnCodeObj) {
57  		this.earnCodeObj = earnCodeObj;
58  	}
59  
60  	public String getDonatedEarnCode() {
61  		return donatedEarnCode;
62  	}
63  
64  	public void setDonatedEarnCode(String donatedEarnCode) {
65  		this.donatedEarnCode = donatedEarnCode;
66  	}
67  
68  	public String getRecipientsEarnCode() {
69  		return recipientsEarnCode;
70  	}
71  
72  	public void setRecipientsEarnCode(String recipientsEarnCode) {
73  		this.recipientsEarnCode = recipientsEarnCode;
74  	}
75  
76  	public String getLmLeaveDonationId() {
77  		return lmLeaveDonationId;
78  	}
79  
80  	public void setLmLeaveDonationId(String lmLeaveDonationId) {
81  		this.lmLeaveDonationId = lmLeaveDonationId;
82  	}
83  
84  	public String getDonatedAccrualCategory() {
85  		return donatedAccrualCategory;
86  	}
87  
88  	public void setDonatedAccrualCategory(String donatedAccrualCategory) {
89  		this.donatedAccrualCategory = donatedAccrualCategory;
90  	}
91  
92  	public String getRecipientsAccrualCategory() {
93  		return recipientsAccrualCategory;
94  	}
95  
96  	public void setRecipientsAccrualCategory(String recipientsAccrualCategory) {
97  		this.recipientsAccrualCategory = recipientsAccrualCategory;
98  	}
99  
100 	public BigDecimal getAmountDonated() {
101 		return amountDonated;
102 	}
103 
104 	public void setAmountDonated(BigDecimal amountDonated) {
105 		this.amountDonated = amountDonated;
106 	}
107 
108 	public BigDecimal getAmountReceived() {
109 		return amountReceived;
110 	}
111 
112 	public void setAmountReceived(BigDecimal amountReceived) {
113 		this.amountReceived = amountReceived;
114 	}
115 
116 	public String getDonorsPrincipalID() {
117 		return donorsPrincipalID;
118 	}
119 
120 	public void setDonorsPrincipalID(String donorsPrincipalID) {
121 		this.donorsPrincipalID = donorsPrincipalID;
122 	}
123 
124 	public String getRecipientsPrincipalID() {
125 		return recipientsPrincipalID;
126 	}
127 
128 	public void setRecipientsPrincipalID(String recipientsPrincipalID) {
129 		this.recipientsPrincipalID = recipientsPrincipalID;
130 	}
131 
132 	public String getDescription() {
133 		return description;
134 	}
135 
136 	public void setDescription(String description) {
137 		this.description = description;
138 	}
139 
140 	public Boolean getHistory() {
141 		return history;
142 	}
143 
144 	public void setHistory(Boolean history) {
145 		this.history = history;
146 	}
147 
148 	public Person getPersonObj() {
149 		return personObj;
150 	}
151 
152 	public void setPersonObj(Person personObj) {
153 		this.personObj = personObj;
154 	}
155 
156 	public AccrualCategory getAccrualCategoryObj() {
157 		return accrualCategoryObj;
158 	}
159 
160 	public void setAccrualCategoryObj(AccrualCategory accrualCategoryObj) {
161 		this.accrualCategoryObj = accrualCategoryObj;
162 	}
163 
164 	@Override
165 	protected String getUniqueKey() {
166 		String leaveCodeKey = getDonorsPrincipalID() +"_"+ getRecipientsPrincipalID() +"_"+ getDonatedAccrualCategory() +"_"+ getRecipientsAccrualCategory();
167 		return leaveCodeKey;
168 	}
169 
170 	@Override
171 	public String getId() {
172 		return getLmLeaveDonationId();
173 	}
174 
175 	@Override
176 	public void setId(String id) {
177 		setLmLeaveDonationId(id);
178 	}
179 
180 }