001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.purap.bo;
018:
019: import java.io.Serializable;
020: import java.sql.Date;
021: import java.util.LinkedHashMap;
022:
023: import org.kuali.core.bo.DocumentHeader;
024: import org.kuali.core.bo.DocumentType;
025: import org.kuali.core.bo.PersistableBusinessObjectBase;
026: import org.kuali.core.util.KualiDecimal;
027: import org.kuali.kfs.KFSPropertyConstants;
028: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
029: import org.kuali.kfs.bo.Options;
030: import org.kuali.kfs.bo.OriginationCode;
031: import org.kuali.kfs.rules.AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE;
032: import org.kuali.module.chart.bo.A21SubAccount;
033: import org.kuali.module.chart.bo.Account;
034: import org.kuali.module.chart.bo.AccountingPeriod;
035: import org.kuali.module.chart.bo.Chart;
036: import org.kuali.module.chart.bo.ObjectCode;
037: import org.kuali.module.chart.bo.ObjectType;
038: import org.kuali.module.chart.bo.ProjectCode;
039: import org.kuali.module.chart.bo.SubAccount;
040: import org.kuali.module.chart.bo.SubObjCd;
041: import org.kuali.module.chart.bo.codes.BalanceTyp;
042: import org.kuali.module.gl.bo.Transaction;
043: import org.kuali.module.gl.bo.TransientBalanceInquiryAttributes;
044:
045: /**
046: * Purap General Ledger Pending Entry Business Object. The general ledger pending entry structure holds financial transaction info
047: * that will post to the general ledger as an entry.
048: */
049: public class PurapGeneralLedgerPendingEntry extends
050: PersistableBusinessObjectBase implements Transaction,
051: Serializable, Cloneable {
052:
053: private static final long serialVersionUID = 4041748389323105932L;
054: private String financialSystemOriginationCode;
055: private String documentNumber;
056: private Integer transactionLedgerEntrySequenceNumber;
057: private String chartOfAccountsCode;
058: private String accountNumber;
059: private String subAccountNumber;
060: private String financialObjectCode;
061: private String financialSubObjectCode;
062: private String financialBalanceTypeCode;
063: private String financialObjectTypeCode;
064: private Integer universityFiscalYear;
065: private String universityFiscalPeriodCode;
066: private String transactionLedgerEntryDescription;
067: private KualiDecimal transactionLedgerEntryAmount;
068: private String transactionDebitCreditCode;
069: private Date transactionDate;
070: private String financialDocumentTypeCode;
071: private String organizationDocumentNumber;
072: private String projectCode;
073: private String organizationReferenceId;
074: private String referenceFinancialDocumentTypeCode;
075: private String referenceFinancialSystemOriginationCode;
076: private String referenceFinancialDocumentNumber;
077: private Date financialDocumentReversalDate;
078: private String transactionEncumbranceUpdateCode;
079: private String financialDocumentApprovedCode;
080: private String acctSufficientFundsFinObjCd;
081: private boolean transactionEntryOffsetIndicator;
082: private Date transactionEntryProcessedTs;
083:
084: private DocumentType documentType;
085: private DocumentHeader documentHeader;
086:
087: private Options option;
088: private Chart chart;
089: private Account account;
090: private SubAccount subAccount;
091: private ObjectCode financialObject;
092: private SubObjCd financialSubObject;
093: private BalanceTyp balanceType;
094: private ObjectType objectType;
095: private A21SubAccount a21SubAccount;
096: private TransientBalanceInquiryAttributes dummyBusinessObject;
097: private OriginationCode originationCode;
098: private ProjectCode project;
099: private OriginationCode referenceOriginationCode;
100: private DocumentType referenceDocumentType;
101: private AccountingPeriod accountingPeriod;
102:
103: /**
104: * Default no-arg constructor.
105: */
106: public PurapGeneralLedgerPendingEntry() {
107: this .objectType = new ObjectType();
108: this .balanceType = new BalanceTyp();
109: this .dummyBusinessObject = new TransientBalanceInquiryAttributes();
110: this .financialObject = new ObjectCode();
111: }
112:
113: /**
114: * Copy constructor Constructs a GeneralLedgerPendingEntry.java.
115: *
116: * @param original entry to copy
117: */
118: public PurapGeneralLedgerPendingEntry(
119: PurapGeneralLedgerPendingEntry original) {
120: financialSystemOriginationCode = original.financialSystemOriginationCode;
121: documentNumber = original.documentNumber;
122: transactionLedgerEntrySequenceNumber = original.transactionLedgerEntrySequenceNumber;
123: chartOfAccountsCode = original.chartOfAccountsCode;
124: accountNumber = original.accountNumber;
125: subAccountNumber = original.subAccountNumber;
126: financialObjectCode = original.financialObjectCode;
127: financialSubObjectCode = original.financialSubObjectCode;
128: financialBalanceTypeCode = original.financialBalanceTypeCode;
129: financialObjectTypeCode = original.financialObjectTypeCode;
130: universityFiscalYear = original.universityFiscalYear;
131: universityFiscalPeriodCode = original.universityFiscalPeriodCode;
132: transactionLedgerEntryDescription = original.transactionLedgerEntryDescription;
133: transactionLedgerEntryAmount = original.transactionLedgerEntryAmount;
134: transactionDebitCreditCode = original.transactionDebitCreditCode;
135: transactionDate = original.transactionDate;
136: financialDocumentTypeCode = original.financialDocumentTypeCode;
137: organizationDocumentNumber = original.organizationDocumentNumber;
138: projectCode = original.projectCode;
139: organizationReferenceId = original.organizationReferenceId;
140: referenceFinancialDocumentTypeCode = original.referenceFinancialDocumentTypeCode;
141: referenceFinancialSystemOriginationCode = original.referenceFinancialSystemOriginationCode;
142: referenceFinancialDocumentNumber = original.referenceFinancialDocumentNumber;
143: financialDocumentReversalDate = original.financialDocumentReversalDate;
144: transactionEncumbranceUpdateCode = original.transactionEncumbranceUpdateCode;
145: financialDocumentApprovedCode = original.financialDocumentApprovedCode;
146: acctSufficientFundsFinObjCd = original.acctSufficientFundsFinObjCd;
147: transactionEntryOffsetIndicator = original.transactionEntryOffsetIndicator;
148: transactionEntryProcessedTs = original.transactionEntryProcessedTs;
149: }
150:
151: /**
152: * Copy from GeneralLedgerPendingEntry constructor Constructs a PurapGeneralLedgerPendingEntry.java from
153: * GeneralLedgerPendingEntry.
154: *
155: * @param original entry to copy
156: */
157: public PurapGeneralLedgerPendingEntry(
158: GeneralLedgerPendingEntry original) {
159: financialSystemOriginationCode = original
160: .getFinancialSystemOriginationCode();
161: documentNumber = original.getDocumentNumber();
162: transactionLedgerEntrySequenceNumber = original
163: .getTransactionLedgerEntrySequenceNumber();
164: chartOfAccountsCode = original.getChartOfAccountsCode();
165: accountNumber = original.getAccountNumber();
166: subAccountNumber = original.getSubAccountNumber();
167: financialObjectCode = original.getFinancialObjectCode();
168: financialSubObjectCode = original.getFinancialSubObjectCode();
169: financialBalanceTypeCode = original
170: .getFinancialBalanceTypeCode();
171: financialObjectTypeCode = original.getFinancialObjectTypeCode();
172: universityFiscalYear = original.getUniversityFiscalYear();
173: universityFiscalPeriodCode = original
174: .getUniversityFiscalPeriodCode();
175: transactionLedgerEntryDescription = original
176: .getTransactionLedgerEntryDescription();
177: transactionLedgerEntryAmount = original
178: .getTransactionLedgerEntryAmount();
179: transactionDebitCreditCode = original
180: .getTransactionDebitCreditCode();
181: transactionDate = original.getTransactionDate();
182: financialDocumentTypeCode = original
183: .getFinancialDocumentTypeCode();
184: organizationDocumentNumber = original
185: .getOrganizationDocumentNumber();
186: projectCode = original.getProjectCode();
187: organizationReferenceId = original.getOrganizationReferenceId();
188: referenceFinancialDocumentTypeCode = original
189: .getReferenceFinancialDocumentTypeCode();
190: referenceFinancialSystemOriginationCode = original
191: .getReferenceFinancialSystemOriginationCode();
192: referenceFinancialDocumentNumber = original
193: .getReferenceFinancialDocumentNumber();
194: financialDocumentReversalDate = original
195: .getFinancialDocumentReversalDate();
196: transactionEncumbranceUpdateCode = original
197: .getTransactionEncumbranceUpdateCode();
198: financialDocumentApprovedCode = original
199: .getFinancialDocumentApprovedCode();
200: acctSufficientFundsFinObjCd = original
201: .getAcctSufficientFundsFinObjCd();
202: transactionEntryOffsetIndicator = original
203: .isTransactionEntryOffsetIndicator();
204: transactionEntryProcessedTs = original
205: .getTransactionEntryProcessedTs();
206: }
207:
208: public DocumentType getReferenceDocumentType() {
209: return referenceDocumentType;
210: }
211:
212: public void setReferenceDocumentType(
213: DocumentType referenceDocumentType) {
214: this .referenceDocumentType = referenceDocumentType;
215: }
216:
217: public OriginationCode getReferenceOriginationCode() {
218: return referenceOriginationCode;
219: }
220:
221: public void setReferenceOriginationCode(
222: OriginationCode referenceOriginationCode) {
223: this .referenceOriginationCode = referenceOriginationCode;
224: }
225:
226: public ProjectCode getProject() {
227: return project;
228: }
229:
230: public void setProject(ProjectCode project) {
231: this .project = project;
232: }
233:
234: public OriginationCode getOriginationCode() {
235: return originationCode;
236: }
237:
238: public void setOriginationCode(OriginationCode originationCode) {
239: this .originationCode = originationCode;
240: }
241:
242: public void setOption(Options option) {
243: this .option = option;
244: }
245:
246: public Options getOption() {
247: return option;
248: }
249:
250: public String getDocumentNumber() {
251: return documentNumber;
252: }
253:
254: public void setDocumentNumber(String documentNumber) {
255: this .documentNumber = documentNumber;
256: }
257:
258: public Integer getTransactionLedgerEntrySequenceNumber() {
259: return transactionLedgerEntrySequenceNumber;
260: }
261:
262: public void setTransactionLedgerEntrySequenceNumber(
263: Integer transactionLedgerEntrySequenceNumber) {
264: this .transactionLedgerEntrySequenceNumber = transactionLedgerEntrySequenceNumber;
265: }
266:
267: public String getChartOfAccountsCode() {
268: return chartOfAccountsCode;
269: }
270:
271: public void setChartOfAccountsCode(String chartOfAccountsCode) {
272: this .chartOfAccountsCode = chartOfAccountsCode;
273: }
274:
275: public String getAccountNumber() {
276: return accountNumber;
277: }
278:
279: public void setAccountNumber(String accountNumber) {
280: this .accountNumber = accountNumber;
281: }
282:
283: public String getSubAccountNumber() {
284: return subAccountNumber;
285: }
286:
287: public void setSubAccountNumber(String subAccountNumber) {
288: this .subAccountNumber = subAccountNumber;
289: }
290:
291: public String getFinancialObjectCode() {
292: return financialObjectCode;
293: }
294:
295: public void setFinancialObjectCode(String financialObjectCode) {
296: this .financialObjectCode = financialObjectCode;
297: }
298:
299: public String getFinancialSubObjectCode() {
300: return financialSubObjectCode;
301: }
302:
303: public void setFinancialSubObjectCode(String financialSubObjectCode) {
304: this .financialSubObjectCode = financialSubObjectCode;
305: }
306:
307: public String getFinancialBalanceTypeCode() {
308: return financialBalanceTypeCode;
309: }
310:
311: public void setFinancialBalanceTypeCode(
312: String financialBalanceTypeCode) {
313: this .financialBalanceTypeCode = financialBalanceTypeCode;
314: }
315:
316: public String getFinancialObjectTypeCode() {
317: return financialObjectTypeCode;
318: }
319:
320: public void setFinancialObjectTypeCode(
321: String financialObjectTypeCode) {
322: this .financialObjectTypeCode = financialObjectTypeCode;
323: }
324:
325: public Integer getUniversityFiscalYear() {
326: return universityFiscalYear;
327: }
328:
329: public void setUniversityFiscalYear(Integer universityFiscalYear) {
330: this .universityFiscalYear = universityFiscalYear;
331: }
332:
333: public String getUniversityFiscalPeriodCode() {
334: return universityFiscalPeriodCode;
335: }
336:
337: public void setUniversityFiscalPeriodCode(
338: String universityFiscalPeriodCode) {
339: this .universityFiscalPeriodCode = universityFiscalPeriodCode;
340: }
341:
342: public String getTransactionLedgerEntryDescription() {
343: return transactionLedgerEntryDescription;
344: }
345:
346: public void setTransactionLedgerEntryDescription(
347: String transactionLedgerEntryDescription) {
348: this .transactionLedgerEntryDescription = transactionLedgerEntryDescription;
349: }
350:
351: public KualiDecimal getTransactionLedgerEntryAmount() {
352: return transactionLedgerEntryAmount;
353: }
354:
355: public void setTransactionLedgerEntryAmount(
356: KualiDecimal transactionLedgerEntryAmount) {
357: this .transactionLedgerEntryAmount = transactionLedgerEntryAmount;
358: }
359:
360: public String getTransactionDebitCreditCode() {
361: return transactionDebitCreditCode;
362: }
363:
364: public void setTransactionDebitCreditCode(
365: String transactionDebitCreditCode) {
366: this .transactionDebitCreditCode = transactionDebitCreditCode;
367: }
368:
369: public Date getTransactionDate() {
370: return transactionDate;
371: }
372:
373: public void setTransactionDate(Date transactionDate) {
374: this .transactionDate = transactionDate;
375: }
376:
377: public String getFinancialDocumentTypeCode() {
378: return financialDocumentTypeCode;
379: }
380:
381: public void setFinancialDocumentTypeCode(
382: String financialDocumentTypeCode) {
383: this .financialDocumentTypeCode = financialDocumentTypeCode;
384: }
385:
386: public String getOrganizationDocumentNumber() {
387: return organizationDocumentNumber;
388: }
389:
390: public void setOrganizationDocumentNumber(
391: String organizationDocumentNumber) {
392: this .organizationDocumentNumber = organizationDocumentNumber;
393: }
394:
395: public String getProjectCode() {
396: return projectCode;
397: }
398:
399: public void setProjectCode(String projectCode) {
400: this .projectCode = projectCode;
401: }
402:
403: public String getOrganizationReferenceId() {
404: return organizationReferenceId;
405: }
406:
407: public void setOrganizationReferenceId(
408: String organizationReferenceId) {
409: this .organizationReferenceId = organizationReferenceId;
410: }
411:
412: public String getReferenceFinancialDocumentTypeCode() {
413: return referenceFinancialDocumentTypeCode;
414: }
415:
416: public void setReferenceFinancialDocumentTypeCode(
417: String referenceFinancialDocumentTypeCode) {
418: this .referenceFinancialDocumentTypeCode = referenceFinancialDocumentTypeCode;
419: }
420:
421: public String getReferenceFinancialSystemOriginationCode() {
422: return referenceFinancialSystemOriginationCode;
423: }
424:
425: public void setReferenceFinancialSystemOriginationCode(
426: String referenceFinancialSystemOriginationCode) {
427: this .referenceFinancialSystemOriginationCode = referenceFinancialSystemOriginationCode;
428: }
429:
430: public String getReferenceFinancialDocumentNumber() {
431: return referenceFinancialDocumentNumber;
432: }
433:
434: public void setReferenceFinancialDocumentNumber(
435: String referenceFinancialDocumentNumber) {
436: this .referenceFinancialDocumentNumber = referenceFinancialDocumentNumber;
437: }
438:
439: public Date getFinancialDocumentReversalDate() {
440: return financialDocumentReversalDate;
441: }
442:
443: public void setFinancialDocumentReversalDate(
444: Date financialDocumentReversalDate) {
445: this .financialDocumentReversalDate = financialDocumentReversalDate;
446: }
447:
448: public String getTransactionEncumbranceUpdateCode() {
449: return transactionEncumbranceUpdateCode;
450: }
451:
452: public void setTransactionEncumbranceUpdateCode(
453: String transactionEncumbranceUpdateCode) {
454: this .transactionEncumbranceUpdateCode = transactionEncumbranceUpdateCode;
455: }
456:
457: public String getFinancialDocumentApprovedCode() {
458: return financialDocumentApprovedCode;
459: }
460:
461: public void setFinancialDocumentApprovedCode(
462: String financialDocumentApprovedCode) {
463: this .financialDocumentApprovedCode = financialDocumentApprovedCode;
464: }
465:
466: public String getAcctSufficientFundsFinObjCd() {
467: return acctSufficientFundsFinObjCd;
468: }
469:
470: public void setAcctSufficientFundsFinObjCd(
471: String acctSufficientFundsFinObjCd) {
472: this .acctSufficientFundsFinObjCd = acctSufficientFundsFinObjCd;
473: }
474:
475: public boolean isTransactionEntryOffsetIndicator() {
476: return transactionEntryOffsetIndicator;
477: }
478:
479: public void setTransactionEntryOffsetIndicator(
480: boolean transactionEntryOffsetIndicator) {
481: this .transactionEntryOffsetIndicator = transactionEntryOffsetIndicator;
482: }
483:
484: public Date getTransactionEntryProcessedTs() {
485: return transactionEntryProcessedTs;
486: }
487:
488: public void setTransactionEntryProcessedTs(
489: Date transactionEntryProcessedTs) {
490: this .transactionEntryProcessedTs = transactionEntryProcessedTs;
491: }
492:
493: public String getFinancialSystemOriginationCode() {
494: return financialSystemOriginationCode;
495: }
496:
497: public void setFinancialSystemOriginationCode(
498: String financialSystemOriginationCode) {
499: this .financialSystemOriginationCode = financialSystemOriginationCode;
500: }
501:
502: /**
503: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
504: */
505: protected LinkedHashMap toStringMapper() {
506: LinkedHashMap m = new LinkedHashMap();
507: m.put("financialSystemOriginationCode",
508: this .financialSystemOriginationCode);
509: m
510: .put(KFSPropertyConstants.DOCUMENT_NUMBER,
511: this .documentNumber);
512: if (transactionLedgerEntrySequenceNumber == null) {
513: m.put("transactionLedgerEntrySequenceNumber", null);
514: } else {
515: m.put("transactionLedgerEntrySequenceNumber",
516: this .transactionLedgerEntrySequenceNumber
517: .toString());
518: }
519: return m;
520: }
521:
522: public DocumentType getDocumentType() {
523: return documentType;
524: }
525:
526: public void setDocumentType(DocumentType documentType) {
527: this .documentType = documentType;
528: }
529:
530: public DocumentHeader getDocumentHeader() {
531: return documentHeader;
532: }
533:
534: public void setDocumentHeader(DocumentHeader documentHeader) {
535: this .documentHeader = documentHeader;
536: }
537:
538: public Account getAccount() {
539: return account;
540: }
541:
542: public void setAccount(Account account) {
543: this .account = account;
544: }
545:
546: public BalanceTyp getBalanceType() {
547: return balanceType;
548: }
549:
550: public void setBalanceType(BalanceTyp balanceType) {
551: this .balanceType = balanceType;
552: }
553:
554: public Chart getChart() {
555: return chart;
556: }
557:
558: public void setChart(Chart chart) {
559: this .chart = chart;
560: }
561:
562: public ObjectCode getFinancialObject() {
563: return financialObject;
564: }
565:
566: public void setFinancialObject(ObjectCode financialObject) {
567: this .financialObject = financialObject;
568: }
569:
570: public ObjectType getObjectType() {
571: return objectType;
572: }
573:
574: public void setObjectType(ObjectType objectType) {
575: this .objectType = objectType;
576: }
577:
578: public A21SubAccount getA21SubAccount() {
579: return this .a21SubAccount;
580: }
581:
582: public void setA21SubAccount(A21SubAccount a21SubAccount) {
583: this .a21SubAccount = a21SubAccount;
584: }
585:
586: public TransientBalanceInquiryAttributes getDummyBusinessObject() {
587: return this .dummyBusinessObject;
588: }
589:
590: public void setDummyBusinessObject(
591: TransientBalanceInquiryAttributes dummyBusinessObject) {
592: this .dummyBusinessObject = dummyBusinessObject;
593: }
594:
595: public SubAccount getSubAccount() {
596: return subAccount;
597: }
598:
599: public void setSubAccount(SubAccount subAccount) {
600: this .subAccount = subAccount;
601: }
602:
603: public SubObjCd getFinancialSubObject() {
604: return financialSubObject;
605: }
606:
607: public void setFinancialSubObject(SubObjCd financialSubObject) {
608: this .financialSubObject = financialSubObject;
609: }
610:
611: public AccountingPeriod getAccountingPeriod() {
612: return accountingPeriod;
613: }
614:
615: public void setAccountingPeriod(AccountingPeriod accountingPeriod) {
616: this .accountingPeriod = accountingPeriod;
617: }
618:
619: public boolean isSubAccountNumberBlank() {
620: return subAccountNumber == null
621: || GENERAL_LEDGER_PENDING_ENTRY_CODE
622: .getBlankSubAccountNumber().equals(
623: subAccountNumber);
624: }
625:
626: public boolean isFinancialObjectCodeBlank() {
627: return financialObjectCode == null
628: || GENERAL_LEDGER_PENDING_ENTRY_CODE
629: .getBlankFinancialObjectCode().equals(
630: financialObjectCode);
631: }
632:
633: public boolean isFinancialSubObjectCodeBlank() {
634: return financialSubObjectCode == null
635: || GENERAL_LEDGER_PENDING_ENTRY_CODE
636: .getBlankFinancialSubObjectCode().equals(
637: financialSubObjectCode);
638: }
639:
640: public boolean isProjectCodeBlank() {
641: return projectCode == null
642: || GENERAL_LEDGER_PENDING_ENTRY_CODE
643: .getBlankProjectCode().equals(projectCode);
644: }
645:
646: public boolean isFinancialObjectTypeCodeBlank() {
647: return financialObjectTypeCode == null
648: || GENERAL_LEDGER_PENDING_ENTRY_CODE
649: .getBlankFinancialObjectType().equals(
650: financialObjectTypeCode);
651: }
652:
653: }
|