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 ofCMSContentSlotDao
interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CATALOG_VERSIONS_QUERY_PARAM
protected static java.lang.String
QUERY_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:
findPagesByContentSlot
in interfaceCMSContentSlotDao
- Parameters:
contentSlot
- theContentSlotModel
object for which pages will be obtained.- Returns:
- the collection of
AbstractPageModel
objects related toContentSlotModel
object 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:
findAllContentSlotRelationsByPageTemplate
in interfaceCMSContentSlotDao
- Parameters:
template
- the page templatecatalogVersion
- the catalog version- Returns:
- the list of found
ContentSlotForTemplateModel
objects 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:
findContentSlotRelationsByPageTemplateAndContentSlot
in 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:
findAllContentSlotRelationsByPageTemplate
in interfaceCMSContentSlotDao
- Parameters:
template
- the page template- Returns:
- the list of found
ContentSlotForTemplateModel
objects 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:
findContentSlotRelationsByPageTemplateAndPosition
in interfaceCMSContentSlotDao
- Parameters:
template
- the page templateposition
- the positioncatalogVersions
- the catalog versions- Returns:
- the list of found
ContentSlotForTemplateModel
objects 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:
findAllContentSlotRelationsByPage
in interfaceCMSContentSlotDao
- Parameters:
page
- the pagecatalogVersion
- the catalog version- Returns:
- the list of found
ContentSlotForPageModel
objects 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:
findAllContentSlotRelationsByPageUid
in interfaceCMSContentSlotDao
- Parameters:
pageUid
- the page uidcatalogVersion
- the catalog versions- Returns:
- the list of found
ContentSlotForPageModel
objects or empty list when not found
-
findAllContentSlotRelationsByPage
public java.util.List<ContentSlotForPageModel> findAllContentSlotRelationsByPage(AbstractPageModel page)
Find all content slot relations by page.- Specified by:
findAllContentSlotRelationsByPage
in interfaceCMSContentSlotDao
- Parameters:
page
- the page- Returns:
- the list of found
ContentSlotForPageModel
objects 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:
findAllContentSlotRelationsByContentSlot
in interfaceCMSContentSlotDao
- Parameters:
contentSlot
- the content slotcatalogVersion
- the catalog version- Returns:
- the list of found
ContentSlotForPageModel
objects 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:
findAllContentSlotRelationsByContentSlot
in interfaceCMSContentSlotDao
- Parameters:
contentSlot
- the content slot- Returns:
- the collection of found
CMSRelationModel
objects 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:
findOnlyContentSlotRelationsByContentSlot
in interfaceCMSContentSlotDao
- Parameters:
contentSlot
- the content slot- Returns:
- the collection of found
CMSRelationModel
objects 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:
findContentSlotsByIdAndCatalogVersions
in interfaceCMSContentSlotDao
- Parameters:
id
- the id ofContentSlotModel
object to findcatalogVersions
- the catalog versions- Returns:
- the list of found
ContentSlotModel
objects or empty list when not found
-
findContentSlotsById
public java.util.List<ContentSlotModel> findContentSlotsById(java.lang.String id)
Find content slots by id.- Specified by:
findContentSlotsById
in interfaceCMSContentSlotDao
- Parameters:
id
- the id ofContentSlotModel
object to find- Returns:
- the list of found
ContentSlotModel
objects 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:
findContentSlotRelationsByPageAndContentSlot
in interfaceCMSContentSlotDao
- Parameters:
page
- the pagecontentSlot
- the content slotcatalogVersion
- the catalog version- Returns:
- the list of found
ContentSlotForPageModel
objects 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:
findContentSlotRelationsByPageAndContentSlot
in interfaceCMSContentSlotDao
- Parameters:
page
- the pagecontentSlot
- the content slotcatalogVersions
- the catalog versions- Returns:
- the list of found
ContentSlotForPageModel
objects 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:
findContentSlotRelationsByPageAndPosition
in interfaceCMSContentSlotDao
- Parameters:
page
- the pageposition
- the positioncatalogVersion
- the catalog version- Returns:
- the list of found
ContentSlotForPageModel
objects 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:
findContentSlotRelationsByPageAndPosition
in interfaceCMSContentSlotDao
- Parameters:
page
- the pageposition
- the positioncatalogVersions
- the catalog versions- Returns:
- the list of found
ContentSlotForPageModel
objects or empty list when not found
-
findContentSlotsForCatalogVersion
public java.util.Collection<ContentSlotModel> findContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)
Description copied from interface:CMSContentSlotDao
Find all content slots that belong to a given catalog version.- Specified by:
findContentSlotsForCatalogVersion
in 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:CMSContentSlotDao
Find the content slot for template relations for the given content slot and catalog version (used for multi-country)- Specified by:
findAllContentSlotForTemplateByContentSlot
in interfaceCMSContentSlotDao
- Parameters:
contentSlot
- the content slotcatalogVersion
- the catalog version- Returns:
- the list of
ContentSlotForTemplateModel
objects 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:CMSContentSlotDao
Find the content slots and their catalog hierarchy for the given content slots and catalog versions (used for multi-country)- Specified by:
findAllMultiCountryContentSlotsByOriginalSlots
in interfaceCMSContentSlotDao
- Parameters:
contentSlots
- the content slotscatalogVersions
- the catalog versions- Returns:
- the list of
ContentSlotModel
objects or empty list when none found
-
-