Class DefaultCMSVersionDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
-
- de.hybris.platform.cms2.servicelayer.daos.impl.DefaultCMSVersionDao
-
- All Implemented Interfaces:
CMSVersionDao
,Dao
public class DefaultCMSVersionDao extends AbstractItemDao implements CMSVersionDao
Default implementation ofCMSVersionDao
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSVersionDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CMSVersionModel>
findAllByItemUidAndItemCatalogVersion(java.lang.String itemUid, CatalogVersionModel itemCatalogVersion)
Finds allCMSVersionModel
for a givenCMSItemModel
java.util.Optional<CMSVersionModel>
findByItemUidAndLabel(java.lang.String itemUid, java.lang.String label, CatalogVersionModel itemCatalogVersion)
Finds theCMSVersionModel
for an item identified by its itemUid containing the given labeljava.util.Optional<CMSVersionModel>
findByUid(java.lang.String uid)
Finds theCMSVersionModel
uniquely identified by its uidjava.util.Optional<AbstractPageModel>
findPageVersionedByTransactionId(java.lang.String transactionId)
Finds the page associated to a transaction ID.-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
-
-
-
Method Detail
-
findByUid
public java.util.Optional<CMSVersionModel> findByUid(java.lang.String uid)
Description copied from interface:CMSVersionDao
Finds theCMSVersionModel
uniquely identified by its uid- Specified by:
findByUid
in interfaceCMSVersionDao
- Parameters:
uid
- theCMSVersionModel
uid- Returns:
- the
CMSVersionModel
that matches the criteria or empty if not found
-
findByItemUidAndLabel
public java.util.Optional<CMSVersionModel> findByItemUidAndLabel(java.lang.String itemUid, java.lang.String label, CatalogVersionModel itemCatalogVersion)
Description copied from interface:CMSVersionDao
Finds theCMSVersionModel
for an item identified by its itemUid containing the given label- Specified by:
findByItemUidAndLabel
in interfaceCMSVersionDao
- Parameters:
itemUid
- the uid of the item modellabel
- the label of the cms version modelitemCatalogVersion
- theCatalogVersionModel
to which the item belongs to- Returns:
- the
CMSVersionModel
that matches the criteria or empty if not found
-
findAllByItemUidAndItemCatalogVersion
public java.util.List<CMSVersionModel> findAllByItemUidAndItemCatalogVersion(java.lang.String itemUid, CatalogVersionModel itemCatalogVersion)
Description copied from interface:CMSVersionDao
Finds allCMSVersionModel
for a givenCMSItemModel
- Specified by:
findAllByItemUidAndItemCatalogVersion
in interfaceCMSVersionDao
- Parameters:
itemUid
- the uid of theCMSItemModel
itemCatalogVersion
- theCatalogVersionModel
to which theCMSItemModel
belongs.- Returns:
- A List of
CMSVersionModel
-
findPageVersionedByTransactionId
public java.util.Optional<AbstractPageModel> findPageVersionedByTransactionId(java.lang.String transactionId)
Description copied from interface:CMSVersionDao
Finds the page associated to a transaction ID.When a page is versioned, the page and all its associated items are versioned. Each of them has a different version, but they all share the same transactionId; only one page can be associated to a transaction ID.
- Specified by:
findPageVersionedByTransactionId
in interfaceCMSVersionDao
- Parameters:
transactionId
- The ID of the transaction for which to find its associated page.- Returns:
- an
Optional
containing the page associated to the given transactionId; can beOptional#empty()
when the transactionId identifies a transaction where a page was not versioned.
-
-