Class CleanupSavedValuesStrategy
- java.lang.Object
-
- de.hybris.platform.jobs.maintenance.impl.CleanupSavedValuesStrategy
-
- All Implemented Interfaces:
MaintenanceCleanupStrategy<ItemModel,CronJobModel>
public class CleanupSavedValuesStrategy extends java.lang.Object implements MaintenanceCleanupStrategy<ItemModel,CronJobModel>
This implementation if theMaintenanceCleanupStrategyremoves all oldSavedValuesModels for any ItemModel which are *over* the given threshold. If a model has 30 saved values and the threshold is set to 20 - the twentieth oldest entries are removed.
-
-
Constructor Summary
Constructors Constructor Description CleanupSavedValuesStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlexibleSearchQuerycreateFetchQuery(CronJobModel cjm)Implement and return aFlexibleSearchQueryobject here which searches for the items to be removed.voidprocess(java.util.List<ItemModel> elements)Based on the givenFlexibleSearchQueryofMaintenanceCleanupStrategy.createFetchQuery(CronJobModel)the job pages through the results and with each sublist (contains the concrete instances of the items) of the large result this method is called.voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)voidsetModelService(ModelService modelService)
-
-
-
Method Detail
-
createFetchQuery
public FlexibleSearchQuery createFetchQuery(CronJobModel cjm)
Description copied from interface:MaintenanceCleanupStrategyImplement and return aFlexibleSearchQueryobject here which searches for the items to be removed.- Specified by:
createFetchQueryin interfaceMaintenanceCleanupStrategy<ItemModel,CronJobModel>
-
process
public void process(java.util.List<ItemModel> elements)
Description copied from interface:MaintenanceCleanupStrategyBased on the givenFlexibleSearchQueryofMaintenanceCleanupStrategy.createFetchQuery(CronJobModel)the job pages through the results and with each sublist (contains the concrete instances of the items) of the large result this method is called. Implement here the remove logic for each item element.- Specified by:
processin interfaceMaintenanceCleanupStrategy<ItemModel,CronJobModel>
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
setModelService
public void setModelService(ModelService modelService)
-
-