org.kuali.kfs.sys.service.impl
Class FlexibleOffsetAccountServiceImpl

java.lang.Object
  extended by org.kuali.kfs.sys.service.impl.FlexibleOffsetAccountServiceImpl
All Implemented Interfaces:
FlexibleOffsetAccountService

public class FlexibleOffsetAccountServiceImpl
extends Object
implements FlexibleOffsetAccountService

This is the default implementation of the FlexibleOffsetAccountService interface.


Constructor Summary
FlexibleOffsetAccountServiceImpl()
           
 
Method Summary
 OffsetAccount getByPrimaryIdIfEnabled(String chartOfAccountsCode, String accountNumber, String financialOffsetObjectCode)
          This method uses the parameters provided to retrieve an OffsetAccount instance if the flexible offset account flag is enabled.
 boolean getEnabled()
          This method queries the parameter table to retrieve the value of the flexible offset flag and returns the resulting value.
protected  boolean isExpired(Account account, Calendar runCalendar)
          This method determines if an account has expired.
 void setAccountService(AccountService accountService)
          Sets the local accountService attribute.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the local businessObjectService attribute.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the local dateTimeService attribute.
 void setObjectCodeService(ObjectCodeService objectCodeService)
          Sets the local objectCodeService attribute.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the local parameterService attribute.
 boolean updateOffset(FlexibleAccountUpdateable transaction)
          This method modifies the origin entry provided with values from the associated flexible offset account, which is retrieved from the database using values provided by the origin entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlexibleOffsetAccountServiceImpl

public FlexibleOffsetAccountServiceImpl()
Method Detail

getByPrimaryIdIfEnabled

public OffsetAccount getByPrimaryIdIfEnabled(String chartOfAccountsCode,
                                             String accountNumber,
                                             String financialOffsetObjectCode)
This method uses the parameters provided to retrieve an OffsetAccount instance if the flexible offset account flag is enabled.

Specified by:
getByPrimaryIdIfEnabled in interface FlexibleOffsetAccountService
Parameters:
chartOfAccountsCode - The chart code used to retrieve the flexible offset account.
accountNumber - The account number of the flexible offset account being retrieved.
financialOffsetObjectCode - The offset object code used to retrieve the offset account.
Returns:
A flexible offset account based on the parameters provided, or null if offsets are not enabled.
See Also:
FlexibleOffsetAccountService.getByPrimaryIdIfEnabled(java.lang.String, java.lang.String, java.lang.String)

getEnabled

public boolean getEnabled()
This method queries the parameter table to retrieve the value of the flexible offset flag and returns the resulting value.

Specified by:
getEnabled in interface FlexibleOffsetAccountService
Returns:
True if flexible offsets are enabled, false otherwise.
See Also:
FlexibleOffsetAccountService.getEnabled()

updateOffset

public boolean updateOffset(FlexibleAccountUpdateable transaction)
This method modifies the origin entry provided with values from the associated flexible offset account, which is retrieved from the database using values provided by the origin entry.

Specified by:
updateOffset in interface FlexibleOffsetAccountService
Parameters:
originEntry - The origin entry to be updated with offset account details.
Returns:
False if the flexible offset flag is false, if there is no corresponding flexbile offset account, true otherwise.
See Also:
org.kuali.kfs.sys.service.FlexibleOffsetAccountService#updateOffset(org.kuali.kfs.gl.businessobject.OriginEntryFull)

isExpired

protected boolean isExpired(Account account,
                            Calendar runCalendar)
This method determines if an account has expired. An account has expired if the expiration year of the account is less than the run date year or if the date of expiration occurred before the run date provided.

Parameters:
account - The account to be examined.
runCalendar - The date the expiration date is tested against.
Returns:
True if the account has expired, false otherwise.

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
Sets the local dateTimeService attribute.

Parameters:
dateTimeService - The DateTimeService instance to be set.

setAccountService

public void setAccountService(AccountService accountService)
Sets the local accountService attribute.

Parameters:
accountService - The AccountService instance to be set.

setObjectCodeService

public void setObjectCodeService(ObjectCodeService objectCodeService)
Sets the local objectCodeService attribute.

Parameters:
objectCodeService - The ObjectCodeService instance to be set.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the local businessObjectService attribute.

Parameters:
businessObjectService - The BusinessObjectService instance to be set.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the local parameterService attribute.

Parameters:
parameterService - The ParameterService instance to be set.


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