@Transactional public class PostExpenditureTransaction extends Object implements IndirectCostRecoveryService, PostTransaction
Constructor and Description |
---|
PostExpenditureTransaction()
Creates a PostExpenditureTransaction instance
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
excludedByAccount(Account account,
ObjectCode objectCode,
boolean selfAndTopLevelOnly)
Determine if the given account and object code have an exclusion by account associated which should prevent this transaction from posting an ExpenditureTransaction
|
protected boolean |
excludedByType(String indirectCostRecoveryTypeCode,
ObjectCode objectCode,
boolean selfAndTopLevelOnly)
Determines if there's an exclusion by type record existing for the given ICR type code and object code or object codes within the object code's reportsTo hierarchy
|
String |
getDestinationName()
The name of the destination for the post (ie, the database table name where resultant records will be posted)
|
org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService()
Gets the parameterService attribute.
|
protected ObjectCode |
getReportsToObjectCode(ObjectCode objectCode)
Uses the caching DAO instead of regular OJB to find the reports-to object code
|
protected boolean |
hasExclusionByAccount(Account account,
ObjectCode objectCode)
Determines if there's an exclusion by account record for the given account and object code
|
protected boolean |
hasExclusionByType(String indirectCostRecoveryTypeCode,
ObjectCode objectCode)
Determines if the given object code and indirect cost recovery type code have an exclusion by type record associated with them
|
protected boolean |
hasValidObjectCodeReportingHierarchy(ObjectCode objectCode)
Determines if the given object code has a valid reports-to hierarchy
|
protected boolean |
hasValidReportsToFields(ObjectCode objectCode)
Determines if the given object code has all the fields it would need for a strong and healthy reports to hierarchy
|
boolean |
isIcrTransaction(Transaction transaction,
ReportWriterService reportWriterService)
This will determine if this transaction is an ICR eligible transaction
|
String |
post(Transaction t,
int mode,
Date postDate,
ReportWriterService posterReportWriterService)
If the transaction is a valid ICR transaction, posts an expenditure transaction record for the transaction
|
protected String |
postTransaction(Transaction t,
int mode)
Actually posts the transaction to the appropriate expenditure transaction record
|
void |
setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService) |
void |
setIndirectCostRecoveryExclusionAccountDao(IndirectCostRecoveryExclusionAccountDao icrea) |
void |
setIndirectCostRecoveryExclusionTypeDao(IndirectCostRecoveryExclusionTypeDao icrea) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the parameterService attribute value.
|
void |
setPersistenceStructureService(org.kuali.rice.krad.service.PersistenceStructureService persistenceStructureService) |
public PostExpenditureTransaction()
public void setIndirectCostRecoveryExclusionAccountDao(IndirectCostRecoveryExclusionAccountDao icrea)
public void setIndirectCostRecoveryExclusionTypeDao(IndirectCostRecoveryExclusionTypeDao icrea)
public boolean isIcrTransaction(Transaction transaction, ReportWriterService reportWriterService)
isIcrTransaction
in interface IndirectCostRecoveryService
transaction
- the transaction which is being determined to be ICR or notobjectType
- the object type of the transactionaccount
- the account of the transactionobjectCode
- the object code of the transactionprotected boolean excludedByType(String indirectCostRecoveryTypeCode, ObjectCode objectCode, boolean selfAndTopLevelOnly)
indirectCostRecoveryTypeCode
- the ICR type code to checkobjectCode
- the object code to check for, as well as check the reports-to hierarchyselfAndTopLevelOnly
- whether only the given object code and the top level object code should be checkedprotected boolean hasExclusionByType(String indirectCostRecoveryTypeCode, ObjectCode objectCode)
indirectCostRecoveryTypeCode
- the indirect cost recovery type code to checkobjectCode
- the object code to checkprotected boolean excludedByAccount(Account account, ObjectCode objectCode, boolean selfAndTopLevelOnly)
account
- account to checkobjectCode
- object code to checkselfAndTopLevelOnly
- if only the given object code and the top level object code should seek exclusion by account records or notprotected boolean hasExclusionByAccount(Account account, ObjectCode objectCode)
account
- the account to checkobjectCode
- the object code to checkprotected boolean hasValidObjectCodeReportingHierarchy(ObjectCode objectCode)
objectCode
- the object code to checkprotected boolean hasValidReportsToFields(ObjectCode objectCode)
objectCode
- the object code to give a little checkprotected ObjectCode getReportsToObjectCode(ObjectCode objectCode)
objectCode
- the object code to get the reporter ofpublic String post(Transaction t, int mode, Date postDate, ReportWriterService posterReportWriterService)
post
in interface PostTransaction
t
- the transaction which is being postedmode
- the mode the poster is currently running inpostDate
- the date this transaction should post toposterReportWriterService
- the writer service where the poster is writing its reportorg.kuali.ole.gl.batch.service.PostTransaction#post(org.kuali.ole.gl.businessobject.Transaction, int, java.util.Date)
protected String postTransaction(Transaction t, int mode)
t
- the transaction to postmode
- the mode of the poster as it is currently runningpublic String getDestinationName()
PostTransaction
getDestinationName
in interface PostTransaction
PostTransaction.getDestinationName()
public void setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)
public void setPersistenceStructureService(org.kuali.rice.krad.service.PersistenceStructureService persistenceStructureService)
public org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService
- The parameterService to set.Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.