org.kuali.kfs.sys.document
Class LedgerPostingDocumentBase

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
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, FinancialSystemTransactionalDocument, 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:
GeneralLedgerPostingDocumentBase

public class LedgerPostingDocumentBase
extends FinancialSystemTransactionalDocumentBase
implements LedgerPostingDocument

Base implementation for a ledger posting document.

See Also:
Serialized Form

Field Summary
protected  AccountingPeriod accountingPeriod
           
protected static AccountingPeriodService accountingPeriodService
           
protected  boolean checkPostingYearForCopy
           
protected static org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService
           
protected static org.kuali.rice.kns.service.DateTimeService dateTimeService
           
protected  String postingPeriodCode
           
protected  Integer postingYear
           
 
Fields inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
documentHeader, LOG
 
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
LedgerPostingDocumentBase()
          Constructs a LedgerPostingDocumentBase.java.
 
Method Summary
 void createInitialAccountingPeriod()
          Used during initialization to provide a base AccountingPeriod.
 AccountingPeriod getAccountingPeriod()
          This method retrieves the accounting period associated with this document.
static AccountingPeriodService getAccountingPeriodService()
           
static org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
           
static org.kuali.rice.kns.service.DateTimeService getDateTimeService()
           
 String getFinancialDocumentTypeCode()
          Returns the financial document type code for the given document, using the DataDictionaryService
 String getPostingPeriodCode()
          Gets the postingPeriodCode attribute.
 Integer getPostingYear()
           
 AccountingPeriod retrieveCurrentAccountingPeriod()
          Finds the accounting period for the current date
 void setAccountingPeriod(AccountingPeriod accountingPeriod)
          This method sets the accounting period associated with this document.
 void setPostingPeriodCode(String postingPeriodCode)
          Sets the postingPeriodCode attribute value.
 void setPostingYear(Integer postingYear)
          Sets the posting year for this document
 void toCopy()
          If we've copied, we need to update the posting period and year
 
Methods inherited from class org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase
answerSplitNodeQuestion, doRouteStatusChange, getDocumentHeader, prepareForSave, processAfterRetrieve, setDocumentHeader, toErrorCorrection
 
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, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, logErrors, populateDocumentForRouting, postProcessSave, prepareForSave, 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, buildListOfDeletionAwareLists, 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.FinancialSystemTransactionalDocument
answerSplitNodeQuestion, getDocumentHeader
 
Methods inherited from interface org.kuali.rice.kns.document.Document
addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, doRouteStatusChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAllowsCopy, getBasePathToDocumentDuringSerialization, getCustomLockDescriptor, getDocumentBusinessObject, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, prepareForSave, 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
 

Field Detail

dateTimeService

protected static transient org.kuali.rice.kns.service.DateTimeService dateTimeService

accountingPeriodService

protected static transient AccountingPeriodService accountingPeriodService

dataDictionaryService

protected static transient org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService

accountingPeriod

protected AccountingPeriod accountingPeriod

postingYear

protected Integer postingYear

postingPeriodCode

protected String postingPeriodCode

checkPostingYearForCopy

protected boolean checkPostingYearForCopy
Constructor Detail

LedgerPostingDocumentBase

public LedgerPostingDocumentBase()
Constructs a LedgerPostingDocumentBase.java.

Method Detail

createInitialAccountingPeriod

public void createInitialAccountingPeriod()
Used during initialization to provide a base AccountingPeriod.

This is a hack right now because its intended to be set by the AccountingPeriodService


retrieveCurrentAccountingPeriod

public AccountingPeriod retrieveCurrentAccountingPeriod()
Finds the accounting period for the current date

Returns:
the current accounting period

getPostingYear

public Integer getPostingYear()
Specified by:
getPostingYear in interface LedgerPostingDocument
Returns:
posting year for this document
See Also:
LedgerPostingDocument.getPostingYear()

setPostingYear

public void setPostingYear(Integer postingYear)
Description copied from interface: LedgerPostingDocument
Sets the posting year for this document

Specified by:
setPostingYear in interface LedgerPostingDocument
See Also:
LedgerPostingDocument.setPostingYear(java.lang.Integer)

getPostingPeriodCode

public String getPostingPeriodCode()
Description copied from interface: LedgerPostingDocument
Gets the postingPeriodCode attribute. Part of AccountingPeriod Primary Key.

Specified by:
getPostingPeriodCode in interface LedgerPostingDocument
Returns:
Returns the postingPeriodCode.
See Also:
LedgerPostingDocument.getPostingPeriodCode()

setPostingPeriodCode

public void setPostingPeriodCode(String postingPeriodCode)
Description copied from interface: LedgerPostingDocument
Sets the postingPeriodCode attribute value. Part of AccountingPeriod Primary Key.

Specified by:
setPostingPeriodCode in interface LedgerPostingDocument
Parameters:
postingPeriodCode - The postingPeriodCode to set.
See Also:
LedgerPostingDocument.setPostingPeriodCode(java.lang.String)

getAccountingPeriod

public AccountingPeriod getAccountingPeriod()
Description copied from interface: LedgerPostingDocument
This method retrieves the accounting period associated with this document.

Specified by:
getAccountingPeriod in interface LedgerPostingDocument
See Also:
LedgerPostingDocument.getAccountingPeriod()

setAccountingPeriod

public void setAccountingPeriod(AccountingPeriod accountingPeriod)
Description copied from interface: LedgerPostingDocument
This method sets the accounting period associated with this document.

Specified by:
setAccountingPeriod in interface LedgerPostingDocument
See Also:
LedgerPostingDocument.setAccountingPeriod(AccountingPeriod)

toCopy

public void toCopy()
            throws org.kuali.rice.kew.exception.WorkflowException,
                   IllegalStateException
If we've copied, we need to update the posting period and year

Overrides:
toCopy in class org.kuali.rice.kns.document.DocumentBase
Throws:
org.kuali.rice.kew.exception.WorkflowException
IllegalStateException
See Also:
DocumentBase.toCopy()

getFinancialDocumentTypeCode

public String getFinancialDocumentTypeCode()
Returns the financial document type code for the given document, using the DataDictionaryService

Returns:
the financial document type code for the given document

getDataDictionaryService

public static org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()

getDateTimeService

public static org.kuali.rice.kns.service.DateTimeService getDateTimeService()

getAccountingPeriodService

public static AccountingPeriodService getAccountingPeriodService()


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