org.kuali.kfs.module.cam.document.dataaccess.impl
Class DepreciationBatchDaoJdbc

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.jdbc.core.support.JdbcDaoSupport
          extended by org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport
              extended by org.kuali.rice.kns.dao.jdbc.PlatformAwareDaoBaseJdbc
                  extended by org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciationBatchDaoJdbc
All Implemented Interfaces:
DepreciationBatchDao, org.kuali.rice.kns.dao.PlatformAwareDao, org.springframework.beans.factory.InitializingBean

public class DepreciationBatchDaoJdbc
extends org.kuali.rice.kns.dao.jdbc.PlatformAwareDaoBaseJdbc
implements DepreciationBatchDao

JDBC implementation of DepreciationBatchDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
DepreciationBatchDaoJdbc()
           
 
Method Summary
protected  String buildCriteria(Integer fiscalYear, Integer fiscalMonth, List<String> depreciationMethodList, List<String> notAcceptedAssetStatus, List<String> federallyOwnedObjectSubTypes, boolean includeFederal, boolean includePending)
           
protected  String buildINValues(List<String> list)
          Utility method that will convert a list into IN string clause for SQL
 Object[] getAssetAndPaymentCount(Integer fiscalYear, Integer fiscalMonth, Calendar depreciationDate, boolean includePending)
          Retrieves asset and asset payment count eligible for depreciation
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 org.kuali.rice.kns.service.DateTimeService getDateTimeService()
          Gets the dateTimeService attribute.
 Object[] getFederallyOwnedAssetAndPaymentCount(Integer fiscalYear, Integer fiscalMonth, Calendar depreciationDate)
          This method...
protected  List<String> getFederallyOwnedObjectSubTypes()
          This method the value of the system parameter NON_DEPRECIABLE_FEDERALLY_OWNED_OBJECT_SUB_TYPES
 Integer getFullyDepreciatedAssetCount()
          Counts the number of assets which has (SUM(Primary Depreciation Amount - Accumulated Depreciation) - Salvage Amount) is zero
 org.kuali.rice.kns.service.KualiConfigurationService getKualiConfigurationService()
          Gets the kualiConfigurationService attribute.
 Collection<AssetPaymentInfo> getListOfDepreciableAssetPaymentInfo(Integer fiscalYear, Integer fiscalMonth, Calendar depreciationDate)
          Gets the list of depreciable asset payment list and corresponding details
 Set<Long> getLockedAssets()
          Returns the list of locked asset by pending transfer and retirement documents
 OptionsService getOptionsService()
          Gets the optionsService attribute.
 org.kuali.rice.kns.service.ParameterService getParameterService()
          Gets the parameterService attribute.
 Map<Long,org.kuali.rice.kns.util.KualiDecimal> getPrimaryDepreciationBaseAmountForSV()
          Primary depreciation base amount for assets with Salvage Value depreciation method code.
 Integer getRetireDocLockedAssetCount()
          Retirement document locked count
 Integer getTransferDocLockedAssetCount()
          Transfer document locked count
 UniversityDateDao getUniversityDateDao()
          Gets the universityDateDao attribute.
protected  org.springframework.jdbc.core.PreparedStatementSetter preparedStatementSetter(Calendar depreciationDate)
           
 void resetPeriodValuesWhenFirstFiscalPeriod(Integer fiscalMonth)
          Sum all period column and set as previous year value and then reset period columns with zero dollar
 void savePendingGLEntries(List<GeneralLedgerPendingEntry> glPendingEntries)
          Saves a batch of GL Pending entries
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the dateTimeService attribute value.
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
          Sets the kualiConfigurationService attribute value.
 void setOptionsService(OptionsService optionsService)
          Sets the optionsService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 void setUniversityDateDao(UniversityDateDao universityDateDao)
          Sets the universityDateDao attribute value.
 void updateAssetPayments(List<AssetPaymentInfo> assetPayments, Integer fiscalMonth)
          Updates payments as batch, columns updated are accumulated depreciation amount and current period column decided by fiscal period
 void updateAssetsCreatedInLastFiscalPeriod(Integer fiscalMonth, Integer fiscalYear)
          Updates depreciation and service date for all the assets created after last fiscal period date
 
Methods inherited from class org.kuali.rice.kns.dao.jdbc.PlatformAwareDaoBaseJdbc
getDbPlatform, setDbPlatform
 
