org.kuali.kfs.module.ld.document
Class LaborLedgerPostingDocumentBase

java.lang.Object
  extended by org.kuali.rice.kns.bo.BusinessObjectBase
      extended by org.kuali.rice.kns.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kns.document.DocumentBase
              extended by org.kuali.rice.kns.document.TransactionalDocumentBase
                  extended by org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
                      extended by org.kuali.kfs.sys.document.LedgerPostingDocumentBase
                          extended by org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
                              extended by org.kuali.kfs.sys.document.AccountingDocumentBase
                                  extended by org.kuali.kfs.module.ld.document.LaborLedgerPostingDocumentBase
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, LaborLedgerPostingDocumentForSearching, LaborLedgerPostingDocument, AccountingDocument, FinancialSystemTransactionalDocument, GeneralLedgerPendingEntrySource, GeneralLedgerPostingDocument, LedgerPostingDocument, org.kuali.rice.kns.bo.BusinessObject, org.kuali.rice.kns.bo.PersistableBusinessObject, org.kuali.rice.kns.document.Document, org.kuali.rice.kns.document.SessionDocument, org.kuali.rice.kns.document.TransactionalDocument
Direct Known Subclasses:
LaborExpenseTransferDocumentBase

public abstract class LaborLedgerPostingDocumentBase
extends AccountingDocumentBase
implements LaborLedgerPostingDocument

Labor Document base class implementation for all labor eDocs that are transactional, meaning implementing TransactionalDocumentBase. Additional functionality for labor is provided by this class, suchc as retrieving labor ledger pending entries.

See Also:
Serialized Form

Field Summary
protected static String LABOR_LEDGER_GENERAL_LEDGER_POSTING_HELPER_BEAN_ID
           
protected  List<LaborLedgerPendingEntry> laborLedgerPendingEntries
           
 
Fields inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
dataDictionaryEntry, LOG, nextSourceLineNumber, nextTargetLineNumber, sourceAccountingLineClass, sourceAccountingLines, targetAccountingLineClass, targetAccountingLines
 
Fields inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
generalLedgerPendingEntries
 
Fields inherited from class org.kuali.kfs.sys.document.LedgerPostingDocumentBase
accountingPeriod, accountingPeriodService, checkPostingYearForCopy, dataDictionaryService, dateTimeService, postingPeriodCode, postingYear
 
Fields inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
documentHeader
 
Fields inherited from class org.kuali.rice.kns.document.DocumentBase
documentBusinessObject, documentNumber
 
Fields inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
LaborLedgerPostingDocumentBase()
          Initializes the pending entries.
 
Method Summary
protected  void changeLedgerPendingEntriesApprovedStatusCode()
          This method iterates over all of the pending entries for a document and sets their approved status code to APPROVED "A".
 void doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO statusChangeEvent)
          Override to call super and then iterate over all GLPEs and update the approved code appropriately.
 boolean generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
          This is a "do nothing" version of the method - it just won't create GLPEs
 List<LaborLedgerPendingEntry> getLaborLedgerPendingEntries()
          Retrieves the list of Labor Ledger Pending Entries for the document.
 LaborLedgerPendingEntry getLaborLedgerPendingEntry(int index)
          This implementation is coupled tightly with some underlying issues that the Struts PojoProcessor plugin has with how objects get instantiated within lists.
 boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
          Labor docs never generate general ledger pending entries, and therefore, this method is never called, but we always return true, since we're required to have a concrete representation
 void prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
           
protected  void removeLedgerPendingEntries()
          This method calls the service to remove all of the pending entries associated with this document
 void setLaborLedgerPendingEntries(List<LaborLedgerPendingEntry> laborLedgerPendingEntries)
          Sets the list of labor ledger pending entries for the document.
 
Methods inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
addSourceAccountingLine, addTargetAccountingLine, buildAccountingLineMap, buildListOfDeletionAwareLists, copyAccountingLines, customizeExplicitGeneralLedgerPendingEntry, customizeOffsetGeneralLedgerPendingEntry, generateDocumentGeneralLedgerPendingEntries, generateEvents, generateSaveEvents, getAccountingLineParser, getDataDictionaryEntry, getDocumentClassForAccountingLineValueAllowedValidation, getEntryValue, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getNextSourceLineNumber, getNextTargetLineNumber, getPersistedSourceAccountingLinesForComparison, getPersistedTargetAccountingLinesForComparison, getSourceAccountingLine, getSourceAccountingLineClass, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesForComparison, getSourceAccountingLinesSectionTitle, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, getTargetAccountingLinesForComparison, getTargetAccountingLinesSectionTitle, getTargetTotal, getTotalDollarAmount, processExplicitGeneralLedgerPendingEntry, processOffsetGeneralLedgerPendingEntry, setNextSourceLineNumber, setNextTargetLineNumber, setSourceAccountingLines, setTargetAccountingLines, toCopy, toErrorCorrection, updatePostingYearForAccountingLines
 
