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

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.fp.document.JournalVoucherDocument
                                      extended by org.kuali.kfs.module.ld.document.LaborJournalVoucherDocument
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, VoucherDocument, LaborLedgerPostingDocumentForSearching, LaborLedgerPostingDocument, AccountingDocument, AmountTotaling, Correctable, FinancialSystemTransactionalDocument, GeneralLedgerPendingEntrySource, GeneralLedgerPostingDocument, LedgerPostingDocument, org.kuali.rice.kns.bo.BusinessObject, org.kuali.rice.kns.bo.PersistableBusinessObject, org.kuali.rice.kns.document.Copyable, org.kuali.rice.kns.document.Document, org.kuali.rice.kns.document.SessionDocument, org.kuali.rice.kns.document.TransactionalDocument

public class LaborJournalVoucherDocument
extends JournalVoucherDocument
implements LaborLedgerPostingDocument, AmountTotaling

Labor Document class for the Labor Ledger Journal Voucher.

See Also:
Serialized Form

Field Summary
protected  org.kuali.rice.kew.doctype.bo.DocumentTypeEBO financialSystemDocumentTypeCode
           
protected  List<LaborLedgerPendingEntry> laborLedgerPendingEntries
           
protected static org.apache.log4j.Logger LOG
           
protected  String offsetTypeCode
           
 
Fields inherited from class org.kuali.kfs.fp.document.JournalVoucherDocument
balanceType, balanceTypeCode, reversalDate
 