Methods inherited from class org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport
getSimpleJdbcTemplate, initTemplateConfig
 
Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, releaseConnection, setDataSource, setJdbcTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepreciationBatchDaoJdbc

public DepreciationBatchDaoJdbc()
Method Detail

resetPeriodValuesWhenFirstFiscalPeriod

public void resetPeriodValuesWhenFirstFiscalPeriod(Integer fiscalMonth)
                                            throws Exception
Description copied from interface: DepreciationBatchDao
Sum all period column and set as previous year value and then reset period columns with zero dollar

Specified by:
resetPeriodValuesWhenFirstFiscalPeriod in interface DepreciationBatchDao
Throws:
Exception
See Also:
DepreciationBatchDao.resetPeriodValuesWhenFirstFiscalPeriod(java.lang.Integer)

updateAssetPayments

public void updateAssetPayments(List<AssetPaymentInfo> assetPayments,
                                Integer fiscalMonth)
Description copied from interface: DepreciationBatchDao
Updates payments as batch, columns updated are accumulated depreciation amount and current period column decided by fiscal period

Specified by:
updateAssetPayments in interface DepreciationBatchDao
Parameters:
assetPayments - Batch of asset payments
fiscalMonth - Current fiscal period
See Also:
DepreciationBatchDao.updateAssetPayments(java.util.List, java.lang.Integer)

updateAssetsCreatedInLastFiscalPeriod

public void updateAssetsCreatedInLastFiscalPeriod(Integer fiscalMonth,
                                                  Integer fiscalYear)
Description copied from interface: DepreciationBatchDao
Updates depreciation and service date for all the assets created after last fiscal period date

Specified by:
updateAssetsCreatedInLastFiscalPeriod in interface DepreciationBatchDao
Parameters:
fiscalMonth - fiscal month
fiscalYear - fiscal year
See Also:
DepreciationBatchDao.updateAssetsCreatedInLastFiscalPeriod(java.lang.Integer, java.lang.Integer)

savePendingGLEntries

public void savePendingGLEntries(List<GeneralLedgerPendingEntry> glPendingEntries)
Description copied from interface: DepreciationBatchDao
Saves a batch of GL Pending entries

Specified by:
savePendingGLEntries in interface DepreciationBatchDao
Parameters:
glPendingEntries - GLPE list to be saved
See Also:
DepreciationBatchDao.savePendingGLEntries(java.util.List)

getListOfDepreciableAssetPaymentInfo

public Collection<AssetPaymentInfo> getListOfDepreciableAssetPaymentInfo(Integer fiscalYear,
                                                                         Integer fiscalMonth,
                                                                         Calendar depreciationDate)
Description copied from interface: DepreciationBatchDao
Gets the list of depreciable asset payment list and corresponding details

Specified by:
getListOfDepreciableAssetPaymentInfo in interface DepreciationBatchDao
Parameters:
fiscalYear - Fiscal year
fiscalMonth - Fiscal period
depreciationDate - Depreciation Date
Returns:
List found matching depreciation criteria
See Also:
DepreciationBatchDao.getListOfDepreciableAssetPaymentInfo(java.lang.Integer, java.lang.Integer, java.util.Calendar)

preparedStatementSetter

protected org.springframework.jdbc.core.PreparedStatementSetter preparedStatementSetter(Calendar depreciationDate)

buildCriteria

protected String buildCriteria(Integer fiscalYear,
                               Integer fiscalMonth,
                               List<String> depreciationMethodList,
                               List<String> notAcceptedAssetStatus,
                               List<String> federallyOwnedObjectSubTypes,
                               boolean includeFederal,
                               boolean includePending)

getFullyDepreciatedAssetCount

public Integer getFullyDepreciatedAssetCount()
Description copied from interface: DepreciationBatchDao
Counts the number of assets which has (SUM(Primary Depreciation Amount - Accumulated Depreciation) - Salvage Amount) is zero

Specified by:
getFullyDepreciatedAssetCount in interface DepreciationBatchDao
Returns:
count of assets matching condition
See Also:
DepreciationBatchDao.getFullyDepreciatedAssetCount()

getAssetAndPaymentCount