Methods inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
addPendingEntry, changeGeneralLedgerPendingEntriesApprovedStatusCode, checkSufficientFunds, clearAnyGeneralLedgerPendingEntries, documentPerformsSufficientFundsCheck, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, removeGeneralLedgerPendingEntries, setGeneralLedgerPendingEntries
 
Methods inherited from class org.kuali.kfs.sys.document.LedgerPostingDocumentBase
createInitialAccountingPeriod, getAccountingPeriod, getAccountingPeriodService, getDataDictionaryService, getDateTimeService, getFinancialDocumentTypeCode, getPostingPeriodCode, getPostingYear, retrieveCurrentAccountingPeriod, setAccountingPeriod, setPostingPeriodCode, setPostingYear
 
Methods inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
answerSplitNodeQuestion, getDocumentHeader, prepareForSave, processAfterRetrieve, setDocumentHeader
 
Methods inherited from class org.kuali.rice.kns.document.TransactionalDocumentBase
getAllowsCopy, isSessionDocument
 
Methods inherited from class org.kuali.rice.kns.document.DocumentBase
addCopyErrorDocumentNote, addPessimisticLock, afterLookup, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, doRouteLevelChange, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, logErrors, populateDocumentForRouting, postProcessSave, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentNumber, setNewDocumentHeader, setPessimisticLocks, toString, toStringBuilder, toStringMapper, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
addNote, afterDelete, afterInsert, afterUpdate, beforeDelete, beforeInsert, beforeInsert, beforeUpdate, beforeUpdate, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes
 
Methods inherited from class org.kuali.rice.kns.bo.BusinessObjectBase
prepareForWorkflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.kfs.module.ld.document.LaborLedgerPostingDocument
generateLaborLedgerBenefitClearingPendingEntries, generateLaborLedgerPendingEntries, getLaborLedgerPendingEntriesForSearching
 
Methods inherited from interface org.kuali.kfs.sys.document.AccountingDocument
addSourceAccountingLine, addTargetAccountingLine, getAccountingLineParser, getDocumentClassForAccountingLineValueAllowedValidation, getNextSourceLineNumber, getNextTargetLineNumber, getSourceAccountingLine, getSourceAccountingLineClass, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesSectionTitle, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, getTargetAccountingLinesSectionTitle, getTargetTotal, setNextSourceLineNumber, setNextTargetLineNumber, setSourceAccountingLines, setTargetAccountingLines
 
Methods inherited from interface org.kuali.kfs.sys.document.GeneralLedgerPostingDocument
checkSufficientFunds, getGeneralLedgerPendingEntries, getGeneralLedgerPendingEntry, getPendingLedgerEntriesForSufficientFundsChecking, setGeneralLedgerPendingEntries
 
Methods inherited from interface org.kuali.kfs.sys.document.LedgerPostingDocument
getAccountingPeriod, getPostingPeriodCode, getPostingYear, setAccountingPeriod, setPostingPeriodCode, setPostingYear
 
Methods inherited from interface org.kuali.kfs.sys.document.FinancialSystemTransactionalDocument
answerSplitNodeQuestion, getDocumentHeader
 
Methods inherited from interface org.kuali.rice.kns.document.Document
addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAllowsCopy, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, prepareForSave, processAfterRetrieve, refreshPessimisticLocks, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, useCustomLockDescriptors, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from interface org.kuali.rice.kns.bo.PersistableBusinessObject
addNote, buildListOfDeletionAwareLists, deleteNote, getBoNote, getBoNotes, getExtension, getObjectId, getVersionNumber, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from interface org.kuali.rice.kns.bo.BusinessObject
prepareForWorkflow, refresh
 
Methods inherited from interface org.apache.ojb.broker.PersistenceBrokerAware
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate
 
Methods inherited from interface org.kuali.kfs.sys.document.GeneralLedgerPendingEntrySource
addPendingEntry, clearAnyGeneralLedgerPendingEntries, generateDocumentGeneralLedgerPendingEntries, getDocumentHeader, getFinancialDocumentTypeCode, getGeneralLedgerPendingEntryAmountForDetail, getGeneralLedgerPendingEntrySourceDetails, getPostingYear
 

