Class CleanupSavedValuesStrategy
java.lang.Object
de.hybris.platform.jobs.maintenance.impl.CleanupSavedValuesStrategy
- All Implemented Interfaces:
MaintenanceCleanupStrategy<ItemModel,CronJobModel>
public class CleanupSavedValuesStrategy
extends Object
implements MaintenanceCleanupStrategy<ItemModel,CronJobModel>
This implementation if the
MaintenanceCleanupStrategy removes all old SavedValuesModels 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 -
Method Summary
Modifier and TypeMethodDescriptionImplement and return aFlexibleSearchQueryobject here which searches for the items to be removed.voidBased 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)
-
Constructor Details
-
CleanupSavedValuesStrategy
public CleanupSavedValuesStrategy()
-
-
Method Details
-
createFetchQuery
Description copied from interface:MaintenanceCleanupStrategyImplement and return aFlexibleSearchQueryobject here which searches for the items to be removed.- Specified by:
createFetchQueryin interfaceMaintenanceCleanupStrategy<ItemModel,CronJobModel>
-
process
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
-
setModelService
-