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.ld.businessobject;
017
018 import java.math.BigDecimal;
019 import java.sql.Date;
020 import java.sql.Timestamp;
021 import java.util.ArrayList;
022 import java.util.LinkedHashMap;
023 import java.util.List;
024
025 import org.kuali.kfs.coa.businessobject.Account;
026 import org.kuali.kfs.coa.businessobject.Chart;
027 import org.kuali.kfs.coa.businessobject.ObjectCode;
028 import org.kuali.kfs.coa.businessobject.SubAccount;
029 import org.kuali.kfs.coa.businessobject.SubObjectCode;
030 import org.kuali.kfs.sys.KFSPropertyConstants;
031 import org.kuali.kfs.sys.businessobject.SystemOptions;
032 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
033 import org.kuali.rice.kns.util.KualiDecimal;
034
035
036 /**
037 * Labor business object for LaborCalculatedSalaryFoundationTracker.
038 */
039 public class LaborCalculatedSalaryFoundationTracker extends PersistableBusinessObjectBase {
040 private Integer universityFiscalYear;
041 private String chartOfAccountsCode;
042 private String accountNumber;
043 private String subAccountNumber;
044 private String financialObjectCode;
045 private String financialSubObjectCode;
046 private String positionNumber;
047 private String emplid;
048 private String personName;
049 private Timestamp csfCreateTimestamp;
050 private String csfDeleteCode;
051 private KualiDecimal csfAmount;
052 private BigDecimal csfFullTimeEmploymentQuantity;
053 private BigDecimal csfTimePercent;
054 private String csfFundingStatusCode;
055 private Integer employeeRecord;
056 private String earnCode;
057 private Integer additionalSequence;
058 private Date effectiveDate;
059 private Integer effectiveSequence;
060
061 private ObjectCode financialObject;
062 private Chart chartOfAccounts;
063 private Account account;
064 private SubAccount subAccount;
065 private SubObjectCode financialSubObject;
066 private transient SystemOptions universityFiscal;
067 private final int PERCENTAGE_SCALE = 2;
068
069 private KualiDecimal july1BudgetAmount;
070 private BigDecimal july1BudgetFteQuantity;
071 private BigDecimal july1BudgetTimePercent;
072
073 /**
074 * Constructs a LaborCalculatedSalaryFoundationTracker.java.
075 */
076 public LaborCalculatedSalaryFoundationTracker() {
077 super();
078 this.setJuly1BudgetAmount(KualiDecimal.ZERO);
079 this.setJuly1BudgetFteQuantity(BigDecimal.ZERO);
080 this.setJuly1BudgetTimePercent(BigDecimal.ZERO);
081 }
082
083 /**
084 * Gets the july1BudgetAmount.
085 *
086 * @return Returns the july1BudgetAmount.
087 */
088 public KualiDecimal getJuly1BudgetAmount() {
089 return july1BudgetAmount;
090 }
091
092 /**
093 * Sets the july1BudgetAmount.
094 *
095 * @param july1BudgetAmount The july1BudgetAmount to set.
096 */
097 public void setJuly1BudgetAmount(KualiDecimal july1BudgetAmount) {
098 this.july1BudgetAmount = july1BudgetAmount;
099 }
100
101 /**
102 * Gets the july1BudgetFteQuantity.
103 *
104 * @return Returns the july1BudgetFteQuantity.
105 */
106 public BigDecimal getJuly1BudgetFteQuantity() {
107 return july1BudgetFteQuantity;
108 }
109
110 /**
111 * Sets the july1BudgetFteQuantity.
112 *
113 * @param july1BudgetFteQuantity The july1BudgetFteQuantity to set.
114 */
115 public void setJuly1BudgetFteQuantity(BigDecimal july1BudgetFteQuantity) {
116 this.july1BudgetFteQuantity = july1BudgetFteQuantity;
117 }
118
119 /**
120 * Gets the july1BudgetTimePercent.
121 *
122 * @return Returns the july1BudgetTimePercent.
123 */
124 public BigDecimal getJuly1BudgetTimePercent() {
125 return july1BudgetTimePercent;
126 }
127
128 /**
129 * Sets the july1BudgetTimePercent.
130 *
131 * @param july1BudgetTimePercent The july1BudgetTimePercent to set.
132 */
133 public void setJuly1BudgetTimePercent(BigDecimal july1BudgetTimePercent) {
134 this.july1BudgetTimePercent = july1BudgetTimePercent;
135 }
136
137 /**
138 * Gets the universityFiscalYear attribute.
139 *
140 * @return Returns the universityFiscalYear.
141 */
142 public Integer getUniversityFiscalYear() {
143 return universityFiscalYear;
144 }
145
146 /**
147 * Sets the universityFiscalYear attribute value.
148 *
149 * @param universityFiscalYear The universityFiscalYear to set.
150 */
151 public void setUniversityFiscalYear(Integer universityFiscalYear) {
152 this.universityFiscalYear = universityFiscalYear;
153 }
154
155 /**
156 * Gets the chartOfAccountsCode attribute.
157 *
158 * @return Returns the chartOfAccountsCode.
159 */
160 public String getChartOfAccountsCode() {
161 return chartOfAccountsCode;
162 }
163
164 /**
165 * Sets the chartOfAccountsCode attribute value.
166 *
167 * @param chartOfAccountsCode The chartOfAccountsCode to set.
168 */
169 public void setChartOfAccountsCode(String chartOfAccountsCode) {
170 this.chartOfAccountsCode = chartOfAccountsCode;
171 }
172
173 /**
174 * Gets the accountNumber attribute.
175 *
176 * @return Returns the accountNumber.
177 */
178 public String getAccountNumber() {
179 return accountNumber;
180 }
181
182 /**
183 * Sets the accountNumber attribute value.
184 *
185 * @param accountNumber The accountNumber to set.
186 */
187 public void setAccountNumber(String accountNumber) {
188 this.accountNumber = accountNumber;
189 }
190
191 /**
192 * Gets the subAccountNumber attribute.
193 *
194 * @return Returns the subAccountNumber.
195 */
196 public String getSubAccountNumber() {
197 return subAccountNumber;
198 }
199
200 /**
201 * Sets the subAccountNumber attribute value.
202 *
203 * @param subAccountNumber The subAccountNumber to set.
204 */
205 public void setSubAccountNumber(String subAccountNumber) {
206 this.subAccountNumber = subAccountNumber;
207 }
208
209 /**
210 * Gets the financialObjectCode attribute.
211 *
212 * @return Returns the financialObjectCode.
213 */
214 public String getFinancialObjectCode() {
215 return financialObjectCode;
216 }
217
218 /**
219 * Sets the financialObjectCode attribute value.
220 *
221 * @param financialObjectCode The financialObjectCode to set.
222 */
223 public void setFinancialObjectCode(String financialObjectCode) {
224 this.financialObjectCode = financialObjectCode;
225 }
226
227 /**
228 * Gets the financialSubObjectCode attribute.
229 *
230 * @return Returns the financialSubObjectCode.
231 */
232 public String getFinancialSubObjectCode() {
233 return financialSubObjectCode;
234 }
235
236 /**
237 * Sets the financialSubObjectCode attribute value.
238 *
239 * @param financialSubObjectCode The financialSubObjectCode to set.
240 */
241 public void setFinancialSubObjectCode(String financialSubObjectCode) {
242 this.financialSubObjectCode = financialSubObjectCode;
243 }
244
245 /**
246 * Gets the positionNumber attribute.
247 *
248 * @return Returns the positionNumber.
249 */
250 public String getPositionNumber() {
251 return positionNumber;
252 }
253
254 /**
255 * Sets the positionNumber attribute value.
256 *
257 * @param positionNumber The positionNumber to set.
258 */
259 public void setPositionNumber(String positionNumber) {
260 this.positionNumber = positionNumber;
261 }
262
263 /**
264 * Gets the emplid attribute.
265 *
266 * @return Returns the emplid.
267 */
268 public String getEmplid() {
269 return emplid;
270 }
271
272 /**
273 * Sets the emplid attribute value.
274 *
275 * @param emplid The emplid to set.
276 */
277 public void setEmplid(String emplid) {
278 this.emplid = emplid;
279 }
280
281 /**
282 * Gets the personName attribute.
283 *
284 * @return Returns the personName.
285 */
286 public String getName() {
287 return personName;
288 }
289
290 /**
291 * Sets the personName attribute value.
292 *
293 * @param personName The personName to set.
294 */
295 public void setName(String personName) {
296 this.personName = personName;
297 }
298
299 /**
300 * Gets the csfCreateTimestamp attribute.
301 *
302 * @return Returns the csfCreateTimestamp.
303 */
304 public Timestamp getCsfCreateTimestamp() {
305 return csfCreateTimestamp;
306 }
307
308 /**
309 * Sets the csfCreateTimestamp attribute value.
310 *
311 * @param csfCreateTimestamp The csfCreateTimestamp to set.
312 */
313 public void setCsfCreateTimestamp(Timestamp csfCreateTimestamp) {
314 this.csfCreateTimestamp = csfCreateTimestamp;
315 }
316
317 /**
318 * Gets the csfDeleteCode attribute.
319 *
320 * @return Returns the csfDeleteCode.
321 */
322 public String getCsfDeleteCode() {
323 return csfDeleteCode;
324 }
325
326 /**
327 * Sets the csfDeleteCode attribute value.
328 *
329 * @param csfDeleteCode The csfDeleteCode to set.
330 */
331 public void setCsfDeleteCode(String csfDeleteCode) {
332 this.csfDeleteCode = csfDeleteCode;
333 }
334
335 /**
336 * Gets the csfAmount attribute.
337 *
338 * @return Returns the csfAmount.
339 */
340 public KualiDecimal getCsfAmount() {
341 return csfAmount;
342 }
343
344 /**
345 * Sets the csfAmount attribute value.
346 *
347 * @param csfAmount The csfAmount to set.
348 */
349 public void setCsfAmount(KualiDecimal csfAmount) {
350 this.csfAmount = csfAmount;
351 }
352
353 /**
354 * Gets the csfFullTimeEmploymentQuantity attribute.
355 *
356 * @return Returns the csfFullTimeEmploymentQuantity.
357 */
358 public BigDecimal getCsfFullTimeEmploymentQuantity() {
359 return csfFullTimeEmploymentQuantity;
360 }
361
362 /**
363 * Sets the csfFullTimeEmploymentQuantity attribute value.
364 *
365 * @param csfFullTimeEmploymentQuantity The csfFullTimeEmploymentQuantity to set.
366 */
367 public void setCsfFullTimeEmploymentQuantity(BigDecimal csfFullTimeEmploymentQuantity) {
368 this.csfFullTimeEmploymentQuantity = csfFullTimeEmploymentQuantity;
369 }
370
371 /**
372 * Gets the csfTimePercent attribute.
373 *
374 * @return Returns the csfTimePercent.
375 */
376 public BigDecimal getCsfTimePercent() {
377 return csfTimePercent;
378 }
379
380 /**
381 * Sets the csfTimePercent attribute value.
382 *
383 * @param csfTimePercent The csfTimePercent to set.
384 */
385 public void setCsfTimePercent(BigDecimal csfTimePercent) {
386 this.csfTimePercent = csfTimePercent;
387 }
388
389 /**
390 * Gets the csfFundingStatusCode attribute.
391 *
392 * @return Returns the csfFundingStatusCode.
393 */
394 public String getCsfFundingStatusCode() {
395 return csfFundingStatusCode;
396 }
397
398 /**
399 * Sets the csfFundingStatusCode attribute value.
400 *
401 * @param csfFundingStatusCode The csfFundingStatusCode to set.
402 */
403 public void setCsfFundingStatusCode(String csfFundingStatusCode) {
404 this.csfFundingStatusCode = csfFundingStatusCode;
405 }
406
407 /**
408 * Gets the employeeRecord attribute.
409 *
410 * @return Returns the employeeRecord.
411 */
412 public Integer getEmployeeRecord() {
413 return employeeRecord;
414 }
415
416 /**
417 * Sets the employeeRecord attribute value.
418 *
419 * @param employeeRecord The employeeRecord to set.
420 */
421 public void setEmployeeRecord(Integer employeeRecord) {
422 this.employeeRecord = employeeRecord;
423 }
424
425 /**
426 * Gets the earnCode attribute.
427 *
428 * @return Returns the earnCode.
429 */
430 public String getEarnCode() {
431 return earnCode;
432 }
433
434 /**
435 * Sets the earnCode attribute value.
436 *
437 * @param earnCode The earnCode to set.
438 */
439 public void setEarnCode(String earnCode) {
440 this.earnCode = earnCode;
441 }
442
443 /**
444 * Gets the additionalSequence attribute.
445 *
446 * @return Returns the additionalSequence.
447 */
448 public Integer getAdditionalSequence() {
449 return additionalSequence;
450 }
451
452 /**
453 * Sets the additionalSequence attribute value.
454 *
455 * @param additionalSequence The additionalSequence to set.
456 */
457 public void setAdditionalSequence(Integer additionalSequence) {
458 this.additionalSequence = additionalSequence;
459 }
460
461 /**
462 * Gets the effectiveDate attribute.
463 *
464 * @return Returns the effectiveDate.
465 */
466 public Date getEffectiveDate() {
467 return effectiveDate;
468 }
469
470 /**
471 * Sets the effectiveDate attribute value.
472 *
473 * @param effectiveDate The effectiveDate to set.
474 */
475 public void setEffectiveDate(Date effectiveDate) {
476 this.effectiveDate = effectiveDate;
477 }
478
479 /**
480 * Gets the effectiveSequence attribute.
481 *
482 * @return Returns the effectiveSequence.
483 */
484 public Integer getEffectiveSequence() {
485 return effectiveSequence;
486 }
487
488 /**
489 * Sets the effectiveSequence attribute value.
490 *
491 * @param effectiveSequence The effectiveSequence to set.
492 */
493 public void setEffectiveSequence(Integer effectiveSequence) {
494 this.effectiveSequence = effectiveSequence;
495 }
496
497 /**
498 * Gets the financialObject attribute.
499 *
500 * @return Returns the financialObject.
501 */
502 public ObjectCode getFinancialObject() {
503 return financialObject;
504 }
505
506 /**
507 * Sets the financialObject attribute value.
508 *
509 * @param financialObject The financialObject to set.
510 */
511 public void setFinancialObject(ObjectCode financialObject) {
512 this.financialObject = financialObject;
513 }
514
515 /**
516 * Gets the chartOfAccounts attribute.
517 *
518 * @return Returns the chartOfAccounts.
519 */
520 public Chart getChartOfAccounts() {
521 return chartOfAccounts;
522 }
523
524 /**
525 * Sets the chartOfAccounts attribute value.
526 *
527 * @param chartOfAccounts The chartOfAccounts to set.
528 */
529 public void setChartOfAccounts(Chart chartOfAccounts) {
530 this.chartOfAccounts = chartOfAccounts;
531 }
532
533 /**
534 * Gets the account attribute.
535 *
536 * @return Returns the account.
537 */
538 public Account getAccount() {
539 return account;
540 }
541
542 /**
543 * Sets the account attribute value.
544 *
545 * @param account The account to set.
546 */
547 public void setAccount(Account account) {
548 this.account = account;
549 }
550
551 /**
552 * Gets the subAccount attribute.
553 *
554 * @return Returns the subAccount.
555 */
556 public SubAccount getSubAccount() {
557 return subAccount;
558 }
559
560 /**
561 * Sets the subAccount attribute value.
562 *
563 * @param subAccount The subAccount to set.
564 */
565 public void setSubAccount(SubAccount subAccount) {
566 this.subAccount = subAccount;
567 }
568
569 /**
570 * Gets the financialSubObject attribute.
571 *
572 * @return Returns the financialSubObject.
573 */
574 public SubObjectCode getFinancialSubObject() {
575 return financialSubObject;
576 }
577
578 /**
579 * Sets the financialSubObject attribute value.
580 *
581 * @param financialSubObject The financialSubObject to set.
582 */
583 public void setFinancialSubObject(SubObjectCode financialSubObject) {
584 this.financialSubObject = financialSubObject;
585 }
586
587 /**
588 * Gets the universityFiscal attribute.
589 *
590 * @return Returns the universityFiscal.
591 */
592 public SystemOptions getUniversityFiscal() {
593 return universityFiscal;
594 }
595
596 /**
597 * Sets the universityFiscal attribute value.
598 *
599 * @param universityFiscal The universityFiscal to set.
600 */
601 public void setUniversityFiscal(SystemOptions universityFiscal) {
602 this.universityFiscal = universityFiscal;
603 }
604
605 /**
606 * Gets the pERCENTAGE_SCALE attribute.
607 *
608 * @return Returns the pERCENTAGE_SCALE.
609 */
610 public int getPERCENTAGE_SCALE() {
611 return PERCENTAGE_SCALE;
612 }
613
614 /**
615 * construct the key list of the business object
616 *
617 * @return the key list of the business object
618 */
619 public List<String> getKeyFieldList() {
620 List<String> keyFieldList = new ArrayList<String>();
621 keyFieldList.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
622 keyFieldList.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
623 keyFieldList.add(KFSPropertyConstants.ACCOUNT_NUMBER);
624 keyFieldList.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
625 keyFieldList.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
626 keyFieldList.add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
627 keyFieldList.add(KFSPropertyConstants.POSITION_NUMBER);
628 keyFieldList.add(KFSPropertyConstants.EMPLID);
629
630 return keyFieldList;
631 }
632
633 /**
634 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
635 */
636 @Override
637 protected LinkedHashMap toStringMapper() {
638 LinkedHashMap m = new LinkedHashMap();
639 if (this.universityFiscalYear != null) {
640 m.put("universityFiscalYear", this.universityFiscalYear.toString());
641 }
642 m.put("chartOfAccountsCode", this.chartOfAccountsCode);
643 m.put("accountNumber", this.accountNumber);
644 m.put("subAccountNumber", this.subAccountNumber);
645 m.put("financialObjectCode", this.financialObjectCode);
646 m.put("financialSubObjectCode", this.financialSubObjectCode);
647 m.put("positionNumber", this.positionNumber);
648 m.put("emplid", this.emplid);
649 if (this.csfCreateTimestamp != null) {
650 m.put("csfCreateTimestamp", this.csfCreateTimestamp.toString());
651 }
652 return m;
653 }
654
655 }
656