Field Detail

laborLedgerPendingEntries

protected List<LaborLedgerPendingEntry> laborLedgerPendingEntries

LABOR_LEDGER_GENERAL_LEDGER_POSTING_HELPER_BEAN_ID

protected static final String LABOR_LEDGER_GENERAL_LEDGER_POSTING_HELPER_BEAN_ID
See Also:
Constant Field Values
Constructor Detail

LaborLedgerPostingDocumentBase

public LaborLedgerPostingDocumentBase()
Initializes the pending entries.

Method Detail

getLaborLedgerPendingEntries

public List<LaborLedgerPendingEntry> getLaborLedgerPendingEntries()
Description copied from interface: LaborLedgerPostingDocument
Retrieves the list of Labor Ledger Pending Entries for the document.

Specified by:
getLaborLedgerPendingEntries in interface LaborLedgerPostingDocument
Returns:
A list of labor ledger pending entries.
See Also:
LaborLedgerPostingDocument.getLaborLedgerPendingEntries()

setLaborLedgerPendingEntries

public void setLaborLedgerPendingEntries(List<LaborLedgerPendingEntry> laborLedgerPendingEntries)
Description copied from interface: LaborLedgerPostingDocument
Sets the list of labor ledger pending entries for the document.

Specified by:
setLaborLedgerPendingEntries in interface LaborLedgerPostingDocument
Parameters:
laborLedgerPendingEntries - the given labor ledger pending entries
See Also:
LaborLedgerPostingDocument.setLaborLedgerPendingEntries(java.util.List)

doRouteStatusChange

public void doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO statusChangeEvent)
Override to call super and then iterate over all GLPEs and update the approved code appropriately.

Specified by:
doRouteStatusChange in interface org.kuali.rice.kns.document.Document
Overrides:
doRouteStatusChange in class GeneralLedgerPostingDocumentBase
See Also:
Document#doRouteStatusChange()

changeLedgerPendingEntriesApprovedStatusCode

protected void changeLedgerPendingEntriesApprovedStatusCode()
This method iterates over all of the pending entries for a document and sets their approved status code to APPROVED "A".


removeLedgerPendingEntries

protected void removeLedgerPendingEntries()
This method calls the service to remove all of the pending entries associated with this document


getLaborLedgerPendingEntry

public LaborLedgerPendingEntry getLaborLedgerPendingEntry(int index)
This implementation is coupled tightly with some underlying issues that the Struts PojoProcessor plugin has with how objects get instantiated within lists. The first three lines are required otherwise when the PojoProcessor tries to automatically inject values into the list, it will get an index out of bounds error if the instance at an index is being called and prior instances at indices before that one are not being instantiated. So changing the code below will cause things to break.

Specified by:
getLaborLedgerPendingEntry in interface LaborLedgerPostingDocument
Parameters:
index - of Labor Ledger Pending Entry to retrieve
Returns:
LaborLedgerPendingEntry

prepareForSave

public void prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
Specified by:
prepareForSave in interface org.kuali.rice.kns.document.Document
Overrides:
prepareForSave in class AccountingDocumentBase
See Also:
AccountingDocumentBase.prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent)

generateGeneralLedgerPendingEntries

public boolean generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySourceDetail glpeSourceDetail,
                                                   GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
This is a "do nothing" version of the method - it just won't create GLPEs

Specified by:
generateGeneralLedgerPendingEntries in interface GeneralLedgerPendingEntrySource
Overrides:
generateGeneralLedgerPendingEntries in class AccountingDocumentBase
Parameters:
glpeSourceDetail - the source detail line to generate general ledger pending entries for
sequenceHelper - the sequence helper which will assign sequence number to generated general ledger pending entries
Returns:
true if general ledger pending entry generation was successful; false if an error condition prevented the successful generation of the pending entries
See Also:
AccountingDocumentBase.generateGeneralLedgerPendingEntries(org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySourceDetail, org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper)

isDebit

public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable)
Labor docs never generate general ledger pending entries, and therefore, this method is never called, but we always return true, since we're required to have a concrete representation

Specified by:
isDebit in interface GeneralLedgerPendingEntrySource
Specified by:
isDebit in class AccountingDocumentBase
Returns:
true if the given GeneralLedgerPendingEntrySourceDetail is a debit, false if it is a credit
See Also:
AccountingDocumentBase.isDebit(org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySourceDetail)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.