Package com.broadleafcommerce.theme.dao
Class ThemeConfigurationDaoImpl
java.lang.Object
com.broadleafcommerce.theme.dao.ThemeConfigurationDaoImpl
- All Implemented Interfaces:
ThemeConfigurationDao
@Repository("blThemeConfigurationDao")
public class ThemeConfigurationDaoImpl
extends Object
implements ThemeConfigurationDao
- Author:
- Andre Azzolini (apazzolini)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DateReturns the number of milliseconds that the current date/time will be cached for queries before refreshing.Reads a theme configuration by its idreadThemeFieldsByThemeId(Long themeConfigId) Retrieve a list ofThemeFieldobjects associated with the passed in theme configuration id.save(ThemeConfiguration themeConfiguration) Saves a ThemeConfigurationvoidsetCurrentDateResolution(Long currentDateResolution) Sets the number of milliseconds that the current date/time will be cached for queries before refreshing.
-
Field Details
-
em
protected jakarta.persistence.EntityManager em -
sandBoxHelper
protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper -
currentDateResolution
-
cachedDate
-
-
Constructor Details
-
ThemeConfigurationDaoImpl
public ThemeConfigurationDaoImpl()
-
-
Method Details
-
readDefaultTheme
- Specified by:
readDefaultThemein interfaceThemeConfigurationDao- Returns:
- the ThemeConfiguration for theme that is currently marked as active
-
readThemeConfigurationById
Description copied from interface:ThemeConfigurationDaoReads a theme configuration by its id- Specified by:
readThemeConfigurationByIdin interfaceThemeConfigurationDao- Returns:
- ThemeConfiguration
-
readThemeFieldsByThemeId
Description copied from interface:ThemeConfigurationDaoRetrieve a list ofThemeFieldobjects associated with the passed in theme configuration id.- Specified by:
readThemeFieldsByThemeIdin interfaceThemeConfigurationDao- Returns:
-
save
Description copied from interface:ThemeConfigurationDaoSaves a ThemeConfiguration- Specified by:
savein interfaceThemeConfigurationDao- Returns:
- the saved ThemeConfiguration
-
getCurrentDateResolution
Description copied from interface:ThemeConfigurationDaoReturns 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:
getCurrentDateResolutionin interfaceThemeConfigurationDao- Returns:
- the milliseconds to cache the current date/time
-
setCurrentDateResolution
Description copied from interface:ThemeConfigurationDaoSets 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:
setCurrentDateResolutionin interfaceThemeConfigurationDao- Parameters:
currentDateResolution- the milliseconds to cache the current date/time
-
getCurrentDateAfterFactoringInDateResolution
-