Class DefaultCMSWorkflowDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
-
- de.hybris.platform.cms2.servicelayer.daos.impl.AbstractCMSItemDao
-
- de.hybris.platform.cms2.servicelayer.daos.impl.DefaultCMSWorkflowDao
-
- All Implemented Interfaces:
CMSWorkflowDao,Dao
public class DefaultCMSWorkflowDao extends AbstractCMSItemDao implements CMSWorkflowDao
Default implementation ofCMSWorkflowDaointerface.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSWorkflowDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringbuildFindWorkflowsByAttachedItemsQuery(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses, java.util.Map<java.lang.String,java.lang.Object> queryParameters)Builds the query string to search for workflows containing the given CMS items and matching the provided workflow statuses.java.util.List<WorkflowModel>findAllWorkflowsByAttachedItems(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses)This method finds all theWorkflowModel, with the specified workflow statuses, to which the given items are attached to.java.util.Optional<WorkflowModel>findWorkflowForCode(java.lang.String code)This method returns theWorkflowModelfor the provided code.SearchResult<WorkflowModel>findWorkflowsByAttachedItems(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses, PageableData pageableData)This is the paginated version ofCMSWorkflowDao.findAllWorkflowsByAttachedItems(List, Set)-
Methods inherited from class de.hybris.platform.cms2.servicelayer.daos.impl.AbstractCMSItemDao
buildQuery, findSortQuery, getCmsSortQueryDataRegistry, setCmsSortQueryDataRegistry
-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
-
-
-
Method Detail
-
findAllWorkflowsByAttachedItems
public java.util.List<WorkflowModel> findAllWorkflowsByAttachedItems(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses)
Description copied from interface:CMSWorkflowDaoThis method finds all theWorkflowModel, with the specified workflow statuses, to which the given items are attached to. If the items are not attached to any workflow for the given statuses, the list will be empty.- Specified by:
findAllWorkflowsByAttachedItemsin interfaceCMSWorkflowDao- Parameters:
items- - the CMS Items for which to find the workflows they are attached to.statuses- - the workflow statuses used to filter the result- Returns:
- the list of
WorkflowModelto which the given pages are attached to; never null.
-
findWorkflowForCode
public java.util.Optional<WorkflowModel> findWorkflowForCode(java.lang.String code)
Description copied from interface:CMSWorkflowDaoThis method returns theWorkflowModelfor the provided code.- Specified by:
findWorkflowForCodein interfaceCMSWorkflowDao- Parameters:
code- - the code of theWorkflowModel.- Returns:
- the
WorkflowModelto for the provided input code.
-
findWorkflowsByAttachedItems
public SearchResult<WorkflowModel> findWorkflowsByAttachedItems(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses, PageableData pageableData)
Description copied from interface:CMSWorkflowDaoThis is the paginated version ofCMSWorkflowDao.findAllWorkflowsByAttachedItems(List, Set)- Specified by:
findWorkflowsByAttachedItemsin interfaceCMSWorkflowDao- Parameters:
items- - the CMS Items for which to find the workflows they are attached to.statuses- - the workflow statuses used to filter the resultpageableData- - the pagination object used to set the page index and page size- Returns:
- the search result object containing the resulting the list of
WorkflowModelto which the given pages are attached to and the pagination object; never null.
-
buildFindWorkflowsByAttachedItemsQuery
protected java.lang.String buildFindWorkflowsByAttachedItemsQuery(java.util.List<? extends CMSItemModel> items, java.util.Set<CronJobStatus> statuses, java.util.Map<java.lang.String,java.lang.Object> queryParameters)
Builds the query string to search for workflows containing the given CMS items and matching the provided workflow statuses.- Parameters:
items- - the CMS Items for which to find the workflows they are attached to.statuses- - the workflow statuses used to filter the resultqueryParameters- - the query parameter values to be applied to the query- Returns:
- the query string
-
-