Class DefaultBulkOperationItemService<P extends BulkOperationItem>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService<P>
com.broadleafcommerce.catalog.service.bulkoperation.DefaultBulkOperationItemService<P>
- All Implemented Interfaces:
BulkOperationItemService<P>
,com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService<P>
public class DefaultBulkOperationItemService<P extends BulkOperationItem>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService<P>
implements BulkOperationItemService<P>
-
Constructor Summary
ConstructorDescriptionDefaultBulkOperationItemService
(BulkOperationItemRepository<com.broadleafcommerce.data.tracking.core.Identifiable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser) -
Method Summary
Modifier and TypeMethodDescriptionint
deleteAllByIdIn
(@NonNull Collection<String> ids) Deletes all theBulkOperationItems
matching the given IDs.protected BulkOperationItemRepository<com.broadleafcommerce.data.tracking.core.Identifiable>
org.springframework.data.domain.Page<P>
readAllByBulkOperationId
(String bulkOperationId, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable page) Reads all bulk operation items for the given bulk operation context ID.readAllIdsByBulkOperationIdIn
(@NonNull Collection<String> bulkOperationIds, int batchSize) Retrieves a batch of IDs forBulkOperationItems
that belong to the givenBulkOperations
.Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlMappableCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAll
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService
convertFromPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, readAll, readAll, readAll, readAllByIds, readById, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByIds, readById, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService
readAll, readAll, readAll, readAll
-
Constructor Details
-
DefaultBulkOperationItemService
public DefaultBulkOperationItemService(BulkOperationItemRepository<com.broadleafcommerce.data.tracking.core.Identifiable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
-
-
Method Details
-
readAllByBulkOperationId
public org.springframework.data.domain.Page<P> readAllByBulkOperationId(String bulkOperationId, @NonNull @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull @NonNull org.springframework.data.domain.Pageable page) Description copied from interface:BulkOperationItemService
Reads all bulk operation items for the given bulk operation context ID.- Specified by:
readAllByBulkOperationId
in interfaceBulkOperationItemService<P extends BulkOperationItem>
- Parameters:
bulkOperationId
- the context ID of the bulk operationfilters
- RSQL filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the database- Returns:
- all bulk operation items for the given bulk operation context ID
-
readAllIdsByBulkOperationIdIn
public List<String> readAllIdsByBulkOperationIdIn(@NonNull @NonNull Collection<String> bulkOperationIds, int batchSize) Description copied from interface:BulkOperationItemService
Retrieves a batch of IDs forBulkOperationItems
that belong to the givenBulkOperations
.- Specified by:
readAllIdsByBulkOperationIdIn
in interfaceBulkOperationItemService<P extends BulkOperationItem>
- Parameters:
bulkOperationIds
- IDs of the parentBulkOperations
.batchSize
- Size of the batch to read.- Returns:
- A batch of IDs for
BulkOperationItems
that belong to the givenBulkOperations
.
-
deleteAllByIdIn
Description copied from interface:BulkOperationItemService
Deletes all theBulkOperationItems
matching the given IDs.- Specified by:
deleteAllByIdIn
in interfaceBulkOperationItemService<P extends BulkOperationItem>
- Parameters:
ids
- IDs of theBulkOperationItems
to delete.- Returns:
- The number of items deleted.
-
getRepository
protected BulkOperationItemRepository<com.broadleafcommerce.data.tracking.core.Identifiable> getRepository()- Overrides:
getRepository
in classcom.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P extends BulkOperationItem>
-