org.broadleafcommerce.common.config.dao
Class ModuleConfigurationDaoImpl

java.lang.Object
  extended by org.broadleafcommerce.common.config.dao.ModuleConfigurationDaoImpl
All Implemented Interfaces:
ModuleConfigurationDao

@Repository(value="blModuleConfigurationDao")
public class ModuleConfigurationDaoImpl
extends Object
implements ModuleConfigurationDao


Field Summary
protected  Date currentDate
           
protected  Long currentDateResolution
           
protected  javax.persistence.EntityManager em
           
protected  EntityConfiguration entityConfiguration
           
 
Constructor Summary
ModuleConfigurationDaoImpl()
           
 
Method Summary
 void delete(ModuleConfiguration config)
           
 Long getCurrentDateResolution()
          Returns the number of milliseconds that the current date/time will be cached for queries before refreshing.
protected  Date getDateFactoringInDateResolution(Date currentDate)
           
 List<ModuleConfiguration> readActiveByType(ModuleConfigurationType type)
           
 List<ModuleConfiguration> readAllByType(ModuleConfigurationType type)
           
 ModuleConfiguration readById(Long id)
           
 List<ModuleConfiguration> readByType(Class<? extends ModuleConfiguration> type)
           
 ModuleConfiguration save(ModuleConfiguration config)
           
 void setCurrentDateResolution(Long currentDateResolution)
          Sets the number of milliseconds that the current date/time will be cached for queries before refreshing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

em

protected javax.persistence.EntityManager em

entityConfiguration

protected EntityConfiguration entityConfiguration

currentDateResolution

protected Long currentDateResolution

currentDate

protected Date currentDate
Constructor Detail

ModuleConfigurationDaoImpl

public ModuleConfigurationDaoImpl()
Method Detail

getDateFactoringInDateResolution

protected Date getDateFactoringInDateResolution(Date currentDate)

readById

public ModuleConfiguration readById(Long id)
Specified by:
readById in interface ModuleConfigurationDao

save

public ModuleConfiguration save(ModuleConfiguration config)
Specified by:
save in interface ModuleConfigurationDao

delete

public void delete(ModuleConfiguration config)
Specified by:
delete in interface ModuleConfigurationDao

readAllByType

public List<ModuleConfiguration> readAllByType(ModuleConfigurationType type)
Specified by:
readAllByType in interface ModuleConfigurationDao

readActiveByType

public List<ModuleConfiguration> readActiveByType(ModuleConfigurationType type)
Specified by:
readActiveByType in interface ModuleConfigurationDao

readByType

public List<ModuleConfiguration> readByType(Class<? extends ModuleConfiguration> type)
Specified by:
readByType in interface ModuleConfigurationDao

getCurrentDateResolution

public Long getCurrentDateResolution()
Description copied from interface: ModuleConfigurationDao
Returns the number of milliseconds that the current date/time will be cached for queries before refreshing. This aids in query caching, otherwise every query that utilized current date would be different and caching would be ineffective.

Specified by:
getCurrentDateResolution in interface ModuleConfigurationDao
Returns:
the milliseconds to cache the current date/time

setCurrentDateResolution

public void setCurrentDateResolution(Long currentDateResolution)
Description copied from interface: ModuleConfigurationDao
Sets the number of milliseconds that the current date/time will be cached for queries before refreshing. This aids in query caching, otherwise every query that utilized current date would be different and caching would be ineffective.

Specified by:
setCurrentDateResolution in interface ModuleConfigurationDao
Parameters:
currentDateResolution - the milliseconds to cache the current date/time


Copyright © 2013. All Rights Reserved.