Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * #%L
  * BroadleafCommerce Framework
  * %%
  * Copyright (C) 2009 - 2014 Broadleaf Commerce
  * %%
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package org.broadleafcommerce.core.util.service;
Service capable of deleting old or defunct entities from the persistence layer (e.g. Carts and anonymous Customers)

Author(s):
Jeff Fischer
public interface ResourcePurgeService {

    
Execute a purge of carts from the persistence layer based on the configuration parameters. The default implementation is capable of looking at any combination of name, status and creation date. Take a look at org.broadleafcommerce.core.order.service.OrderService.findCarts(java.lang.String[],org.broadleafcommerce.core.order.service.type.OrderStatus[],java.util.Date,java.lang.Boolean,int,int) for more info on the default behavior.

Parameters:
config Map of params used to drive the selection of carts to purge
    void purgeCarts(Map<StringStringconfig);
    void purgeCustomers(final Map<StringStringconfig);

    
Override the default page size (set by property streaming.transaction.item.page.size) by which entities will be purged. Candidates are retrieved in pages and deleted a page at a time to minimize transaction times.

Returns:
the page size
    Integer getPageSize();

    
Override the default page size (set by property streaming.transaction.item.page.size) by which entities will be purged. Candidates are retrieved in pages and deleted a page at a time to minimize transaction times.

Parameters:
pageSize the page size
    void setPageSize(Integer pageSize);
New to GrepCode? Check out our FAQ X