001 /*
002 * Copyright 2011 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.kfs.module.endow.businessobject;
017
018 import java.sql.Date;
019 import java.util.LinkedHashMap;
020
021 import org.kuali.kfs.coa.businessobject.Chart;
022 import org.kuali.kfs.coa.businessobject.Organization;
023 import org.kuali.kfs.module.endow.EndowPropertyConstants;
024 import org.kuali.rice.kns.bo.Inactivateable;
025 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
026 import org.kuali.rice.kns.util.KualiDecimal;
027 import org.kuali.rice.kns.util.KualiInteger;
028
029 /**
030 * This KemidBenefittingOrganization class provides the institutional organizations that benefit from the KEMID.
031 */
032 public class KemidBenefittingOrganization extends PersistableBusinessObjectBase implements Inactivateable {
033
034 private String kemid;
035 private KualiInteger benefittingOrgSeqNumber;
036 private String benefittingOrgCode;
037 private String benefittingChartCode;
038 private KualiDecimal benefitPrecent;
039 private Date startDate;
040 private Date lastChangeDate;
041 private boolean active;
042
043 private KEMID kemidObjRef;
044 private Organization organization;
045 private Chart chart;
046
047
048 /**
049 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
050 */
051 @Override
052 protected LinkedHashMap toStringMapper() {
053 LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
054 m.put(EndowPropertyConstants.KEMID, this.kemid);
055 m.put(EndowPropertyConstants.KEMID_BENE_ORG_CD, this.benefittingOrgCode);
056 m.put(EndowPropertyConstants.KEMID_BENE_CHRT_CD, this.benefittingChartCode);
057 m.put(EndowPropertyConstants.KEMID_BENE_ORG_SEQ_NBR, String.valueOf(this.benefittingOrgSeqNumber));
058 return m;
059 }
060
061 /**
062 * @see org.kuali.rice.kns.bo.Inactivateable#isActive()
063 */
064 public boolean isActive() {
065 return active;
066 }
067
068 /**
069 * @see org.kuali.rice.kns.bo.Inactivateable#setActive(boolean)
070 */
071 public void setActive(boolean active) {
072 this.active = active;
073 }
074
075 /**
076 * Gets the benefittingOrgSeqNumber.
077 *
078 * @return benefittingOrgSeqNumber
079 */
080 public KualiInteger getBenefittingOrgSeqNumber() {
081 return benefittingOrgSeqNumber;
082 }
083
084 /**
085 * Sets the benefittingOrgSeqNumber.
086 *
087 * @param benefittingOrgSeqNumber
088 */
089 public void setBenefittingOrgSeqNumber(KualiInteger benefittingOrgSeqNumber) {
090 this.benefittingOrgSeqNumber = benefittingOrgSeqNumber;
091 }
092
093 /**
094 * Gets the benefittingOrgCode.
095 *
096 * @return benefittingOrgCode
097 */
098 public String getBenefittingOrgCode() {
099 return benefittingOrgCode;
100 }
101
102 /**
103 * Sets the benefittingOrgCode.
104 *
105 * @param benefittingOrgCode
106 */
107 public void setBenefittingOrgCode(String benefittingOrgCode) {
108 this.benefittingOrgCode = benefittingOrgCode;
109 }
110
111 /**
112 * Gets the benefitPrecent.
113 *
114 * @return benefitPrecent
115 */
116 public KualiDecimal getBenefitPrecent() {
117 return benefitPrecent;
118 }
119
120 /**
121 * Sets the benefitPrecent.
122 *
123 * @param benefitPrecent
124 */
125 public void setBenefitPrecent(KualiDecimal benefitPrecent) {
126 this.benefitPrecent = benefitPrecent;
127 }
128
129 /**
130 * Gets the startDate.
131 *
132 * @return startDate
133 */
134 public Date getStartDate() {
135 return startDate;
136 }
137
138 /**
139 * Sets the startDate.
140 *
141 * @param startDate
142 */
143 public void setStartDate(Date startDate) {
144 this.startDate = startDate;
145 }
146
147 /**
148 * Gets the lastChangeDate.
149 *
150 * @return lastChangeDate
151 */
152 public Date getLastChangeDate() {
153 return lastChangeDate;
154 }
155
156 /**
157 * Sets the lastChangeDate.
158 *
159 * @param lastChangeDate
160 */
161 public void setLastChangeDate(Date lastChangeDate) {
162 this.lastChangeDate = lastChangeDate;
163 }
164
165 /**
166 * Gets the kemidObjRef.
167 *
168 * @return kemidObjRef
169 */
170 public KEMID getKemidObjRef() {
171 return kemidObjRef;
172 }
173
174 /**
175 * Sets the kemidObjRef.
176 *
177 * @param kemidObjRef
178 */
179 public void setKemidObjRef(KEMID kemidObjRef) {
180 this.kemidObjRef = kemidObjRef;
181 }
182
183 /**
184 * Gets the kemid.
185 *
186 * @return kemid
187 */
188 public String getKemid() {
189 return kemid;
190 }
191
192 /**
193 * Sets the kemid.
194 *
195 * @param kemid
196 */
197 public void setKemid(String kemid) {
198 this.kemid = kemid;
199 }
200
201 /**
202 * Gets the benefittingChartCode.
203 *
204 * @return benefittingChartCode
205 */
206 public String getBenefittingChartCode() {
207 return benefittingChartCode;
208 }
209
210 /**
211 * Sets the benefittingChartCode.
212 *
213 * @param benefittingChartCode
214 */
215 public void setBenefittingChartCode(String benefittingChartCode) {
216 this.benefittingChartCode = benefittingChartCode;
217 }
218
219 /**
220 * Gets the chart.
221 *
222 * @return chart
223 */
224 public Chart getChart() {
225 return chart;
226 }
227
228 /**
229 * Sets the chart.
230 *
231 * @param chart
232 */
233 public void setChart(Chart chart) {
234 this.chart = chart;
235 }
236
237 /**
238 * Gets the organization.
239 *
240 * @return organization
241 */
242 public Organization getOrganization() {
243 return organization;
244 }
245
246 /**
247 * Sets the organization.
248 *
249 * @param organization
250 */
251 public void setOrganization(Organization organization) {
252 this.organization = organization;
253 }
254
255 /**
256 * Gets the organization code for report
257 *
258 * @return benefittingOrgCode
259 */
260 public String getBenefittingOrgCodeForReport() {
261 return benefittingOrgCode;
262 }
263
264 /**
265 * Gets the organization chart code for report
266 *
267 * @return benefittingChartCode
268 */
269 public String getBenefittingChartCodeForReport() {
270 return benefittingChartCode;
271 }
272 }