Class DefaultCMSContenSlotDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
-
- de.hybris.platform.cms2.servicelayer.daos.impl.DefaultCMSContenSlotDao
-
- All Implemented Interfaces:
CMSContentSlotDao,Dao
public class DefaultCMSContenSlotDao extends AbstractItemDao implements CMSContentSlotDao
Default implementation ofCMSContentSlotDaointerface.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCATALOG_VERSIONS_QUERY_PARAMprotected static java.lang.StringQUERY_CONTENT_SLOT-
Fields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSContenSlotDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ContentSlotForTemplateModel>findAllContentSlotForTemplateByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)Find the content slot for template relations for the given content slot and catalog version (used for multi-country)java.util.Collection<CMSRelationModel>findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot)Find all content slot relations by content slot.java.util.List<ContentSlotForPageModel>findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)Find all content slot relations by content slot and catalog version.java.util.List<ContentSlotForPageModel>findAllContentSlotRelationsByPage(AbstractPageModel page)Find all content slot relations by page.java.util.List<ContentSlotForPageModel>findAllContentSlotRelationsByPage(AbstractPageModel page, CatalogVersionModel catalogVersion)Find all content slot relations by page and catalog version.java.util.List<ContentSlotForTemplateModel>findAllContentSlotRelationsByPageTemplate(PageTemplateModel template)Find all content slot relations by page template.java.util.List<ContentSlotForTemplateModel>findAllContentSlotRelationsByPageTemplate(PageTemplateModel template, CatalogVersionModel catalogVersion)Find all content slot relations by page template and catalog version.java.util.List<ContentSlotForPageModel>findAllContentSlotRelationsByPageUid(java.lang.String pageUid, CatalogVersionModel catalogVersion)Find all content slot relations for page uid and catalog version.java.util.List<ContentSlotModel>findAllMultiCountryContentSlotsByOriginalSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions)Find the content slots and their catalog hierarchy for the given content slots and catalog versions (used for multi-country)java.util.List<ContentSlotForPageModel>findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)Find content slot relations by page, content slot and catalog version.java.util.List<ContentSlotForPageModel>findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, java.util.Collection<CatalogVersionModel> catalogVersions)Find content slot relations by page, content slot and catalog versions.java.util.List<ContentSlotForPageModel>findContentSlotRelationsByPageAndPosition(AbstractPageModel page, java.lang.String position, CatalogVersionModel catalogVersion)Find content slot relations by page, position and catalog versions.java.util.List<ContentSlotForPageModel>findContentSlotRelationsByPageAndPosition(AbstractPageModel page, java.lang.String position, java.util.Collection<CatalogVersionModel> catalogVersions)Find content slot relations by page, position and catalog versions.java.util.List<ContentSlotForTemplateModel>findContentSlotRelationsByPageTemplateAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlotModel, CatalogVersionModel catalogVersion)Find content slot relations for given page template and content slot.java.util.List<ContentSlotForTemplateModel>findContentSlotRelationsByPageTemplateAndPosition(PageTemplateModel template, java.lang.String position, java.util.Collection<CatalogVersionModel> catalogVersions)Find content slot relations by page template, position and catalog versions.java.util.List<ContentSlotModel>findContentSlotsById(java.lang.String id)Find content slots by id.java.util.List<ContentSlotModel>findContentSlotsByIdAndCatalogVersions(java.lang.String id, java.util.Collection<CatalogVersionModel> catalogVersions)Find content slots by id and catalog versions.java.util.Collection<ContentSlotModel>findContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)Find all content slots that belong to a given catalog version.java.util.Collection<CMSRelationModel>findOnlyContentSlotRelationsByContentSlot(ContentSlotModel contentSlot)Find only content slot relations not content slot template relations of given content slot.java.util.Collection<AbstractPageModel>findPagesByContentSlot(ContentSlotModel contentSlot)Find pages related to content slot.-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
-
-
-
Field Detail
-
CATALOG_VERSIONS_QUERY_PARAM
protected static final java.lang.String CATALOG_VERSIONS_QUERY_PARAM
- See Also:
- Constant Field Values
-
QUERY_CONTENT_SLOT
protected static final java.lang.String QUERY_CONTENT_SLOT
- See Also:
- Constant Field Values
-
-
Method Detail
-
findPagesByContentSlot
public java.util.Collection<AbstractPageModel> findPagesByContentSlot(ContentSlotModel contentSlot)
Find pages related to content slot.- Specified by:
findPagesByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- theContentSlotModelobject for which pages will be obtained.- Returns:
- the collection of
AbstractPageModelobjects related toContentSlotModelobject or empty list when not found.
-
findAllContentSlotRelationsByPageTemplate
public java.util.List<ContentSlotForTemplateModel> findAllContentSlotRelationsByPageTemplate(PageTemplateModel template, CatalogVersionModel catalogVersion)
Find all content slot relations by page template and catalog version.- Specified by:
findAllContentSlotRelationsByPageTemplatein interfaceCMSContentSlotDao- Parameters:
template- the page templatecatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found.
-
findContentSlotRelationsByPageTemplateAndContentSlot
public java.util.List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndContentSlot(PageTemplateModel template, ContentSlotModel contentSlotModel, CatalogVersionModel catalogVersion)
Find content slot relations for given page template and content slot.- Specified by:
findContentSlotRelationsByPageTemplateAndContentSlotin interfaceCMSContentSlotDao- Parameters:
template- the templatecontentSlotModel- the content slotcatalogVersion- the catalog version- Returns:
- the found
ContentSlotForTemplateModel
-
findAllContentSlotRelationsByPageTemplate
public java.util.List<ContentSlotForTemplateModel> findAllContentSlotRelationsByPageTemplate(PageTemplateModel template)
Find all content slot relations by page template.- Specified by:
findAllContentSlotRelationsByPageTemplatein interfaceCMSContentSlotDao- Parameters:
template- the page template- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found.
-
findContentSlotRelationsByPageTemplateAndPosition
public java.util.List<ContentSlotForTemplateModel> findContentSlotRelationsByPageTemplateAndPosition(PageTemplateModel template, java.lang.String position, java.util.Collection<CatalogVersionModel> catalogVersions)
Find content slot relations by page template, position and catalog versions.- Specified by:
findContentSlotRelationsByPageTemplateAndPositionin interfaceCMSContentSlotDao- Parameters:
template- the page templateposition- the positioncatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotForTemplateModelobjects or empty list when not found
-
findAllContentSlotRelationsByPage
public java.util.List<ContentSlotForPageModel> findAllContentSlotRelationsByPage(AbstractPageModel page, CatalogVersionModel catalogVersion)
Find all content slot relations by page and catalog version.- Specified by:
findAllContentSlotRelationsByPagein interfaceCMSContentSlotDao- Parameters:
page- the pagecatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByPageUid
public java.util.List<ContentSlotForPageModel> findAllContentSlotRelationsByPageUid(java.lang.String pageUid, CatalogVersionModel catalogVersion)
Find all content slot relations for page uid and catalog version.- Specified by:
findAllContentSlotRelationsByPageUidin interfaceCMSContentSlotDao- Parameters:
pageUid- the page uidcatalogVersion- the catalog versions- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByPage
public java.util.List<ContentSlotForPageModel> findAllContentSlotRelationsByPage(AbstractPageModel page)
Find all content slot relations by page.- Specified by:
findAllContentSlotRelationsByPagein interfaceCMSContentSlotDao- Parameters:
page- the page- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByContentSlot
public java.util.List<ContentSlotForPageModel> findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)
Find all content slot relations by content slot and catalog version.- Specified by:
findAllContentSlotRelationsByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slotcatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findAllContentSlotRelationsByContentSlot
public java.util.Collection<CMSRelationModel> findAllContentSlotRelationsByContentSlot(ContentSlotModel contentSlot)
Find all content slot relations by content slot.- Specified by:
findAllContentSlotRelationsByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slot- Returns:
- the collection of found
CMSRelationModelobjects or empty collection when not found
-
findOnlyContentSlotRelationsByContentSlot
public java.util.Collection<CMSRelationModel> findOnlyContentSlotRelationsByContentSlot(ContentSlotModel contentSlot)
Find only content slot relations not content slot template relations of given content slot. The difference with findAllContentSlotRelationsByContentSlot: it does not search on the page's template for given contentSlot- Specified by:
findOnlyContentSlotRelationsByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slot- Returns:
- the collection of found
CMSRelationModelobjects or empty collection when not found
-
findContentSlotsByIdAndCatalogVersions
public java.util.List<ContentSlotModel> findContentSlotsByIdAndCatalogVersions(java.lang.String id, java.util.Collection<CatalogVersionModel> catalogVersions)
Find content slots by id and catalog versions.- Specified by:
findContentSlotsByIdAndCatalogVersionsin interfaceCMSContentSlotDao- Parameters:
id- the id ofContentSlotModelobject to findcatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotModelobjects or empty list when not found
-
findContentSlotsById
public java.util.List<ContentSlotModel> findContentSlotsById(java.lang.String id)
Find content slots by id.- Specified by:
findContentSlotsByIdin interfaceCMSContentSlotDao- Parameters:
id- the id ofContentSlotModelobject to find- Returns:
- the list of found
ContentSlotModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndContentSlot
public java.util.List<ContentSlotForPageModel> findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)
Find content slot relations by page, content slot and catalog version.- Specified by:
findContentSlotRelationsByPageAndContentSlotin interfaceCMSContentSlotDao- Parameters:
page- the pagecontentSlot- the content slotcatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndContentSlot
public java.util.List<ContentSlotForPageModel> findContentSlotRelationsByPageAndContentSlot(AbstractPageModel page, ContentSlotModel contentSlot, java.util.Collection<CatalogVersionModel> catalogVersions)
Find content slot relations by page, content slot and catalog versions.- Specified by:
findContentSlotRelationsByPageAndContentSlotin interfaceCMSContentSlotDao- Parameters:
page- the pagecontentSlot- the content slotcatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndPosition
public java.util.List<ContentSlotForPageModel> findContentSlotRelationsByPageAndPosition(AbstractPageModel page, java.lang.String position, CatalogVersionModel catalogVersion)
Find content slot relations by page, position and catalog versions.- Specified by:
findContentSlotRelationsByPageAndPositionin interfaceCMSContentSlotDao- Parameters:
page- the pageposition- the positioncatalogVersion- the catalog version- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotRelationsByPageAndPosition
public java.util.List<ContentSlotForPageModel> findContentSlotRelationsByPageAndPosition(AbstractPageModel page, java.lang.String position, java.util.Collection<CatalogVersionModel> catalogVersions)
Find content slot relations by page, position and catalog versions.- Specified by:
findContentSlotRelationsByPageAndPositionin interfaceCMSContentSlotDao- Parameters:
page- the pageposition- the positioncatalogVersions- the catalog versions- Returns:
- the list of found
ContentSlotForPageModelobjects or empty list when not found
-
findContentSlotsForCatalogVersion
public java.util.Collection<ContentSlotModel> findContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)
Description copied from interface:CMSContentSlotDaoFind all content slots that belong to a given catalog version.- Specified by:
findContentSlotsForCatalogVersionin interfaceCMSContentSlotDao- Parameters:
catalogVersion- - the catalog version- Returns:
- collection of content slots; never
null
-
findAllContentSlotForTemplateByContentSlot
public java.util.List<ContentSlotForTemplateModel> findAllContentSlotForTemplateByContentSlot(ContentSlotModel contentSlot, CatalogVersionModel catalogVersion)
Description copied from interface:CMSContentSlotDaoFind the content slot for template relations for the given content slot and catalog version (used for multi-country)- Specified by:
findAllContentSlotForTemplateByContentSlotin interfaceCMSContentSlotDao- Parameters:
contentSlot- the content slotcatalogVersion- the catalog version- Returns:
- the list of
ContentSlotForTemplateModelobjects or empty list when none found
-
findAllMultiCountryContentSlotsByOriginalSlots
public java.util.List<ContentSlotModel> findAllMultiCountryContentSlotsByOriginalSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions)
Description copied from interface:CMSContentSlotDaoFind the content slots and their catalog hierarchy for the given content slots and catalog versions (used for multi-country)- Specified by:
findAllMultiCountryContentSlotsByOriginalSlotsin interfaceCMSContentSlotDao- Parameters:
contentSlots- the content slotscatalogVersions- the catalog versions- Returns:
- the list of
ContentSlotModelobjects or empty list when none found
-
-