public class DefaultCMSComponentDao extends AbstractCMSItemDao implements CMSComponentDao
CMSComponentDao interface.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CATALOG_VERSIONS_QUERY_PARAM |
protected static java.lang.String |
QUERY_ALIAS |
flexibleSearchService, modelService| Constructor and Description |
|---|
DefaultCMSComponentDao() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<AbstractCMSComponentModel> |
findAllCMSComponentsByCatalogVersion(CatalogVersionModel catalogVersion)
Find cms components that belong to a given catalog version.
|
SearchResult<AbstractCMSComponentModel> |
findByCatalogVersionAndMask(CatalogVersionModel catalogVersionModel,
java.lang.String mask,
PageableData pageableData)
For a given mask used as filter and a
PageableData query, will return a page object consisting of the
content list of the requested page number and the total number of entities for the given mask |
java.util.List<AbstractCMSComponentContainerModel> |
findCMSComponentContainersByIdAndCatalogVersion(java.lang.String id,
CatalogVersionModel catalogVersion)
Find cms component containers by id and catalog version.
|
java.util.List<AbstractCMSComponentModel> |
findCMSComponents(java.lang.String id,
java.lang.String contentSlotId,
java.util.Collection<CatalogVersionModel> catalogVersions)
Find cms components by id, contentSlotId and catalog versions.
|
java.util.List<AbstractCMSComponentModel> |
findCMSComponentsById(java.lang.String id)
Find cms components by id.
|
java.util.List<AbstractCMSComponentModel> |
findCMSComponentsByIdAndCatalogVersion(java.lang.String id,
CatalogVersionModel catalogVersion)
Find cms components by id and catalog version.
|
java.util.List<AbstractCMSComponentModel> |
findCMSComponentsByIdAndCatalogVersions(java.lang.String id,
java.util.Collection<CatalogVersionModel> catalogVersions)
Find cms components by id and catalog versions.
|
<T extends AbstractCMSComponentModel> |
findCMSComponentsByIdsAndCatalogVersions(java.util.Collection<java.lang.String> ids,
java.util.Collection<CatalogVersionModel> catalogVersions,
SearchPageData searchPageDataInput)
Find cms components by list of IDs and catalog versions with pagination and sorting.
|
java.util.List<SimpleCMSComponentModel> |
findCMSComponentsOfContainerByIdAndCatalogVersion(java.lang.String id,
CatalogVersionModel catalogVersion)
Find cms components of container by id and catalog version.
|
long |
getComponentReferenceCountOutsidePage(AbstractCMSComponentModel componentModel,
AbstractPageModel pageModel)
Finds the number of times the given component is used outside a given page (e.g., other pages or shared slots).
|
protected PaginatedFlexibleSearchService |
getPaginatedFlexibleSearchService() |
void |
setPaginatedFlexibleSearchService(PaginatedFlexibleSearchService paginatedFlexibleSearchService) |
buildQuery, findSortQuery, getCmsSortQueryDataRegistry, setCmsSortQueryDataRegistrygetAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelServiceprotected static final java.lang.String CATALOG_VERSIONS_QUERY_PARAM
protected static final java.lang.String QUERY_ALIAS
public SearchResult<AbstractCMSComponentModel> findByCatalogVersionAndMask(CatalogVersionModel catalogVersionModel, java.lang.String mask, PageableData pageableData)
CMSComponentDaoPageableData query, will return a page object consisting of the
content list of the requested page number and the total number of entities for the given maskfindByCatalogVersionAndMask in interface CMSComponentDaocatalogVersionModel - the catalog version to filter onmask - the string value on which components will be filtered, implementations may choose to filter on the
component namepageableData - the PageableData object containing the page request details. PageableData may contain a String
value for sort, this will be used by a sorting strategy to select the most appropriate query or resort
to a default one.public java.util.List<SimpleCMSComponentModel> findCMSComponentsOfContainerByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
findCMSComponentsOfContainerByIdAndCatalogVersion in interface CMSComponentDaoid - the id of CMS componentcatalogVersion - the catalog versionpublic java.util.List<AbstractCMSComponentModel> findCMSComponentsByIdAndCatalogVersions(java.lang.String id, java.util.Collection<CatalogVersionModel> catalogVersions)
findCMSComponentsByIdAndCatalogVersions in interface CMSComponentDaoid - the id of CMS componentcatalogVersions - the collection of catalog versionspublic <T extends AbstractCMSComponentModel> SearchPageData<T> findCMSComponentsByIdsAndCatalogVersions(java.util.Collection<java.lang.String> ids, java.util.Collection<CatalogVersionModel> catalogVersions, SearchPageData searchPageDataInput)
findCMSComponentsByIdsAndCatalogVersions in interface CMSComponentDaoT - the AbstractCMSComponentModel subclass typeids - the collection of ids of CMS componentscatalogVersions - the collection of catalog versionssearchPageDataInput - the searchPageData contains requested pagination and sorting informationpublic java.util.List<AbstractCMSComponentModel> findCMSComponents(java.lang.String id, java.lang.String contentSlotId, java.util.Collection<CatalogVersionModel> catalogVersions)
findCMSComponents in interface CMSComponentDaoid - the id of CMS component.contentSlotId - the if of content slotcatalogVersions - the collection of catalog versionspublic java.util.List<AbstractCMSComponentModel> findCMSComponentsByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
findCMSComponentsByIdAndCatalogVersion in interface CMSComponentDaoid - the id of CMS componentcatalogVersion - the catalog versionpublic java.util.List<AbstractCMSComponentModel> findCMSComponentsById(java.lang.String id)
findCMSComponentsById in interface CMSComponentDaoid - the id of CMS componentpublic java.util.List<AbstractCMSComponentContainerModel> findCMSComponentContainersByIdAndCatalogVersion(java.lang.String id, CatalogVersionModel catalogVersion)
findCMSComponentContainersByIdAndCatalogVersion in interface CMSComponentDaoid - the id of CMS componentcatalogVersion - the catalog versionpublic java.util.List<AbstractCMSComponentModel> findAllCMSComponentsByCatalogVersion(CatalogVersionModel catalogVersion)
CMSComponentDaofindAllCMSComponentsByCatalogVersion in interface CMSComponentDaocatalogVersion - - the catalog versionpublic long getComponentReferenceCountOutsidePage(AbstractCMSComponentModel componentModel, AbstractPageModel pageModel)
CMSComponentDaogetComponentReferenceCountOutsidePage in interface CMSComponentDaocomponentModel - - The component whose references to count.pageModel - - The page not to be included in the component references count.protected PaginatedFlexibleSearchService getPaginatedFlexibleSearchService()
public void setPaginatedFlexibleSearchService(PaginatedFlexibleSearchService paginatedFlexibleSearchService)
Copyright © 2018 SAP SE. All Rights Reserved.