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
017 package org.kuali.kfs.module.ld.businessobject;
018
019 import java.util.LinkedHashMap;
020
021 import org.kuali.kfs.coa.businessobject.Chart;
022 import org.kuali.kfs.coa.businessobject.ObjectCode;
023 import org.kuali.kfs.integration.ld.LaborLedgerBenefitsCalculation;
024 import org.kuali.kfs.integration.ld.LaborLedgerPositionObjectBenefit;
025 import org.kuali.kfs.sys.businessobject.SystemOptions;
026 import org.kuali.rice.kns.bo.Inactivateable;
027 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
028
029 /**
030 * Labor business object for Modeling of Position Object Benefit
031 */
032 public class PositionObjectBenefit extends PersistableBusinessObjectBase implements LaborLedgerPositionObjectBenefit, Inactivateable {
033 private Integer universityFiscalYear;
034 private String chartOfAccountsCode;
035 private String financialObjectCode;
036 private String financialObjectBenefitsTypeCode;
037 private Chart chartOfAccounts;
038 private boolean active;
039
040 private ObjectCode financialObject;
041 private transient SystemOptions universityFiscal;
042 private BenefitsCalculation benefitsCalculation;
043 private BenefitsType financialObjectBenefitsType;
044 private LaborObject laborObject;
045
046 /**
047 * Default constructor.
048 */
049 public PositionObjectBenefit() {
050
051 }
052
053 /**
054 * Gets the universityFiscalYear
055 *
056 * @return Returns the universityFiscalYear
057 */
058 public Integer getUniversityFiscalYear() {
059 return universityFiscalYear;
060 }
061
062 /**
063 * Sets the universityFiscalYear
064 *
065 * @param universityFiscalYear The universityFiscalYear to set.
066 */
067 public void setUniversityFiscalYear(Integer universityFiscalYear) {
068 this.universityFiscalYear = universityFiscalYear;
069 }
070
071 /**
072 * Gets the chartOfAccountsCode
073 *
074 * @return Returns the chartOfAccountsCode
075 */
076 public String getChartOfAccountsCode() {
077 return chartOfAccountsCode;
078 }
079
080 /**
081 * Sets the chartOfAccountsCode
082 *
083 * @param chartOfAccountsCode The chartOfAccountsCode to set.
084 */
085 public void setChartOfAccountsCode(String chartOfAccountsCode) {
086 this.chartOfAccountsCode = chartOfAccountsCode;
087 }
088
089 /**
090 * Gets the financialObjectCode
091 *
092 * @return Returns the financialObjectCode
093 */
094 public String getFinancialObjectCode() {
095 return financialObjectCode;
096 }
097
098 /**
099 * Sets the financialObjectCode
100 *
101 * @param financialObjectCode The financialObjectCode to set.
102 */
103 public void setFinancialObjectCode(String financialObjectCode) {
104 this.financialObjectCode = financialObjectCode;
105 }
106
107 /**
108 * Gets the financialObjectBenefitsTypeCode
109 *
110 * @return Returns the financialObjectBenefitsTypeCode
111 */
112 public String getFinancialObjectBenefitsTypeCode() {
113 return financialObjectBenefitsTypeCode;
114 }
115
116 /**
117 * Sets the financialObjectBenefitsTypeCode
118 *
119 * @param financialObjectBenefitsTypeCode The financialObjectBenefitsTypeCode to set.
120 */
121 public void setFinancialObjectBenefitsTypeCode(String financialObjectBenefitsTypeCode) {
122 this.financialObjectBenefitsTypeCode = financialObjectBenefitsTypeCode;
123 }
124
125 /**
126 * Gets the financialObject
127 *
128 * @return Returns the financialObject
129 */
130 public ObjectCode getFinancialObject() {
131 return financialObject;
132 }
133
134 /**
135 * Sets the financialObject
136 *
137 * @param financialObject The financialObject to set.
138 */
139 @Deprecated
140 public void setFinancialObject(ObjectCode financialObject) {
141 this.financialObject = financialObject;
142 }
143
144 /**
145 * Gets the chartOfAccounts
146 *
147 * @return Returns the chartOfAccounts
148 */
149 public Chart getChartOfAccounts() {
150 return chartOfAccounts;
151 }
152
153 /**
154 * Sets the chartOfAccounts
155 *
156 * @param chartOfAccounts The chartOfAccounts to set.
157 */
158 @Deprecated
159 public void setChartOfAccounts(Chart chartOfAccounts) {
160 this.chartOfAccounts = chartOfAccounts;
161 }
162
163 /**
164 * Gets the universityFiscal
165 *
166 * @return Returns the universityFiscal.
167 */
168 public SystemOptions getUniversityFiscal() {
169 return universityFiscal;
170 }
171
172 /**
173 * Sets the universityFiscal
174 *
175 * @param universityFiscal The universityFiscal to set.
176 */
177 @Deprecated
178 public void setUniversityFiscal(SystemOptions universityFiscal) {
179 this.universityFiscal = universityFiscal;
180 }
181
182 /**
183 * Gets the benefitsCalculation
184 *
185 * @return Returns the benefitsCalculation.
186 */
187 public BenefitsCalculation getBenefitsCalculation() {
188 return benefitsCalculation;
189 }
190
191 /**
192 * Sets the benefitsCalculation
193 *
194 * @param benefitsCalculation The benefitsCalculation to set.
195 */
196 @Deprecated
197 public void setBenefitsCalculation(BenefitsCalculation benefitsCalculation) {
198 this.benefitsCalculation = benefitsCalculation;
199 }
200
201 /**
202 * Gets the financialObjectBenefitsType
203 *
204 * @return financialObjectBenefitsType
205 */
206 public BenefitsType getFinancialObjectBenefitsType() {
207 return financialObjectBenefitsType;
208 }
209
210 /**
211 * Sets financialObjectBenefitsType
212 *
213 * @param financialObjectBenefitsType The financialObjectBenefitsType to be set
214 */
215 @Deprecated
216 public void setFinancialObjectBenefitsType(BenefitsType financialObjectBenefitsType) {
217 this.financialObjectBenefitsType = financialObjectBenefitsType;
218 }
219
220 /**
221 * Gets the laborObject
222 *
223 * @return Returns the laborObject.
224 */
225 public LaborObject getLaborObject() {
226 return laborObject;
227 }
228
229 /**
230 * Sets the laborObject
231 *
232 * @param laborObject The laborObject to set.
233 */
234 @Deprecated
235 public void setLaborObject(LaborObject laborObject) {
236 this.laborObject = laborObject;
237 }
238
239 /**
240 * Gets the active attribute.
241 *
242 * @return Returns the active.
243 */
244 public boolean isActive() {
245 return active;
246 }
247
248 /**
249 * Sets the active attribute value.
250 *
251 * @param active The active to set.
252 */
253 public void setActive(boolean active) {
254 this.active = active;
255 }
256
257 /**
258 * This method (a hack by any other name...) returns a string so that an Labor Object Code Benefits can have a link to view its own
259 * inquiry page after a look up
260 *
261 * @return the String "View Labor Object Code Benefits"
262 */
263 public String getLaborObjectCodeBenefitsViewer() {
264 return "View Labor Object Code Benefits";
265 }
266
267 /**
268 * construct the key list of the business object.
269 *
270 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
271 */
272 protected LinkedHashMap toStringMapper() {
273 LinkedHashMap m = new LinkedHashMap();
274 if (this.universityFiscalYear != null) {
275 m.put("universityFiscalYear", this.universityFiscalYear.toString());
276 }
277 m.put("chartOfAccountsCode", this.chartOfAccountsCode);
278 m.put("financialObjectCode", this.financialObjectCode);
279 m.put("financialObjectBenefitsTypeCode", this.financialObjectBenefitsTypeCode);
280
281 return m;
282 }
283
284 /**
285 * @see org.kuali.kfs.integration.businessobject.LaborLedgerPositionObjectBenefit#getLaborLedgerBenefitsCalculation()
286 */
287 public LaborLedgerBenefitsCalculation getLaborLedgerBenefitsCalculation() {
288 return this.getBenefitsCalculation();
289 }
290
291 /**
292 * @see org.kuali.kfs.integration.businessobject.LaborLedgerPositionObjectBenefit#setLaborLedgerBenefitsCalculation(org.kuali.kfs.integration.businessobject.LaborLedgerBenefitsCalculation)
293 */
294 public void setLaborLedgerBenefitsCalculation(LaborLedgerBenefitsCalculation laborLedgerBenefitsCalculation) {
295 benefitsCalculation = (BenefitsCalculation)laborLedgerBenefitsCalculation;
296 }
297 }