public Object[] getAssetAndPaymentCount(Integer fiscalYear,
                                        Integer fiscalMonth,
                                        Calendar depreciationDate,
                                        boolean includePending)
Description copied from interface: DepreciationBatchDao
Retrieves asset and asset payment count eligible for depreciation

Specified by:
getAssetAndPaymentCount in interface DepreciationBatchDao
Returns:

getFederallyOwnedAssetAndPaymentCount

public Object[] getFederallyOwnedAssetAndPaymentCount(Integer fiscalYear,
                                                      Integer fiscalMonth,
                                                      Calendar depreciationDate)
Description copied from interface: DepreciationBatchDao
This method...

Specified by:
getFederallyOwnedAssetAndPaymentCount in interface DepreciationBatchDao
Returns:

getPrimaryDepreciationBaseAmountForSV

public Map<Long,org.kuali.rice.kns.util.KualiDecimal> getPrimaryDepreciationBaseAmountForSV()
Description copied from interface: DepreciationBatchDao
Primary depreciation base amount for assets with Salvage Value depreciation method code.

Specified by:
getPrimaryDepreciationBaseAmountForSV in interface DepreciationBatchDao
Returns:
Map
See Also:
DepreciationBatchDao.getPrimaryDepreciationBaseAmountForSV()

getTransferDocLockedAssetCount

public Integer getTransferDocLockedAssetCount()
Description copied from interface: DepreciationBatchDao
Transfer document locked count

Specified by:
getTransferDocLockedAssetCount in interface DepreciationBatchDao
Returns:
See Also:
DepreciationBatchDao.getTransferDocLockedAssetCount()

getRetireDocLockedAssetCount

public Integer getRetireDocLockedAssetCount()
Description copied from interface: DepreciationBatchDao
Retirement document locked count

Specified by:
getRetireDocLockedAssetCount in interface DepreciationBatchDao
Returns:
See Also:
DepreciationBatchDao.getRetireDocLockedAssetCount()

getLockedAssets

public Set<Long> getLockedAssets()
Description copied from interface: DepreciationBatchDao
Returns the list of locked asset by pending transfer and retirement documents

Specified by:
getLockedAssets in interface DepreciationBatchDao
Returns:
See Also:
DepreciationBatchDao.getLockedAssets()

getFederallyOwnedObjectSubTypes

protected List<String> getFederallyOwnedObjectSubTypes()
This method the value of the system parameter NON_DEPRECIABLE_FEDERALLY_OWNED_OBJECT_SUB_TYPES

Returns:

buildINValues

protected String buildINValues(List<String> list)
Utility method that will convert a list into IN string clause for SQL

Parameters:
list - values
Returns:
concatenated string

getKualiConfigurationService

public org.kuali.rice.kns.service.KualiConfigurationService getKualiConfigurationService()
Gets the kualiConfigurationService attribute.

Returns:
Returns the kualiConfigurationService.

setKualiConfigurationService

public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
Sets the kualiConfigurationService attribute value.

Parameters:
kualiConfigurationService - The kualiConfigurationService to set.

getParameterService

public org.kuali.rice.kns.service.ParameterService getParameterService()
Gets the parameterService attribute.

Returns:
Returns the parameterService.

setParameterService

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

Parameters:
parameterService - The parameterService to set.

getDateTimeService

public org.kuali.rice.kns.service.DateTimeService getDateTimeService()
Gets the dateTimeService attribute.

Returns:
Returns the dateTimeService.

setDateTimeService

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

Parameters:
dateTimeService - The dateTimeService to set.

getOptionsService

public OptionsService getOptionsService()
Gets the optionsService attribute.

Returns:
Returns the optionsService.

setOptionsService

public void setOptionsService(OptionsService optionsService)
Sets the optionsService attribute value.

Parameters:
optionsService - The optionsService to set.

getBusinessObjectService

public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
Gets the businessObjectService attribute.

Returns:
Returns the businessObjectService.

setBusinessObjectService

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

Parameters:
businessObjectService - The businessObjectService to set.

getUniversityDateDao

public UniversityDateDao getUniversityDateDao()
Gets the universityDateDao attribute.

Returns:
Returns the universityDateDao.

setUniversityDateDao

public void setUniversityDateDao(UniversityDateDao universityDateDao)
Sets the universityDateDao attribute value.

Parameters:
universityDateDao - The universityDateDao to set.


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