org.kuali.kfs.sys.service
Interface FlexibleOffsetAccountService

All Known Implementing Classes:
FlexibleOffsetAccountServiceImpl

public interface FlexibleOffsetAccountService

This interface defines methods that a FlexibleOffsetAccount Service must provide.


Method Summary
 OffsetAccount getByPrimaryIdIfEnabled(String chartOfAccountsCode, String accountNumber, String financialOffsetObjectCode)
          Retrieves the OffsetAccount by its composite primary key (all passed in as parameters) if the SYSTEM parameter FLEXIBLE_OFFSET_ENABLED_FLAG is true.
 boolean getEnabled()
          Retrieves whether the SYSTEM parameter FLEXIBLE_OFFSET_ENABLED_FLAG is true.
 boolean updateOffset(FlexibleAccountUpdateable transaction)
          This method will apply the flexible offset account if necessary.
 

Method Detail

getByPrimaryIdIfEnabled

OffsetAccount getByPrimaryIdIfEnabled(String chartOfAccountsCode,
                                      String accountNumber,
                                      String financialOffsetObjectCode)
Retrieves the OffsetAccount by its composite primary key (all passed in as parameters) if the SYSTEM parameter FLEXIBLE_OFFSET_ENABLED_FLAG is true.

Parameters:
chartOfAccountsCode - The chart code of the account to be retrieved.
accountNumber - The account number of the account to be retrieved.
financialOffsetObjectCode - Offset object code used to retrieve the OffsetAccount.
Returns:
An OffsetAccount object instance. Returns null if there is none with the given key, or if the SYSTEM parameter FLEXIBLE_OFFSET_ENABLED_FLAG is false.

getEnabled

boolean getEnabled()
Retrieves whether the SYSTEM parameter FLEXIBLE_OFFSET_ENABLED_FLAG is true.

Returns:
Whether the SYSTEM parameter FLEXIBLE_OFFSET_ENABLED_FLAG is true.

updateOffset

boolean updateOffset(FlexibleAccountUpdateable transaction)
This method will apply the flexible offset account if necessary. It will only change the chart, account, sub account and sub object on the transaction. If the flexible offset isn't enabled or valid for this transaction, it will be unchanged. It throws an InvalidFlexibleOffsetException if the flexible offset account associated with the transaction is invalid, closed or expired or if the object code is invalid for the flexible offset.

Parameters:
transaction - The OriginEntryFull object to be updated.
Returns:
True if transaction was changed, false if not.


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