Class DefaultCMSPageDao
java.lang.Object
de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
de.hybris.platform.cms2.servicelayer.daos.impl.DefaultCMSPageDao
- All Implemented Interfaces:
CMSPageDao,Dao
Default implementation of
CMSPageDao interface-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendPageStatusesToQuery(StringBuilder queryBuilder, List<CmsPageStatus> pageStatuses, Map<String, Object> queryParameters, String queryConcatOperator) Appends page statuses to the query builder and adds page statuses to the query parameters.findAllContentPagesByCatalogVersions(Collection<CatalogVersionModel> catalogVersions) Find all active content pages by catalog versions.findAllContentPagesByCatalogVersionsAndPageStatuses(Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find all content pages by catalog versions and a list of page statuses.findAllPagesByCatalogVersion(CatalogVersionModel catalogVersion) Find all active pages by catalog version.findAllPagesByCatalogVersionAndPageStatuses(CatalogVersionModel catalogVersion, List<CmsPageStatus> pageStatuses) Find all pages by catalog version and a list of page statuses.protected <T extends AbstractPageModel>
Collection<T>findAllPagesByCatalogVersionAndPageStatuses(String typeCode, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find all pages by item model type code, catalog versions and page status.findAllPagesByTypeAndCatalogVersions(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions) Find all pages by composed type ofcomposedTypeand catalog versions.<T extends AbstractPageModel>
SearchPageData<T>findAllPagesByTypeAndCatalogVersions(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, SearchPageData searchPageData) Find all active pages by composed type and catalog versions.findAllPagesByTypeAndCatalogVersionsAndPageStatuses(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find all pages by composed type ofcomposedTypeand catalog versions.findDefaultContentPageByLabelAndCatalogVersions(String label, Collection<CatalogVersionModel> catalogVersions) Find default content page with active status by label and catalog versions.findDefaultContentPageByLabelAndCatalogVersionsAndPageStatuses(String label, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find default content page by label, catalog versions and page status.findDefaultPageByTypeAndCatalogVersions(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions) Find default page by type and catalog versions.findDefaultPageByTypeAndCatalogVersionsAndPageStatuses(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find default page by type and catalog versions.findDefaultPagesByType(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions) Find default pages by composed type ofcomposedTypeand catalogVersions.findHomepage(Collection<CatalogVersionModel> catalogVersions) Find homepage with active status for the given collection of catalog versions.findHomepageByPageStatuses(Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find homepage for the given collection of catalog versions and page statuses.findHomepagesByPageStatuses(Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find all homepages for the given collection of catalog versions and page statuses.findPagesByContentSlots(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions) Finds and returns all pages for the given collection of content slots.findPagesByContentSlotsAndPageStatuses(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Finds and returns all pages for the given collection of content slots.findPagesById(String id, Collection<CatalogVersionModel> catalogVersions) Find pages by id and catalog versions.findPagesByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) Find active pages by id and catalog version.findPagesByIdAndCatalogVersionAndPageStatuses(String id, CatalogVersionModel catalogVersion, List<CmsPageStatus> pageStatuses) Find pages by id and catalog version and a list of page statuses.<T extends AbstractPageModel>
List<T>findPagesByIdAndPageStatuses(String id, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find pages by id and catalog versions and page status.findPagesByLabel(String label, Collection<CatalogVersionModel> catalogVersions) Find pages by label and catalog versions.<T extends AbstractPageModel>
Collection<T>findPagesByLabelAndPageStatuses(String label, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find pages by label, catalog versions and page statuses.<T extends AbstractPageModel>
Collection<T>findPagesByLabelsAndPageStatuses(Collection<String> labels, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find content pages by labels, catalog versions and page statuses.findPagesByPageTemplateContentSlots(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions) Finds and returns all pages that uses given content slots by page templatesfindPagesByPageTemplateContentSlotsAndPageStatuses(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Finds and returns all pages that uses given content slots by page templatesfindPagesByType(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, boolean isDefault) Find default or non-default active pages by composed type ofcomposedTypeand catalogVersions.findPagesByTypeAndPageStatuses(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, boolean isDefault, List<CmsPageStatus> pageStatuses) Find default or non-default pages by composed type ofcomposedTypeand catalogVersions and a list of page statuses.protected PaginatedFlexibleSearchServicevoidsetPaginatedFlexibleSearchService(PaginatedFlexibleSearchService paginatedFlexibleSearchService) Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
Field Details
-
AND
- See Also:
-
OR
- See Also:
-
CATALOG_VERSIONS_QUERY_PARAM
- See Also:
-
PAGE_STATUSES_QUERY_PARAM
- See Also:
-
CONTENT_SLOTS_QUERY_PARAM
- See Also:
-
LABELS_QUERY_PARAM
- See Also:
-
PAGE_QUERY_ALIAS
- See Also:
-
-
Constructor Details
-
DefaultCMSPageDao
public DefaultCMSPageDao()
-
-
Method Details
-
findPagesByLabel
public Collection<ContentPageModel> findPagesByLabel(String label, Collection<CatalogVersionModel> catalogVersions) Find pages by label and catalog versions.- Specified by:
findPagesByLabelin interfaceCMSPageDao- Parameters:
label- the label ofContentPageModelobject to findcatalogVersions- the catalog versions- Returns:
- the collection of found
ContentPageModelobjects or empty collection when not found.
-
findPagesByLabelAndPageStatuses
public <T extends AbstractPageModel> Collection<T> findPagesByLabelAndPageStatuses(String label, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFind pages by label, catalog versions and page statuses.- Specified by:
findPagesByLabelAndPageStatusesin interfaceCMSPageDao- Parameters:
label- the label ofContentPageModelobject to findcatalogVersions- the catalog versionspageStatuses- page status. i.e. active, deleted- Returns:
- the collection of found
AbstractPageModelobjects or empty collection when not found.
-
findPagesByLabelsAndPageStatuses
public <T extends AbstractPageModel> Collection<T> findPagesByLabelsAndPageStatuses(Collection<String> labels, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFind content pages by labels, catalog versions and page statuses.- Specified by:
findPagesByLabelsAndPageStatusesin interfaceCMSPageDao- Parameters:
labels- the labels ofContentPageModelobject to findcatalogVersions- the catalog versionspageStatuses- page status. i.e. active, deleted- Returns:
- the collection of found
ContentPageModelobjects or empty collection when not found.
-
findDefaultContentPageByLabelAndCatalogVersions
public Collection<ContentPageModel> findDefaultContentPageByLabelAndCatalogVersions(String label, Collection<CatalogVersionModel> catalogVersions) Find default content page with active status by label and catalog versions.- Specified by:
findDefaultContentPageByLabelAndCatalogVersionsin interfaceCMSPageDao- Parameters:
label- the labelcatalogVersions- the catalog versions- Returns:
- the collection of found
ContentPageModelobjects or empty collection when not found.
-
findDefaultContentPageByLabelAndCatalogVersionsAndPageStatuses
public Collection<ContentPageModel> findDefaultContentPageByLabelAndCatalogVersionsAndPageStatuses(String label, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find default content page by label, catalog versions and page status.- Specified by:
findDefaultContentPageByLabelAndCatalogVersionsAndPageStatusesin interfaceCMSPageDao- Parameters:
label- the labelcatalogVersions- the catalog versionspageStatuses- - page status. i.e. active, deleted- Returns:
- the collection of found
ContentPageModelobjects or empty collection when not found.
-
findDefaultPageByTypeAndCatalogVersions
public Collection<AbstractPageModel> findDefaultPageByTypeAndCatalogVersions(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions) Find default page by type and catalog versions.- Specified by:
findDefaultPageByTypeAndCatalogVersionsin interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versions- Returns:
- the collection of found pages or empty collection when not found.
-
findDefaultPageByTypeAndCatalogVersionsAndPageStatuses
public Collection<AbstractPageModel> findDefaultPageByTypeAndCatalogVersionsAndPageStatuses(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find default page by type and catalog versions.- Specified by:
findDefaultPageByTypeAndCatalogVersionsAndPageStatusesin interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versionspageStatuses- page status. i.e. active, deleted- Returns:
- the collection of found pages or empty collection when not found.
-
findAllPagesByCatalogVersion
public Collection<AbstractPageModel> findAllPagesByCatalogVersion(CatalogVersionModel catalogVersion) Find all active pages by catalog version.- Specified by:
findAllPagesByCatalogVersionin interfaceCMSPageDao- Parameters:
catalogVersion- the catalog version- Returns:
- the collection of found
AbstractPageModelobjects or empty collection when not found.
-
findAllPagesByTypeAndCatalogVersions
public Collection<AbstractPageModel> findAllPagesByTypeAndCatalogVersions(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions) Find all pages by composed type ofcomposedTypeand catalog versions.- Specified by:
findAllPagesByTypeAndCatalogVersionsin interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versions- Returns:
- the collection of found pages or empty collection when not found.
-
findAllPagesByTypeAndCatalogVersionsAndPageStatuses
public Collection<AbstractPageModel> findAllPagesByTypeAndCatalogVersionsAndPageStatuses(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find all pages by composed type ofcomposedTypeand catalog versions.- Specified by:
findAllPagesByTypeAndCatalogVersionsAndPageStatusesin interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versionspageStatuses- page status. i.e. active, deleted- Returns:
- the collection of found pages or empty collection when not found.
-
findAllContentPagesByCatalogVersions
public Collection<ContentPageModel> findAllContentPagesByCatalogVersions(Collection<CatalogVersionModel> catalogVersions) Find all active content pages by catalog versions.- Specified by:
findAllContentPagesByCatalogVersionsin interfaceCMSPageDao- Parameters:
catalogVersions- the catalog versions- Returns:
- the collection of found pages or empty collection when not found.
-
findAllContentPagesByCatalogVersionsAndPageStatuses
public Collection<ContentPageModel> findAllContentPagesByCatalogVersionsAndPageStatuses(Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFind all content pages by catalog versions and a list of page statuses.- Specified by:
findAllContentPagesByCatalogVersionsAndPageStatusesin interfaceCMSPageDao- Parameters:
catalogVersions- the catalog versionspageStatuses- a list of page statuses- Returns:
- the collection of found pages or empty collection when not found.
-
findAllPagesByCatalogVersionAndPageStatuses
public Collection<AbstractPageModel> findAllPagesByCatalogVersionAndPageStatuses(CatalogVersionModel catalogVersion, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFind all pages by catalog version and a list of page statuses.- Specified by:
findAllPagesByCatalogVersionAndPageStatusesin interfaceCMSPageDao- Parameters:
catalogVersion- the catalog versionpageStatuses- a list of page statuses- Returns:
- the collection of found
AbstractPageModelobjects or empty collection when not found.
-
findAllPagesByCatalogVersionAndPageStatuses
protected <T extends AbstractPageModel> Collection<T> findAllPagesByCatalogVersionAndPageStatuses(String typeCode, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Find all pages by item model type code, catalog versions and page status.- Parameters:
typeCode- the item model type code; must be of type or sub-type ofAbstractPageModelcatalogVersions- the catalog versionspageStatuses- a list of page statuses- Returns:
- the collection of found
AbstractPageModelobjects or empty collection when not found.
-
findPagesByPageTemplateContentSlots
public Collection<AbstractPageModel> findPagesByPageTemplateContentSlots(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions) Finds and returns all pages that uses given content slots by page templates- Specified by:
findPagesByPageTemplateContentSlotsin interfaceCMSPageDao- Parameters:
contentSlots- - collection of content slots that will be searched for pagescatalogVersions- - collection of catalog versions that result pages will be filtered with- Returns:
- - collection of
AbstractPageModelobjects that are valid for given content slots and catalog versions
-
findPagesByPageTemplateContentSlotsAndPageStatuses
public Collection<AbstractPageModel> findPagesByPageTemplateContentSlotsAndPageStatuses(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Finds and returns all pages that uses given content slots by page templates- Specified by:
findPagesByPageTemplateContentSlotsAndPageStatusesin interfaceCMSPageDao- Parameters:
contentSlots- - collection of content slots that will be searched for pagescatalogVersions- - collection of catalog versions that result pages will be filtered withpageStatuses- - page status. i.e. active, deleted- Returns:
- - collection of
AbstractPageModelobjects that are valid for given content slots and catalog versions
-
findPagesByIdAndCatalogVersion
public List<AbstractPageModel> findPagesByIdAndCatalogVersion(String id, CatalogVersionModel catalogVersion) Find active pages by id and catalog version.- Specified by:
findPagesByIdAndCatalogVersionin interfaceCMSPageDao- Parameters:
id- the id ofAbstractPageModelobject to findcatalogVersion- the catalog version- Returns:
- the list of found
AbstractPageModelobjects or empty list when not found.
-
findPagesByIdAndCatalogVersionAndPageStatuses
public List<AbstractPageModel> findPagesByIdAndCatalogVersionAndPageStatuses(String id, CatalogVersionModel catalogVersion, List<CmsPageStatus> pageStatuses) Find pages by id and catalog version and a list of page statuses.- Specified by:
findPagesByIdAndCatalogVersionAndPageStatusesin interfaceCMSPageDao- Parameters:
id- the id ofAbstractPageModelobject to findcatalogVersion- the catalog versionpageStatuses- a list of page statuses- Returns:
- the list of found
AbstractPageModelobjects or empty list when not found.
-
findPagesById
public List<AbstractPageModel> findPagesById(String id, Collection<CatalogVersionModel> catalogVersions) Find pages by id and catalog versions.- Specified by:
findPagesByIdin interfaceCMSPageDao- Parameters:
id- the id ofAbstractPageModelobject to findcatalogVersions- the catalog versions- Returns:
- the list of found
AbstractPageModelobject or empty list when not found.
-
findPagesByIdAndPageStatuses
public <T extends AbstractPageModel> List<T> findPagesByIdAndPageStatuses(String id, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFind pages by id and catalog versions and page status.- Specified by:
findPagesByIdAndPageStatusesin interfaceCMSPageDao- Parameters:
id- the id ofAbstractPageModelobject to findcatalogVersions- the catalog versionspageStatuses- page status. i.e. active, deleted- Returns:
- the list of found
AbstractPageModelobject or empty list when not found.
-
findDefaultPagesByType
public List<AbstractPageModel> findDefaultPagesByType(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions) Find default pages by composed type ofcomposedTypeand catalogVersions.- Specified by:
findDefaultPagesByTypein interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versions- Returns:
- the list of found page objects of type
composedTypeor empty list when not found.
-
findPagesByType
public List<AbstractPageModel> findPagesByType(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, boolean isDefault) Find default or non-default active pages by composed type ofcomposedTypeand catalogVersions.- Specified by:
findPagesByTypein interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versionsisDefault- true to find default pages; false otherwise- Returns:
- the list of found page objects of type
composedTypeor empty list when not found.
-
findPagesByTypeAndPageStatuses
public List<AbstractPageModel> findPagesByTypeAndPageStatuses(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, boolean isDefault, List<CmsPageStatus> pageStatuses) Find default or non-default pages by composed type ofcomposedTypeand catalogVersions and a list of page statuses.- Specified by:
findPagesByTypeAndPageStatusesin interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versionsisDefault- true to find default pages; false otherwisepageStatuses- a list of page statuses- Returns:
- the list of found page objects of type
composedTypeor empty list when not found.
-
findPagesByContentSlots
public Collection<AbstractPageModel> findPagesByContentSlots(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions) Finds and returns all pages for the given collection of content slots.- Specified by:
findPagesByContentSlotsin interfaceCMSPageDao- Parameters:
contentSlots- - collection of content slots that will be searched for pagescatalogVersions- - collection of catalog versions that result pages will be filtered with- Returns:
- - collection of
AbstractPageModelobjects that are valid for given content slots and catalog versions
-
findPagesByContentSlotsAndPageStatuses
public Collection<AbstractPageModel> findPagesByContentSlotsAndPageStatuses(Collection<ContentSlotModel> contentSlots, Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFinds and returns all pages for the given collection of content slots.- Specified by:
findPagesByContentSlotsAndPageStatusesin interfaceCMSPageDao- Parameters:
contentSlots- - collection of content slots that will be searched for pagescatalogVersions- - collection of catalog versions that result pages will be filtered withpageStatuses- - page status. i.e. active, deleted- Returns:
- - collection of
AbstractPageModelobjects that are valid for given content slots and catalog versions
-
findHomepage
Description copied from interface:CMSPageDaoFind homepage with active status for the given collection of catalog versions.- Specified by:
findHomepagein interfaceCMSPageDao- Parameters:
catalogVersions- the catalog versions- Returns:
- the found
ContentPageModelobject or null when not found
-
findHomepageByPageStatuses
public ContentPageModel findHomepageByPageStatuses(Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFind homepage for the given collection of catalog versions and page statuses.- Specified by:
findHomepageByPageStatusesin interfaceCMSPageDao- Parameters:
catalogVersions- - the catalog versionspageStatuses- - list of page status, e.g. active, deleted- Returns:
- the found
ContentPageModelobject or null when not found
-
findHomepagesByPageStatuses
public Collection<ContentPageModel> findHomepagesByPageStatuses(Collection<CatalogVersionModel> catalogVersions, List<CmsPageStatus> pageStatuses) Description copied from interface:CMSPageDaoFind all homepages for the given collection of catalog versions and page statuses.- Specified by:
findHomepagesByPageStatusesin interfaceCMSPageDao- Parameters:
catalogVersions- - the catalog versionspageStatuses- - list of page status, e.g. active, deleted- Returns:
- the list of found
ContentPageModelobjects or empty when not found
-
appendPageStatusesToQuery
protected void appendPageStatusesToQuery(StringBuilder queryBuilder, List<CmsPageStatus> pageStatuses, Map<String, Object> queryParameters, String queryConcatOperator) Appends page statuses to the query builder and adds page statuses to the query parameters.- Parameters:
queryBuilder- referenced query builderpageStatuses- page statuesqueryParameters- map of query parametersqueryConcatOperator- the appended query operator e.g. "AND", "OR"
-
findAllPagesByTypeAndCatalogVersions
public <T extends AbstractPageModel> SearchPageData<T> findAllPagesByTypeAndCatalogVersions(ComposedTypeModel composedType, Collection<CatalogVersionModel> catalogVersions, SearchPageData searchPageData) Description copied from interface:CMSPageDaoFind all active pages by composed type and catalog versions. The result is paginated.- Specified by:
findAllPagesByTypeAndCatalogVersionsin interfaceCMSPageDao- Parameters:
composedType- the composed typecatalogVersions- the catalog versionssearchPageData- - the pagination and sorting information- Returns:
- the collection of found pages or empty collection when not found.
-
getPaginatedFlexibleSearchService
-
setPaginatedFlexibleSearchService
public void setPaginatedFlexibleSearchService(PaginatedFlexibleSearchService paginatedFlexibleSearchService)
-