Class PageDaoImpl
java.lang.Object
org.broadleafcommerce.cms.page.dao.PageDaoImpl
- All Implemented Interfaces:
PageDao
Created by bpolster.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Date
protected Long
protected jakarta.persistence.EntityManager
protected EntityConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addActiveDateRestrictions
(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.Root pageRoot, List<jakarta.persistence.criteria.Predicate> restrictions, Date afterStartDate, Date beforeEndDate) protected void
addOfflineRestriction
(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.Root pageRoot, List<jakarta.persistence.criteria.Predicate> restrictions) void
void
detachPage
(Page page) filterInactive
(List<Page> pages) findPageByURI
(String uri) findPageByURI
(Locale locale, String uri) findPageByURI
(Locale fullLocale, Locale languageOnlyLocale, String uri) findPageByURIAndActiveDate
(String uri, Date activeDate) Returns pages that match the given URI and are within 1 day of the active date (potentially cached).getResultForQueryAndCache
(jakarta.persistence.criteria.CriteriaQuery<Page> criteriaQuery) protected boolean
isActiveNow
(Page page) Returns all pages, regardless of any sandbox they are apart ofReturns all page templates, regardless of any sandbox they are apart ofreadOnlineAndIncludedPages
(int limit, int offset, String sortBy) Retrieve a subset of all online and site map included PagesreadPageById
(Long id) readPageFieldsByPageId
(Long pageId) savePageTemplate
(PageTemplate template) Saves the givenPageTemplate
void
setCurrentDateResolution
(Long currentDateResolution) updatePage
(Page page)
-
Field Details
-
em
protected jakarta.persistence.EntityManager em -
entityConfiguration
-
currentDateResolution
-
cachedDate
-
-
Constructor Details
-
PageDaoImpl
public PageDaoImpl()
-
-
Method Details
-
readPageById
- Specified by:
readPageById
in interfacePageDao
-
readPageFieldsByPageId
- Specified by:
readPageFieldsByPageId
in interfacePageDao
-
readPageTemplateById
- Specified by:
readPageTemplateById
in interfacePageDao
-
savePageTemplate
Description copied from interface:PageDao
Saves the givenPageTemplate
- Specified by:
savePageTemplate
in interfacePageDao
- Parameters:
template
- thePageTemplate
to save- Returns:
- the database-saved
PageTemplate
-
updatePage
- Specified by:
updatePage
in interfacePageDao
-
delete
-
addPage
-
findPageByURI
- Specified by:
findPageByURI
in interfacePageDao
-
addActiveDateRestrictions
-
addOfflineRestriction
protected void addOfflineRestriction(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.Root pageRoot, List<jakarta.persistence.criteria.Predicate> restrictions) -
getResultForQueryAndCache
-
findPageByURIAndActiveDate
Description copied from interface:PageDao
Returns pages that match the given URI and are within 1 day of the active date (potentially cached). This will only cache for 1 day.- Specified by:
findPageByURIAndActiveDate
in interfacePageDao
- Returns:
-
filterInactive
-
isActiveNow
-
findPageByURI
- Specified by:
findPageByURI
in interfacePageDao
-
readAllPages
Description copied from interface:PageDao
Returns all pages, regardless of any sandbox they are apart of- Specified by:
readAllPages
in interfacePageDao
- Returns:
- all Pages configured in the system
-
readOnlineAndIncludedPages
Description copied from interface:PageDao
Retrieve a subset of all online and site map included Pages- Specified by:
readOnlineAndIncludedPages
in interfacePageDao
- Parameters:
limit
- the maximum number of resultsoffset
- the starting point in the record setsortBy
- the column to sort by- Returns:
-
readAllPageTemplates
Description copied from interface:PageDao
Returns all page templates, regardless of any sandbox they are apart of- Specified by:
readAllPageTemplates
in interfacePageDao
- Returns:
- all
PageTemplate
s configured in the system
-
findPageByURI
- Specified by:
findPageByURI
in interfacePageDao
-
detachPage
- Specified by:
detachPage
in interfacePageDao
-
getCurrentDateResolution
- Specified by:
getCurrentDateResolution
in interfacePageDao
-
setCurrentDateResolution
- Specified by:
setCurrentDateResolution
in interfacePageDao
-