Fields inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
dataDictionaryEntry, 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
LaborJournalVoucherDocument()
          Constructs a LaborJournalVoucherDocument.java.
 
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
 boolean generateLaborLedgerBenefitClearingPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
          creating a list of benefit clearing Pending entries
 boolean generateLaborLedgerPendingEntries(AccountingLine accountingLine, GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
          creating a list of Expense Pending entries and Benefit pending Entries
 AccountingLineParser getAccountingLineParser()
          Used to get the appropriate AccountingLineParser for the Document
 org.kuali.rice.kew.doctype.bo.DocumentTypeEBO getFinancialSystemDocumentTypeCode()
          Gets the financialSystemDocumentTypeCode attribute.
 List<LaborLedgerPendingEntry> getLaborLedgerPendingEntries()
          Gets the laborLedgerPendingEntries attribute.
 List getLaborLedgerPendingEntriesForSearching()
          Retrieves the list of Labor Ledger Pending Entries for the document.
 LaborLedgerPendingEntry getLaborLedgerPendingEntry(int index)
          Get the pending entry with the given index in the list of labor ledger pending entries
 String getOffsetTypeCode()
          Gets the offsetTypeCode attribute.
 Class getSourceAccountingLineClass()
          Returns the default Source accounting line class.
 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()
          If the document has a total amount, call method on document to get the total and set in doc header.
 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 laborLedgerPendingEntries attribute value.
 void setOffsetTypeCode(String offsetTypeCode)
          Sets the offsetTypeCode attribute value.
 
Methods inherited from class org.kuali.kfs.fp.document.JournalVoucherDocument
checkSufficientFunds, customizeExplicitGeneralLedgerPendingEntry, getBalanceType, getBalanceTypeCode, getCreditTotal, getDebitTotal, getGeneralLedgerPendingEntryAmountForDetail, getReversalDate, getSourceAccountingLinesSectionTitle, getTargetAccountingLinesSectionTitle, getTotalDollarAmount, processJournalVoucherErrorCorrections, processOffsetGeneralLedgerPendingEntry, setBalanceType, setBalanceTypeCode, setReversalDate, toErrorCorrection
 
Methods inherited from class org.kuali.kfs.sys.document.AccountingDocumentBase
addSourceAccountingLine, addTargetAccountingLine, buildAccountingLineMap, buildListOfDeletionAwareLists, copyAccountingLines, customizeOffsetGeneralLedgerPendingEntry, generateDocumentGeneralLedgerPendingEntries, generateEvents, generateSaveEvents, getDataDictionaryEntry, getDocumentClassForAccountingLineValueAllowedValidation, getEntryValue, getGeneralLedgerPendingEntrySourceDetails, getNextSourceLineNumber, getNextTargetLineNumber, getPersistedSourceAccountingLinesForComparison, getPersistedTargetAccountingLinesForComparison, getSourceAccountingLine, getSourceAccountingLineEntryName, getSourceAccountingLines, getSourceAccountingLinesForComparison, getSourceTotal, getTargetAccountingLine, getTargetAccountingLineClass, getTargetAccountingLineEntryName, getTargetAccountingLines, getTargetAccountingLinesForComparison, getTargetTotal, processExplicitGeneralLedgerPendingEntry, setNextSourceLineNumber, setNextTargetLineNumber, setSourceAccountingLines, setTargetAccountingLines, toCopy, updatePostingYearForAccountingLines
 
Methods inherited from class org.kuali.kfs.sys.document.GeneralLedgerPostingDocumentBase
addPendingEntry, changeGeneralLedgerPendingEntriesApprovedStatusCode, 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, 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.sys.document.AccountingDocument
addSourceAccountingLine, addTargetAccountingLine, getDocumentClassForAccountingLineValueAllowedValidation, getNextSourceLineNumber, getNextTargetLineNumber, getSourceAccountingLine, 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, 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
 
Methods inherited from interface org.kuali.kfs.sys.document.AmountTotaling
getTotalDollarAmount
 
Methods inherited from interface org.kuali.rice.kns.document.Copyable
toCopy
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

offsetTypeCode

protected String offsetTypeCode

laborLedgerPendingEntries

protected List<LaborLedgerPendingEntry> laborLedgerPendingEntries

financialSystemDocumentTypeCode

protected org.kuali.rice.kew.doctype.bo.DocumentTypeEBO financialSystemDocumentTypeCode
Constructor Detail

LaborJournalVoucherDocument

public LaborJournalVoucherDocument()
Constructs a LaborJournalVoucherDocument.java.

Method Detail

getSourceAccountingLineClass

public Class getSourceAccountingLineClass()
Description copied from class: AccountingDocumentBase
Returns the default Source accounting line class.

Specified by:
getSourceAccountingLineClass in interface AccountingDocument
Overrides:
getSourceAccountingLineClass in class JournalVoucherDocument
See Also:
AccountingDocumentBase.getSourceAccountingLineClass()

getLaborLedgerPendingEntry

public LaborLedgerPendingEntry getLaborLedgerPendingEntry(int index)
Description copied from interface: LaborLedgerPostingDocument
Get the pending entry with the given index in the list of labor ledger pending entries

Specified by:
getLaborLedgerPendingEntry in interface LaborLedgerPostingDocument
Parameters:
index - the given index
Returns:
the pending entry with the given index in the list of labor ledger pending entries
See Also:
LaborLedgerPostingDocument.getLaborLedgerPendingEntry(int)

getOffsetTypeCode

public String getOffsetTypeCode()
Gets the offsetTypeCode attribute.

Returns:
Returns the offsetTypeCode.

setOffsetTypeCode

public void setOffsetTypeCode(String offsetTypeCode)
Sets the offsetTypeCode attribute value.

Parameters:
offsetTypeCode - The offsetTypeCode to set.

getLaborLedgerPendingEntries

public List<LaborLedgerPendingEntry> getLaborLedgerPendingEntries()
Gets the laborLedgerPendingEntries attribute.

Specified by:
getLaborLedgerPendingEntries in interface LaborLedgerPostingDocument
Returns:
Returns the laborLedgerPendingEntries.

setLaborLedgerPendingEntries

public void setLaborLedgerPendingEntries(List<LaborLedgerPendingEntry> laborLedgerPendingEntries)
Sets the laborLedgerPendingEntries attribute value.

Specified by:
setLaborLedgerPendingEntries in interface LaborLedgerPostingDocument
Parameters:
laborLedgerPendingEntries - The laborLedgerPendingEntries to set.

getFinancialSystemDocumentTypeCode

public org.kuali.rice.kew.doctype.bo.DocumentTypeEBO getFinancialSystemDocumentTypeCode()
Gets the financialSystemDocumentTypeCode attribute.

Returns:
Returns the financialSystemDocumentTypeCode.

getAccountingLineParser

public AccountingLineParser getAccountingLineParser()
Used to get the appropriate AccountingLineParser for the Document

Specified by:
getAccountingLineParser in interface AccountingDocument
Overrides:
getAccountingLineParser in class JournalVoucherDocument
Returns:
AccountingLineParser

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


generateLaborLedgerBenefitClearingPendingEntries

public boolean generateLaborLedgerBenefitClearingPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
Description copied from interface: LaborLedgerPostingDocument
creating a list of benefit clearing Pending entries

Specified by:
generateLaborLedgerBenefitClearingPendingEntries in interface LaborLedgerPostingDocument
Parameters:
sequenceHelper - the sequence number generator
Returns:
true after creating a list of benefit clearing Pending entries
See Also:
LaborLedgerPostingDocument.generateLaborLedgerBenefitClearingPendingEntries(org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper)

generateLaborLedgerPendingEntries

public boolean generateLaborLedgerPendingEntries(AccountingLine accountingLine,
                                                 GeneralLedgerPendingEntrySequenceHelper sequenceHelper)
Description copied from interface: LaborLedgerPostingDocument
creating a list of Expense Pending entries and Benefit pending Entries

Specified by:
generateLaborLedgerPendingEntries in interface LaborLedgerPostingDocument
Parameters:
accountingLine - the accounting line being used to generate pending entries
sequenceHelper - the sequence number generator
Returns:
true after creating a list of Expense Pending entries and Benefit pending Entries
See Also:
LaborLedgerPostingDocument.generateLaborLedgerPendingEntries(org.kuali.kfs.sys.businessobject.AccountingLine, org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper)

prepareForSave

public void prepareForSave()
If the document has a total amount, call method on document to get the total and set in doc header.

Specified by:
prepareForSave in interface org.kuali.rice.kns.document.Document
Overrides:
prepareForSave in class FinancialSystemTransactionalDocumentBase
See Also:
Document.prepareForSave()

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
Overrides:
isDebit in class JournalVoucherDocument
Returns:
True if the accounting line provided is a debit accounting line, false otherwise.
See Also:
AccountingDocumentBase.isDebit(org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySourceDetail)

getLaborLedgerPendingEntriesForSearching

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

Specified by:
getLaborLedgerPendingEntriesForSearching in interface LaborLedgerPostingDocumentForSearching
Specified by:
getLaborLedgerPendingEntriesForSearching in interface LaborLedgerPostingDocument
Returns:
A list of labor ledger pending entries.


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