Class PageDaoImpl
java.lang.Object
org.broadleafcommerce.cms.page.dao.PageDaoImpl
- All Implemented Interfaces:
PageDao
Created by bpolster.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Dateprotected Longprotected jakarta.persistence.EntityManagerprotected EntityConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddActiveDateRestrictions(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.Root pageRoot, List<jakarta.persistence.criteria.Predicate> restrictions, Date afterStartDate, Date beforeEndDate) protected voidaddOfflineRestriction(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.Root pageRoot, List<jakarta.persistence.criteria.Predicate> restrictions) voidvoiddetachPage(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 booleanisActiveNow(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 givenPageTemplatevoidsetCurrentDateResolution(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:
readPageByIdin interfacePageDao
-
readPageFieldsByPageId
- Specified by:
readPageFieldsByPageIdin interfacePageDao
-
readPageTemplateById
- Specified by:
readPageTemplateByIdin interfacePageDao
-
savePageTemplate
Description copied from interface:PageDaoSaves the givenPageTemplate- Specified by:
savePageTemplatein interfacePageDao- Parameters:
template- thePageTemplateto save- Returns:
- the database-saved
PageTemplate
-
updatePage
- Specified by:
updatePagein interfacePageDao
-
delete
-
addPage
-
findPageByURI
- Specified by:
findPageByURIin 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:PageDaoReturns 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:
findPageByURIAndActiveDatein interfacePageDao- Returns:
-
filterInactive
-
isActiveNow
-
findPageByURI
- Specified by:
findPageByURIin interfacePageDao
-
readAllPages
Description copied from interface:PageDaoReturns all pages, regardless of any sandbox they are apart of- Specified by:
readAllPagesin interfacePageDao- Returns:
- all Pages configured in the system
-
readOnlineAndIncludedPages
Description copied from interface:PageDaoRetrieve a subset of all online and site map included Pages- Specified by:
readOnlineAndIncludedPagesin 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:PageDaoReturns all page templates, regardless of any sandbox they are apart of- Specified by:
readAllPageTemplatesin interfacePageDao- Returns:
- all
PageTemplates configured in the system
-
findPageByURI
- Specified by:
findPageByURIin interfacePageDao
-
detachPage
- Specified by:
detachPagein interfacePageDao
-
getCurrentDateResolution
- Specified by:
getCurrentDateResolutionin interfacePageDao
-
setCurrentDateResolution
- Specified by:
setCurrentDateResolutionin interfacePageDao
-