View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  
20  package org.kuali.kfs.module.ld.businessobject;
21  
22  import java.math.BigDecimal;
23  import java.sql.Date;
24  import java.sql.Timestamp;
25  import java.util.LinkedHashMap;
26  
27  import org.apache.commons.lang.StringUtils;
28  import org.kuali.kfs.coa.businessobject.Account;
29  import org.kuali.kfs.coa.businessobject.AccountingPeriod;
30  import org.kuali.kfs.coa.businessobject.BalanceType;
31  import org.kuali.kfs.coa.businessobject.Chart;
32  import org.kuali.kfs.coa.businessobject.ObjectCode;
33  import org.kuali.kfs.coa.businessobject.ObjectType;
34  import org.kuali.kfs.coa.businessobject.ProjectCode;
35  import org.kuali.kfs.coa.businessobject.SubAccount;
36  import org.kuali.kfs.coa.businessobject.SubObjectCode;
37  import org.kuali.kfs.gl.businessobject.Entry;
38  import org.kuali.kfs.gl.businessobject.TransientBalanceInquiryAttributes;
39  import org.kuali.kfs.integration.ld.LaborLedgerEntry;
40  import org.kuali.kfs.integration.ld.LaborLedgerObject;
41  import org.kuali.kfs.sys.KFSPropertyConstants;
42  import org.kuali.kfs.sys.businessobject.OriginationCode;
43  import org.kuali.kfs.sys.businessobject.SystemOptions;
44  import org.kuali.kfs.sys.context.SpringContext;
45  import org.kuali.rice.core.api.util.type.KualiDecimal;
46  import org.kuali.rice.kew.api.KewApiServiceLocator;
47  import org.kuali.rice.kew.api.doctype.DocumentType;
48  import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO;
49  import org.kuali.rice.kim.api.identity.Person;
50  import org.kuali.rice.kim.api.identity.PersonService;
51  
52  /**
53   * Labor business object for LedgerEntry
54   */
55  public class LedgerEntry extends Entry implements LaborLedgerEntry {
56  
57      private Integer universityFiscalYear;
58      private String chartOfAccountsCode;
59      private String accountNumber;
60      private String subAccountNumber;
61      private String financialObjectCode;
62      private String financialSubObjectCode;
63      private String financialBalanceTypeCode;
64      private String financialObjectTypeCode;
65      private String universityFiscalPeriodCode;
66      private String financialDocumentTypeCode;
67      private String financialSystemOriginationCode;
68      private String documentNumber;
69      private Integer transactionLedgerEntrySequenceNumber;
70      private String positionNumber;
71      private String projectCode;
72      private String transactionLedgerEntryDescription;
73      private KualiDecimal transactionLedgerEntryAmount;
74      private String transactionDebitCreditCode;
75      private Date transactionDate;
76      private String organizationDocumentNumber;
77      private String organizationReferenceId;
78      private String referenceFinancialDocumentTypeCode;
79      private String referenceFinancialSystemOriginationCode;
80      private String referenceFinancialDocumentNumber;
81      private Date financialDocumentReversalDate;
82      private String transactionEncumbranceUpdateCode;
83      private Date transactionPostingDate;
84      private Date payPeriodEndDate;
85      private BigDecimal transactionTotalHours;
86      private Integer payrollEndDateFiscalYear;
87      private String payrollEndDateFiscalPeriodCode;
88      private String emplid;
89      private Integer employeeRecord;
90      private String earnCode;
91      private String payGroup;
92      private String salaryAdministrationPlan;
93      private String grade;
94      private String runIdentifier;
95      private String laborLedgerOriginalChartOfAccountsCode;
96      private String laborLedgerOriginalAccountNumber;
97      private String laborLedgerOriginalSubAccountNumber;
98      private String laborLedgerOriginalFinancialObjectCode;
99      private String laborLedgerOriginalFinancialSubObjectCode;
100     private String hrmsCompany;
101     private String setid;
102     private Timestamp transactionDateTimeStamp;
103 
104     private ObjectCode financialObject;
105     private Chart chartOfAccounts;
106     private Account account;
107     private SubAccount subAccount;
108     private SubObjectCode financialSubObject;
109     private ObjectType financialObjectType;
110     private BalanceType balanceType;
111     private AccountingPeriod universityFiscalPeriod;
112     private AccountingPeriod payrollEndDateFiscalPeriod;
113     private DocumentTypeEBO financialSystemDocumentTypeCode;
114     private DocumentTypeEBO referenceFinancialSystemDocumentTypeCode;
115     private SystemOptions option;
116     private OriginationCode referenceOriginationCode;
117     private ProjectCode project;
118     private OriginationCode financialSystemOrigination;
119     private LaborObject laborObject;
120     private Person employee;
121 
122     /**
123      * Default constructor.
124      */
125     public LedgerEntry() {
126         super();
127         this.setDummyBusinessObject(new TransientBalanceInquiryAttributes());
128     }
129 
130     /**
131      * Constructs a LedgerEntry.java.
132      *
133      * @param transaction the given transaction
134      */
135     public LedgerEntry(LaborTransaction transaction) {
136         super(transaction);
137         this.setEarnCode(transaction.getEarnCode());
138         this.setEmplid(transaction.getEmplid());
139         this.setEmployeeRecord(transaction.getEmployeeRecord());
140         this.setGrade(transaction.getGrade());
141         this.setHrmsCompany(transaction.getHrmsCompany());
142         this.setLaborLedgerOriginalAccountNumber(transaction.getLaborLedgerOriginalAccountNumber());
143         this.setLaborLedgerOriginalChartOfAccountsCode(transaction.getLaborLedgerOriginalChartOfAccountsCode());
144         this.setLaborLedgerOriginalFinancialObjectCode(transaction.getLaborLedgerOriginalFinancialObjectCode());
145         this.setLaborLedgerOriginalFinancialSubObjectCode(transaction.getLaborLedgerOriginalFinancialSubObjectCode());
146         this.setLaborLedgerOriginalSubAccountNumber(transaction.getLaborLedgerOriginalSubAccountNumber());
147         this.setPayGroup(transaction.getPayGroup());
148         this.setPayPeriodEndDate(transaction.getPayPeriodEndDate());
149         this.setPayrollEndDateFiscalPeriodCode(transaction.getPayrollEndDateFiscalPeriodCode());
150         this.setPayrollEndDateFiscalYear(transaction.getPayrollEndDateFiscalYear());
151         this.setPositionNumber(transaction.getPositionNumber());
152         this.setRunIdentifier(transaction.getRunIdentifier());
153         this.setProjectCode(transaction.getProjectCode());
154         this.setSetid(transaction.getSetid());
155         this.setSalaryAdministrationPlan(transaction.getSalaryAdministrationPlan());
156         this.setTransactionTotalHours(transaction.getTransactionTotalHours());
157     }
158 
159     /**
160      * Gets the universityFiscalYear
161      *
162      * @return Returns the universityFiscalYear
163      */
164     @Override
165     public Integer getUniversityFiscalYear() {
166         return universityFiscalYear;
167     }
168 
169     /**
170      * Sets the universityFiscalYear
171      *
172      * @param universityFiscalYear The universityFiscalYear to set.
173      */
174     @Override
175     public void setUniversityFiscalYear(Integer universityFiscalYear) {
176         this.universityFiscalYear = universityFiscalYear;
177     }
178 
179     /**
180      * Gets the chartOfAccountsCode
181      *
182      * @return Returns the chartOfAccountsCode
183      */
184     @Override
185     public String getChartOfAccountsCode() {
186         return chartOfAccountsCode;
187     }
188 
189     /**
190      * Sets the chartOfAccountsCode
191      *
192      * @param chartOfAccountsCode The chartOfAccountsCode to set.
193      */
194     @Override
195     public void setChartOfAccountsCode(String chartOfAccountsCode) {
196         this.chartOfAccountsCode = chartOfAccountsCode;
197     }
198 
199     /**
200      * Gets the accountNumber
201      *
202      * @return Returns the accountNumber
203      */
204     @Override
205     public String getAccountNumber() {
206         return accountNumber;
207     }
208 
209     /**
210      * Sets the accountNumber
211      *
212      * @param accountNumber The accountNumber to set.
213      */
214     @Override
215     public void setAccountNumber(String accountNumber) {
216         this.accountNumber = accountNumber;
217     }
218 
219     /**
220      * Gets the subAccountNumber
221      *
222      * @return Returns the subAccountNumber
223      */
224     @Override
225     public String getSubAccountNumber() {
226         return subAccountNumber;
227     }
228 
229     /**
230      * Sets the subAccountNumber
231      *
232      * @param subAccountNumber The subAccountNumber to set.
233      */
234     @Override
235     public void setSubAccountNumber(String subAccountNumber) {
236         this.subAccountNumber = subAccountNumber;
237     }
238 
239     /**
240      * Gets the financialObjectCode
241      *
242      * @return Returns the financialObjectCode
243      */
244     @Override
245     public String getFinancialObjectCode() {
246         return financialObjectCode;
247     }
248 
249     /**
250      * Sets the financialObjectCode
251      *
252      * @param financialObjectCode The financialObjectCode to set.
253      */
254     @Override
255     public void setFinancialObjectCode(String financialObjectCode) {
256         this.financialObjectCode = financialObjectCode;
257     }
258 
259     /**
260      * Gets the financialSubObjectCode
261      *
262      * @return Returns the financialSubObjectCode
263      */
264     @Override
265     public String getFinancialSubObjectCode() {
266         return financialSubObjectCode;
267     }
268 
269     /**
270      * Sets the financialSubObjectCode
271      *
272      * @param financialSubObjectCode The financialSubObjectCode to set.
273      */
274     @Override
275     public void setFinancialSubObjectCode(String financialSubObjectCode) {
276         this.financialSubObjectCode = financialSubObjectCode;
277     }
278 
279     /**
280      * Gets the financialBalanceTypeCode
281      *
282      * @return Returns the financialBalanceTypeCode
283      */
284     @Override
285     public String getFinancialBalanceTypeCode() {
286         return financialBalanceTypeCode;
287     }
288 
289     /**
290      * Sets the financialBalanceTypeCode
291      *
292      * @param financialBalanceTypeCode The financialBalanceTypeCode to set.
293      */
294     @Override
295     public void setFinancialBalanceTypeCode(String financialBalanceTypeCode) {
296         this.financialBalanceTypeCode = financialBalanceTypeCode;
297     }
298 
299     /**
300      * Gets the financialObjectTypeCode
301      *
302      * @return Returns the financialObjectTypeCode
303      */
304     @Override
305     public String getFinancialObjectTypeCode() {
306         return financialObjectTypeCode;
307     }
308 
309     /**
310      * Sets the financialObjectTypeCode
311      *
312      * @param financialObjectTypeCode The financialObjectTypeCode to set.
313      */
314     @Override
315     public void setFinancialObjectTypeCode(String financialObjectTypeCode) {
316         this.financialObjectTypeCode = financialObjectTypeCode;
317     }
318 
319     /**
320      * Gets the universityFiscalPeriodCode
321      *
322      * @return Returns the universityFiscalPeriodCode
323      */
324     @Override
325     public String getUniversityFiscalPeriodCode() {
326         return universityFiscalPeriodCode;
327     }
328 
329     /**
330      * Sets the universityFiscalPeriodCode
331      *
332      * @param universityFiscalPeriodCode The universityFiscalPeriodCode to set.
333      */
334     @Override
335     public void setUniversityFiscalPeriodCode(String universityFiscalPeriodCode) {
336         this.universityFiscalPeriodCode = universityFiscalPeriodCode;
337     }
338 
339     /**
340      * Gets the financialDocumentTypeCode
341      *
342      * @return Returns the financialDocumentTypeCode
343      */
344     @Override
345     public String getFinancialDocumentTypeCode() {
346         return financialDocumentTypeCode;
347     }
348 
349     /**
350      * Gets the financialSystemOriginationCode
351      *
352      * @return Returns the financialSystemOriginationCode.
353      */
354     @Override
355     public String getFinancialSystemOriginationCode() {
356         return financialSystemOriginationCode;
357     }
358 
359     /**
360      * Sets the financialSystemOriginationCode
361      *
362      * @param financialSystemOriginationCode The financialSystemOriginationCode to set.
363      */
364     @Override
365     public void setFinancialSystemOriginationCode(String financialSystemOriginationCode) {
366         this.financialSystemOriginationCode = financialSystemOriginationCode;
367     }
368 
369     /**
370      * Sets the financialDocumentTypeCode
371      *
372      * @param financialDocumentTypeCode The financialDocumentTypeCode to set.
373      */
374     @Override
375     public void setFinancialDocumentTypeCode(String financialDocumentTypeCode) {
376         this.financialDocumentTypeCode = financialDocumentTypeCode;
377     }
378 
379     /**
380      * Gets the documentNumber
381      *
382      * @return Returns the documentNumber
383      */
384     @Override
385     public String getDocumentNumber() {
386         return documentNumber;
387     }
388 
389     /**
390      * Sets the documentNumber
391      *
392      * @param documentNumber The documentNumber to set.
393      */
394     @Override
395     public void setDocumentNumber(String documentNumber) {
396         this.documentNumber = documentNumber;
397     }
398 
399     /**
400      * Gets the transactionLedgerEntrySequenceNumber
401      *
402      * @return Returns the transactionLedgerEntrySequenceNumber
403      */
404     @Override
405     public Integer getTransactionLedgerEntrySequenceNumber() {
406         return transactionLedgerEntrySequenceNumber;
407     }
408 
409     /**
410      * Sets the transactionLedgerEntrySequenceNumber
411      *
412      * @param transactionLedgerEntrySequenceNumber The transactionLedgerEntrySequenceNumber to set.
413      */
414     @Override
415     public void setTransactionLedgerEntrySequenceNumber(Integer transactionLedgerEntrySequenceNumber) {
416         this.transactionLedgerEntrySequenceNumber = transactionLedgerEntrySequenceNumber;
417     }
418 
419     /**
420      * Gets the positionNumber
421      *
422      * @return Returns the positionNumber
423      */
424     @Override
425     public String getPositionNumber() {
426         return positionNumber;
427     }
428 
429     /**
430      * Sets the positionNumber
431      *
432      * @param positionNumber The positionNumber to set.
433      */
434     @Override
435     public void setPositionNumber(String positionNumber) {
436         this.positionNumber = positionNumber;
437     }
438 
439     /**
440      * Gets the projectCode
441      *
442      * @return Returns the projectCode
443      */
444     @Override
445     public String getProjectCode() {
446         return projectCode;
447     }
448 
449     /**
450      * Sets the projectCode
451      *
452      * @param projectCode The projectCode to set.
453      */
454     @Override
455     public void setProjectCode(String projectCode) {
456         this.projectCode = projectCode;
457     }
458 
459     /**
460      * Gets the transactionLedgerEntryDescription
461      *
462      * @return Returns the transactionLedgerEntryDescription
463      */
464     @Override
465     public String getTransactionLedgerEntryDescription() {
466         return transactionLedgerEntryDescription;
467     }
468 
469     /**
470      * Sets the transactionLedgerEntryDescription
471      *
472      * @param transactionLedgerEntryDescription The transactionLedgerEntryDescription to set.
473      */
474     @Override
475     public void setTransactionLedgerEntryDescription(String transactionLedgerEntryDescription) {
476         this.transactionLedgerEntryDescription = transactionLedgerEntryDescription;
477     }
478 
479     /**
480      * Gets the transactionLedgerEntryAmount
481      *
482      * @return Returns the transactionLedgerEntryAmount
483      */
484     @Override
485     public KualiDecimal getTransactionLedgerEntryAmount() {
486         return transactionLedgerEntryAmount;
487     }
488 
489     /**
490      * Sets the transactionLedgerEntryAmount
491      *
492      * @param transactionLedgerEntryAmount The transactionLedgerEntryAmount to set.
493      */
494     @Override
495     public void setTransactionLedgerEntryAmount(KualiDecimal transactionLedgerEntryAmount) {
496         this.transactionLedgerEntryAmount = transactionLedgerEntryAmount;
497     }
498 
499     /**
500      * Gets the transactionDebitCreditCode
501      *
502      * @return Returns the transactionDebitCreditCode
503      */
504     @Override
505     public String getTransactionDebitCreditCode() {
506         return transactionDebitCreditCode;
507     }
508 
509     /**
510      * Sets the transactionDebitCreditCode
511      *
512      * @param transactionDebitCreditCode The transactionDebitCreditCode to set.
513      */
514     @Override
515     public void setTransactionDebitCreditCode(String transactionDebitCreditCode) {
516         this.transactionDebitCreditCode = transactionDebitCreditCode;
517     }
518 
519     /**
520      * Gets the transactionDate
521      *
522      * @return Returns the transactionDate
523      */
524     @Override
525     public Date getTransactionDate() {
526         return transactionDate;
527     }
528 
529     /**
530      * Sets the transactionDate
531      *
532      * @param transactionDate The transactionDate to set.
533      */
534     @Override
535     public void setTransactionDate(Date transactionDate) {
536         this.transactionDate = transactionDate;
537     }
538 
539     /**
540      * Gets the organizationDocumentNumber
541      *
542      * @return Returns the organizationDocumentNumber
543      */
544     @Override
545     public String getOrganizationDocumentNumber() {
546         return organizationDocumentNumber;
547     }
548 
549     /**
550      * Sets the organizationDocumentNumber
551      *
552      * @param organizationDocumentNumber The organizationDocumentNumber to set.
553      */
554     @Override
555     public void setOrganizationDocumentNumber(String organizationDocumentNumber) {
556         this.organizationDocumentNumber = organizationDocumentNumber;
557     }
558 
559     /**
560      * Gets the organizationReferenceId
561      *
562      * @return Returns the organizationReferenceId
563      */
564     @Override
565     public String getOrganizationReferenceId() {
566         return organizationReferenceId;
567     }
568 
569     /**
570      * Sets the organizationReferenceId
571      *
572      * @param organizationReferenceId The organizationReferenceId to set.
573      */
574     @Override
575     public void setOrganizationReferenceId(String organizationReferenceId) {
576         this.organizationReferenceId = organizationReferenceId;
577     }
578 
579     /**
580      * Gets the referenceFinancialDocumentTypeCode
581      *
582      * @return Returns the referenceFinancialDocumentTypeCode
583      */
584     @Override
585     public String getReferenceFinancialDocumentTypeCode() {
586         return referenceFinancialDocumentTypeCode;
587     }
588 
589     /**
590      * Sets the referenceFinancialDocumentTypeCode
591      *
592      * @param referenceFinancialDocumentTypeCode The referenceFinancialDocumentTypeCode to set.
593      */
594     @Override
595     public void setReferenceFinancialDocumentTypeCode(String referenceFinancialDocumentTypeCode) {
596         this.referenceFinancialDocumentTypeCode = referenceFinancialDocumentTypeCode;
597     }
598 
599     /**
600      * Gets the referenceFinancialSystemOriginationCode
601      *
602      * @return Returns the referenceFinancialSystemOriginationCode
603      */
604     @Override
605     public String getReferenceFinancialSystemOriginationCode() {
606         return referenceFinancialSystemOriginationCode;
607     }
608 
609     /**
610      * Sets the referenceFinancialSystemOriginationCode
611      *
612      * @param referenceFinancialSystemOriginationCode The referenceFinancialSystemOriginationCode to set.
613      */
614     @Override
615     public void setReferenceFinancialSystemOriginationCode(String referenceFinancialSystemOriginationCode) {
616         this.referenceFinancialSystemOriginationCode = referenceFinancialSystemOriginationCode;
617     }
618 
619     /**
620      * Gets the referenceFinancialDocumentNumber
621      *
622      * @return Returns the referenceFinancialDocumentNumber
623      */
624     @Override
625     public String getReferenceFinancialDocumentNumber() {
626         return referenceFinancialDocumentNumber;
627     }
628 
629     /**
630      * Sets the referenceFinancialDocumentNumber
631      *
632      * @param referenceFinancialDocumentNumber The referenceFinancialDocumentNumber to set.
633      */
634     @Override
635     public void setReferenceFinancialDocumentNumber(String referenceFinancialDocumentNumber) {
636         this.referenceFinancialDocumentNumber = referenceFinancialDocumentNumber;
637     }
638 
639     /**
640      * Gets the financialDocumentReversalDate
641      *
642      * @return Returns the financialDocumentReversalDate
643      */
644     @Override
645     public Date getFinancialDocumentReversalDate() {
646         return financialDocumentReversalDate;
647     }
648 
649     /**
650      * Sets the financialDocumentReversalDate
651      *
652      * @param financialDocumentReversalDate The financialDocumentReversalDate to set.
653      */
654     @Override
655     public void setFinancialDocumentReversalDate(Date financialDocumentReversalDate) {
656         this.financialDocumentReversalDate = financialDocumentReversalDate;
657     }
658 
659     /**
660      * Gets the transactionEncumbranceUpdateCode
661      *
662      * @return Returns the transactionEncumbranceUpdateCode
663      */
664     @Override
665     public String getTransactionEncumbranceUpdateCode() {
666         return transactionEncumbranceUpdateCode;
667     }
668 
669     /**
670      * Sets the transactionEncumbranceUpdateCode
671      *
672      * @param transactionEncumbranceUpdateCode The transactionEncumbranceUpdateCode to set.
673      */
674     @Override
675     public void setTransactionEncumbranceUpdateCode(String transactionEncumbranceUpdateCode) {
676         this.transactionEncumbranceUpdateCode = transactionEncumbranceUpdateCode;
677     }
678 
679     /**
680      * Gets the transactionPostingDate
681      *
682      * @return Returns the transactionPostingDate
683      */
684     @Override
685     public Date getTransactionPostingDate() {
686         return transactionPostingDate;
687     }
688 
689     /**
690      * Sets the transactionPostingDate
691      *
692      * @param transactionPostingDate The transactionPostingDate to set.
693      */
694     @Override
695     public void setTransactionPostingDate(Date transactionPostingDate) {
696         this.transactionPostingDate = transactionPostingDate;
697     }
698 
699     /**
700      * Gets the payPeriodEndDate
701      *
702      * @return Returns the payPeriodEndDate
703      */
704     @Override
705     public Date getPayPeriodEndDate() {
706         return payPeriodEndDate;
707     }
708 
709     /**
710      * Sets the payPeriodEndDate
711      *
712      * @param payPeriodEndDate The payPeriodEndDate to set.
713      */
714     @Override
715     public void setPayPeriodEndDate(Date payPeriodEndDate) {
716         this.payPeriodEndDate = payPeriodEndDate;
717     }
718 
719     /**
720      * Gets the transactionTotalHours
721      *
722      * @return Returns the transactionTotalHours
723      */
724     @Override
725     public BigDecimal getTransactionTotalHours() {
726         return transactionTotalHours;
727     }
728 
729     /**
730      * Sets the transactionTotalHours
731      *
732      * @param transactionTotalHours The transactionTotalHours to set.
733      */
734     @Override
735     public void setTransactionTotalHours(BigDecimal transactionTotalHours) {
736         this.transactionTotalHours = transactionTotalHours;
737     }
738 
739     /**
740      * Gets the payrollEndDateFiscalYear
741      *
742      * @return Returns the payrollEndDateFiscalYear
743      */
744     @Override
745     public Integer getPayrollEndDateFiscalYear() {
746         return payrollEndDateFiscalYear;
747     }
748 
749     /**
750      * Sets the payrollEndDateFiscalYear
751      *
752      * @param payrollEndDateFiscalYear The payrollEndDateFiscalYear to set.
753      */
754     @Override
755     public void setPayrollEndDateFiscalYear(Integer payrollEndDateFiscalYear) {
756         this.payrollEndDateFiscalYear = payrollEndDateFiscalYear;
757     }
758 
759     /**
760      * Gets the payrollEndDateFiscalPeriodCode
761      *
762      * @return Returns the payrollEndDateFiscalPeriodCode
763      */
764     @Override
765     public String getPayrollEndDateFiscalPeriodCode() {
766         return payrollEndDateFiscalPeriodCode;
767     }
768 
769     /**
770      * Sets the payrollEndDateFiscalPeriodCode
771      *
772      * @param payrollEndDateFiscalPeriodCode The payrollEndDateFiscalPeriodCode to set.
773      */
774     @Override
775     public void setPayrollEndDateFiscalPeriodCode(String payrollEndDateFiscalPeriodCode) {
776         this.payrollEndDateFiscalPeriodCode = payrollEndDateFiscalPeriodCode;
777     }
778 
779     /**
780      * Gets the emplid
781      *
782      * @return Returns the emplid
783      */
784     @Override
785     public String getEmplid() {
786         return emplid;
787     }
788 
789     /**
790      * Sets the emplid
791      *
792      * @param emplid The emplid to set.
793      */
794     @Override
795     public void setEmplid(String emplid) {
796         this.emplid = emplid;
797     }
798 
799     /**
800      * Gets the employeeRecord
801      *
802      * @return Returns the employeeRecord
803      */
804     @Override
805     public Integer getEmployeeRecord() {
806         return employeeRecord;
807     }
808 
809     /**
810      * Sets the employeeRecord
811      *
812      * @param employeeRecord The employeeRecord to set.
813      */
814     @Override
815     public void setEmployeeRecord(Integer employeeRecord) {
816         this.employeeRecord = employeeRecord;
817     }
818 
819     /**
820      * Gets the earnCode
821      *
822      * @return Returns the earnCode
823      */
824     @Override
825     public String getEarnCode() {
826         return earnCode;
827     }
828 
829     /**
830      * Sets the earnCode
831      *
832      * @param earnCode The earnCode to set.
833      */
834     @Override
835     public void setEarnCode(String earnCode) {
836         this.earnCode = earnCode;
837     }
838 
839     /**
840      * Gets the payGroup
841      *
842      * @return Returns the payGroup
843      */
844     @Override
845     public String getPayGroup() {
846         return payGroup;
847     }
848 
849     /**
850      * Sets the payGroup
851      *
852      * @param payGroup The payGroup to set.
853      */
854     @Override
855     public void setPayGroup(String payGroup) {
856         this.payGroup = payGroup;
857     }
858 
859     /**
860      * Gets the salaryAdministrationPlan
861      *
862      * @return Returns the salaryAdministrationPlan
863      */
864     @Override
865     public String getSalaryAdministrationPlan() {
866         return salaryAdministrationPlan;
867     }
868 
869     /**
870      * Sets the salaryAdministrationPlan
871      *
872      * @param salaryAdministrationPlan The salaryAdministrationPlan to set.
873      */
874     @Override
875     public void setSalaryAdministrationPlan(String salaryAdministrationPlan) {
876         this.salaryAdministrationPlan = salaryAdministrationPlan;
877     }
878 
879     /**
880      * Gets the grade
881      *
882      * @return Returns the grade
883      */
884     @Override
885     public String getGrade() {
886         return grade;
887     }
888 
889     /**
890      * Sets the grade
891      *
892      * @param grade The grade to set.
893      */
894     @Override
895     public void setGrade(String grade) {
896         this.grade = grade;
897     }
898 
899     /**
900      * Gets the runIdentifier
901      *
902      * @return Returns the runIdentifier
903      */
904     @Override
905     public String getRunIdentifier() {
906         return runIdentifier;
907     }
908 
909     /**
910      * Sets the runIdentifier
911      *
912      * @param runIdentifier The runIdentifier to set.
913      */
914     @Override
915     public void setRunIdentifier(String runIdentifier) {
916         this.runIdentifier = runIdentifier;
917     }
918 
919     /**
920      * Gets the laborLedgerOriginalChartOfAccountsCode
921      *
922      * @return Returns the laborLedgerOriginalChartOfAccountsCode
923      */
924     @Override
925     public String getLaborLedgerOriginalChartOfAccountsCode() {
926         return laborLedgerOriginalChartOfAccountsCode;
927     }
928 
929     /**
930      * Sets the laborLedgerOriginalChartOfAccountsCode
931      *
932      * @param laborLedgerOriginalChartOfAccountsCode The laborLedgerOriginalChartOfAccountsCode to set.
933      */
934     @Override
935     public void setLaborLedgerOriginalChartOfAccountsCode(String laborLedgerOriginalChartOfAccountsCode) {
936         this.laborLedgerOriginalChartOfAccountsCode = laborLedgerOriginalChartOfAccountsCode;
937     }
938 
939     /**
940      * Gets the laborLedgerOriginalAccountNumber
941      *
942      * @return Returns the laborLedgerOriginalAccountNumber
943      */
944     @Override
945     public String getLaborLedgerOriginalAccountNumber() {
946         return laborLedgerOriginalAccountNumber;
947     }
948 
949     /**
950      * Sets the laborLedgerOriginalAccountNumber
951      *
952      * @param laborLedgerOriginalAccountNumber The laborLedgerOriginalAccountNumber to set.
953      */
954     @Override
955     public void setLaborLedgerOriginalAccountNumber(String laborLedgerOriginalAccountNumber) {
956         this.laborLedgerOriginalAccountNumber = laborLedgerOriginalAccountNumber;
957     }
958 
959     /**
960      * Gets the laborLedgerOriginalSubAccountNumber
961      *
962      * @return Returns the laborLedgerOriginalSubAccountNumber
963      */
964     @Override
965     public String getLaborLedgerOriginalSubAccountNumber() {
966         return laborLedgerOriginalSubAccountNumber;
967     }
968 
969     /**
970      * Sets the laborLedgerOriginalSubAccountNumber
971      *
972      * @param laborLedgerOriginalSubAccountNumber The laborLedgerOriginalSubAccountNumber to set.
973      */
974     @Override
975     public void setLaborLedgerOriginalSubAccountNumber(String laborLedgerOriginalSubAccountNumber) {
976         this.laborLedgerOriginalSubAccountNumber = laborLedgerOriginalSubAccountNumber;
977     }
978 
979     /**
980      * Gets the laborLedgerOriginalFinancialObjectCode
981      *
982      * @return Returns the laborLedgerOriginalFinancialObjectCode
983      */
984     @Override
985     public String getLaborLedgerOriginalFinancialObjectCode() {
986         return laborLedgerOriginalFinancialObjectCode;
987     }
988 
989     /**
990      * Sets the laborLedgerOriginalFinancialObjectCode
991      *
992      * @param laborLedgerOriginalFinancialObjectCode The laborLedgerOriginalFinancialObjectCode to set.
993      */
994     @Override
995     public void setLaborLedgerOriginalFinancialObjectCode(String laborLedgerOriginalFinancialObjectCode) {
996         this.laborLedgerOriginalFinancialObjectCode = laborLedgerOriginalFinancialObjectCode;
997     }
998 
999     /**
1000      * Gets the laborLedgerOriginalFinancialSubObjectCode
1001      *
1002      * @return Returns the laborLedgerOriginalFinancialSubObjectCode
1003      */
1004     @Override
1005     public String getLaborLedgerOriginalFinancialSubObjectCode() {
1006         return laborLedgerOriginalFinancialSubObjectCode;
1007     }
1008 
1009     /**
1010      * Sets the laborLedgerOriginalFinancialSubObjectCode
1011      *
1012      * @param laborLedgerOriginalFinancialSubObjectCode The laborLedgerOriginalFinancialSubObjectCode to set.
1013      */
1014     @Override
1015     public void setLaborLedgerOriginalFinancialSubObjectCode(String laborLedgerOriginalFinancialSubObjectCode) {
1016         this.laborLedgerOriginalFinancialSubObjectCode = laborLedgerOriginalFinancialSubObjectCode;
1017     }
1018 
1019     /**
1020      * Gets the hrmsCompany
1021      *
1022      * @return Returns the hrmsCompany
1023      */
1024     @Override
1025     public String getHrmsCompany() {
1026         return hrmsCompany;
1027     }
1028 
1029     /**
1030      * Sets the hrmsCompany
1031      *
1032      * @param hrmsCompany The hrmsCompany to set.
1033      */
1034     @Override
1035     public void setHrmsCompany(String hrmsCompany) {
1036         this.hrmsCompany = hrmsCompany;
1037     }
1038 
1039     /**
1040      * Gets the setid
1041      *
1042      * @return Returns the setid
1043      */
1044     @Override
1045     public String getSetid() {
1046         return setid;
1047     }
1048 
1049     /**
1050      * Sets the setid
1051      *
1052      * @param setid The setid to set.
1053      */
1054     @Override
1055     public void setSetid(String setid) {
1056         this.setid = setid;
1057     }
1058 
1059     /**
1060      * Gets the transactionDateTimeStamp
1061      *
1062      * @return Returns the transactionDateTimeStamp
1063      */
1064     @Override
1065     public Timestamp getTransactionDateTimeStamp() {
1066         return transactionDateTimeStamp;
1067     }
1068 
1069     /**
1070      * Sets the transactionDateTimeStamp
1071      *
1072      * @param transactionDateTimeStamp The transactionDateTimeStamp to set.
1073      */
1074     @Override
1075     public void setTransactionDateTimeStamp(Timestamp transactionDateTimeStamp) {
1076         this.transactionDateTimeStamp = transactionDateTimeStamp;
1077     }
1078 
1079     /**
1080      * Gets the financialObject
1081      *
1082      * @return Returns the financialObject
1083      */
1084     @Override
1085     public ObjectCode getFinancialObject() {
1086         return financialObject;
1087     }
1088 
1089     /**
1090      * Sets the financialObject
1091      *
1092      * @param financialObject The financialObject to set.
1093      */
1094     @Override
1095     @Deprecated
1096     public void setFinancialObject(ObjectCode financialObject) {
1097         this.financialObject = financialObject;
1098     }
1099 
1100     /**
1101      * Gets the chartOfAccounts
1102      *
1103      * @return Returns the chartOfAccounts
1104      */
1105     @Override
1106     public Chart getChartOfAccounts() {
1107         return chartOfAccounts;
1108     }
1109 
1110     /**
1111      * Sets the chartOfAccounts
1112      *
1113      * @param chartOfAccounts The chartOfAccounts to set.
1114      */
1115     @Override
1116     @Deprecated
1117     public void setChartOfAccounts(Chart chartOfAccounts) {
1118         this.chartOfAccounts = chartOfAccounts;
1119     }
1120 
1121     /**
1122      * Gets the account
1123      *
1124      * @return Returns the account
1125      */
1126     @Override
1127     public Account getAccount() {
1128         return account;
1129     }
1130 
1131     /**
1132      * Sets the account
1133      *
1134      * @param account The account to set.
1135      */
1136     @Override
1137     @Deprecated
1138     public void setAccount(Account account) {
1139         this.account = account;
1140     }
1141 
1142     /**
1143      * Gets the universityFiscalPeriod
1144      *
1145      * @return Returns the universityFiscalPeriod.
1146      */
1147     @Override
1148     public AccountingPeriod getUniversityFiscalPeriod() {
1149         return universityFiscalPeriod;
1150     }
1151 
1152     /**
1153      * Sets the universityFiscalPeriod
1154      *
1155      * @param universityFiscalPeriod The universityFiscalPeriod to set.
1156      */
1157     @Override
1158     @Deprecated
1159     public void setUniversityFiscalPeriod(AccountingPeriod universityFiscalPeriod) {
1160         this.universityFiscalPeriod = universityFiscalPeriod;
1161     }
1162 
1163     /**
1164      * Gets the balanceType
1165      *
1166      * @return Returns the balanceType.
1167      */
1168     @Override
1169     public BalanceType getBalanceType() {
1170         return balanceType;
1171     }
1172 
1173     /**
1174      * Sets the balanceType
1175      *
1176      * @param balanceType The balanceType to set.
1177      */
1178     @Override
1179     @Deprecated
1180     public void setBalanceType(BalanceType balanceType) {
1181         this.balanceType = balanceType;
1182     }
1183 
1184     /**
1185      * Gets the financialSystemDocumentTypeCode attribute.
1186      * @return Returns the financialSystemDocumentTypeCode.
1187      */
1188     @Override
1189     public DocumentTypeEBO getFinancialSystemDocumentTypeCode() {
1190         if ( financialSystemDocumentTypeCode == null || !StringUtils.equals(financialSystemDocumentTypeCode.getName(), financialDocumentTypeCode) ) {
1191             financialSystemDocumentTypeCode = null;
1192             if ( StringUtils.isNotBlank(financialDocumentTypeCode) ) {
1193                 DocumentType docType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(financialDocumentTypeCode);
1194                 if ( docType != null ) {
1195                     financialSystemDocumentTypeCode = org.kuali.rice.kew.doctype.bo.DocumentType.from(docType);
1196                 }
1197             }
1198         }
1199         return financialSystemDocumentTypeCode;
1200     }
1201 
1202     /**
1203      * Gets the referenceFinancialSystemDocumentTypeCode attribute.
1204      * @return Returns the referenceFinancialSystemDocumentTypeCode.
1205      */
1206     @Override
1207     public DocumentTypeEBO getReferenceFinancialSystemDocumentTypeCode() {
1208         if ( referenceFinancialSystemDocumentTypeCode == null || !StringUtils.equals(referenceFinancialSystemDocumentTypeCode.getName(), referenceFinancialDocumentTypeCode) ) {
1209             referenceFinancialSystemDocumentTypeCode = null;
1210             if ( StringUtils.isNotBlank(referenceFinancialDocumentTypeCode) ) {
1211                 DocumentType docType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(referenceFinancialDocumentTypeCode);
1212                 if ( docType != null ) {
1213                     referenceFinancialSystemDocumentTypeCode = org.kuali.rice.kew.doctype.bo.DocumentType.from(docType);
1214                 }
1215             }
1216         }
1217         return referenceFinancialSystemDocumentTypeCode;
1218     }
1219 
1220     /**
1221      * Gets the financialObjectType
1222      *
1223      * @return Returns the financialObjectType.
1224      */
1225     @Override
1226     public ObjectType getFinancialObjectType() {
1227         return financialObjectType;
1228     }
1229 
1230     /**
1231      * Sets the financialObjectType
1232      *
1233      * @param financialObjectType The financialObjectType to set.
1234      */
1235     @Override
1236     @Deprecated
1237     public void setFinancialObjectType(ObjectType financialObjectType) {
1238         this.financialObjectType = financialObjectType;
1239     }
1240 
1241     /**
1242      * Gets the financialSubObject
1243      *
1244      * @return Returns the financialSubObject.
1245      */
1246     @Override
1247     public SubObjectCode getFinancialSubObject() {
1248         return financialSubObject;
1249     }
1250 
1251     /**
1252      * Sets the financialSubObject
1253      *
1254      * @param financialSubObject The financialSubObject to set.
1255      */
1256     @Override
1257     @Deprecated
1258     public void setFinancialSubObject(SubObjectCode financialSubObject) {
1259         this.financialSubObject = financialSubObject;
1260     }
1261 
1262     /**
1263      * Gets the option
1264      *
1265      * @return Returns the option.
1266      */
1267     @Override
1268     public SystemOptions getOption() {
1269         return option;
1270     }
1271 
1272     /**
1273      * Sets the option
1274      *
1275      * @param option The option to set.
1276      */
1277     @Override
1278     @Deprecated
1279     public void setOption(SystemOptions option) {
1280         this.option = option;
1281     }
1282 
1283     /**
1284      * Gets the payrollEndDateFiscalPeriod
1285      *
1286      * @return Returns the payrollEndDateFiscalPeriod.
1287      */
1288     @Override
1289     public AccountingPeriod getPayrollEndDateFiscalPeriod() {
1290         return payrollEndDateFiscalPeriod;
1291     }
1292 
1293     /**
1294      * Sets the payrollEndDateFiscalPeriod
1295      *
1296      * @param payrollEndDateFiscalPeriod The payrollEndDateFiscalPeriod to set.
1297      */
1298     @Override
1299     @Deprecated
1300     public void setPayrollEndDateFiscalPeriod(AccountingPeriod payrollEndDateFiscalPeriod) {
1301         this.payrollEndDateFiscalPeriod = payrollEndDateFiscalPeriod;
1302     }
1303 
1304     /**
1305      * Gets the project
1306      *
1307      * @return Returns the project.
1308      */
1309     @Override
1310     public ProjectCode getProject() {
1311         return project;
1312     }
1313 
1314     /**
1315      * Sets the project
1316      *
1317      * @param project The project to set.
1318      */
1319     @Override
1320     @Deprecated
1321     public void setProject(ProjectCode project) {
1322         this.project = project;
1323     }
1324 
1325     /**
1326      * Gets the referenceOriginationCode
1327      *
1328      * @return Returns the referenceOriginationCode.
1329      */
1330     @Override
1331     public OriginationCode getReferenceOriginationCode() {
1332         return referenceOriginationCode;
1333     }
1334 
1335     /**
1336      * Sets the referenceOriginationCode
1337      *
1338      * @param referenceOriginationCode The referenceOriginationCode to set.
1339      */
1340     @Override
1341     @Deprecated
1342     public void setReferenceOriginationCode(OriginationCode referenceOriginationCode) {
1343         this.referenceOriginationCode = referenceOriginationCode;
1344     }
1345 
1346     /**
1347      * Gets the subAccount
1348      *
1349      * @return Returns the subAccount.
1350      */
1351     @Override
1352     public SubAccount getSubAccount() {
1353         return subAccount;
1354     }
1355 
1356     /**
1357      * Sets the subAccount
1358      *
1359      * @param subAccount The subAccount to set.
1360      */
1361     @Override
1362     @Deprecated
1363     public void setSubAccount(SubAccount subAccount) {
1364         this.subAccount = subAccount;
1365     }
1366 
1367     /**
1368      * Gets the financialSystemOrigination
1369      *
1370      * @return Returns the financialSystemOrigination.
1371      */
1372     @Override
1373     public OriginationCode getFinancialSystemOrigination() {
1374         return financialSystemOrigination;
1375     }
1376 
1377     /**
1378      * Sets the financialSystemOrigination
1379      *
1380      * @param financialSystemOrigination The financialSystemOrigination to set.
1381      */
1382     @Override
1383     @Deprecated
1384     public void setFinancialSystemOrigination(OriginationCode financialSystemOrigination) {
1385         this.financialSystemOrigination = financialSystemOrigination;
1386     }
1387 
1388     /**
1389      * @see org.kuali.kfs.bo.LaborLedgerEntry#getLaborLedgerObject()
1390      */
1391     @Override
1392     public LaborLedgerObject getLaborLedgerObject() {
1393         return this.laborObject;
1394     }
1395 
1396     /**
1397      * @see org.kuali.kfs.bo.LaborLedgerEntry#setLaborLedgerObject(org.kuali.kfs.bo.LaborLedgerObject)
1398      */
1399     @Override
1400     @Deprecated
1401     public void setLaborLedgerObject(LaborLedgerObject laborLedgerObject) {
1402         this.laborObject = (LaborObject) laborLedgerObject;
1403     }
1404 
1405     /**
1406      * Gets the laborObject attribute.
1407      *
1408      * @return Returns the laborObject.
1409      */
1410     public LaborObject getLaborObject() {
1411         return laborObject;
1412     }
1413 
1414     /**
1415      * Sets the laborObject attribute value.
1416      *
1417      * @param laborObject The laborObject to set.
1418      */
1419     @Deprecated
1420     public void setLaborObject(LaborObject laborObject) {
1421         this.laborObject = laborObject;
1422     }
1423 
1424     /**
1425      * @return the employee associated with this record
1426      */
1427     public Person getEmployee() {
1428         if (employee == null || !StringUtils.equals(employee.getEmployeeId(), getEmplid())) {
1429             employee = SpringContext.getBean(PersonService.class).getPersonByEmployeeId(getEmplid());
1430             if (employee == null) {
1431                 final Class<? extends Person> employeeClass = SpringContext.getBean(PersonService.class).getPersonImplementationClass();
1432                 try {
1433                     employee = employeeClass.newInstance();
1434                 }
1435                 catch (InstantiationException ie) {
1436                     throw new RuntimeException("Could not instantiate empty Person object", ie);
1437                 }
1438                 catch (IllegalAccessException iae) {
1439                     throw new RuntimeException("Could not instantiate empty Person object", iae);
1440                 }
1441             }
1442         }
1443         return employee;
1444     }
1445 
1446     /**
1447      * Sets the employee.
1448      * @param employee the employee to set
1449      */
1450     @Deprecated
1451     public void setEmployee(Person employee) {
1452         this.employee = employee;
1453     }
1454 
1455     /**
1456      * construct the key list of the business object.
1457      *
1458      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
1459      */
1460     @SuppressWarnings("unchecked")
1461     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
1462         LinkedHashMap m = new LinkedHashMap();
1463         if (this.universityFiscalYear != null) {
1464             m.put("universityFiscalYear", this.universityFiscalYear.toString());
1465         }
1466         m.put("chartOfAccountsCode", this.chartOfAccountsCode);
1467         m.put("accountNumber", this.accountNumber);
1468         m.put("subAccountNumber", this.subAccountNumber);
1469         m.put("financialObjectCode", this.financialObjectCode);
1470         m.put("financialSubObjectCode", this.financialSubObjectCode);
1471         m.put("financialBalanceTypeCode", this.financialBalanceTypeCode);
1472         m.put("financialObjectTypeCode", this.financialObjectTypeCode);
1473         m.put("universityFiscalPeriodCode", this.universityFiscalPeriodCode);
1474         m.put("financialDocumentTypeCode", this.financialDocumentTypeCode);
1475         m.put(KFSPropertyConstants.DOCUMENT_NUMBER, this.documentNumber);
1476         if (this.transactionLedgerEntrySequenceNumber != null) {
1477             m.put("transactionLedgerEntrySequenceNumber", this.transactionLedgerEntrySequenceNumber.toString());
1478         }
1479 
1480         return m;
1481     }
1482 }