Interface CustomizedImportBatchItemCompletionRepository<D>
- All Superinterfaces:
com.broadleafcommerce.common.extension.DomainTypeAware
- All Known Subinterfaces:
ImportBatchItemCompletionRepository<D>,JpaImportBatchItemCompletionRepository<D>
- All Known Implementing Classes:
JpaCustomizedImportBatchItemCompletionRepository
public interface CustomizedImportBatchItemCompletionRepository<D>
extends com.broadleafcommerce.common.extension.DomainTypeAware
- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptiondeleteAllByIdInBatch(List<String> ids) Delete the batch item completions that match the corresponding ids using a single query.findAllBatchItemCompletionIdsByImportIds(List<String> importIds, int batchSize) Read a list of batch item completion ids for the provided import ids.findByCorrelationIdInOrTopLevelParentIdInOrderedByLineNumber(String importId, Collection<String> correlationIdIn, Collection<String> topLevelParentCorrelationIdIn) For the givenimportId, returns all batch item completion records which either have aBatchItemCompletion.correlationIdthat matches one of the givencorrelationIdInvalues or aBatchItemCompletion.topLevelParentCorrelationIdthat matches one of the giventopLevelParentCorrelationIdInvalues.initializeForIndexing(String batchItemCompletionId, com.broadleafcommerce.data.tracking.core.messaging.search.BatchIndexableType type, List<String> idsToIndex) Deprecated, for removal: This API element is subject to removal in a future version.initializeForIndexing(String batchItemCompletionId, String batchIndexableType, List<String> idsToIndex) If the import is found, atomically initializes theNotificationStateforBatchIndexRequestProducer.TYPE, and renewsImport.getLastUpdated().Methods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainType
-
Method Details
-
findByCorrelationIdInOrTopLevelParentIdInOrderedByLineNumber
Stream<D> findByCorrelationIdInOrTopLevelParentIdInOrderedByLineNumber(String importId, @Nullable Collection<String> correlationIdIn, @Nullable Collection<String> topLevelParentCorrelationIdIn) For the givenimportId, returns all batch item completion records which either have aBatchItemCompletion.correlationIdthat matches one of the givencorrelationIdInvalues or aBatchItemCompletion.topLevelParentCorrelationIdthat matches one of the giventopLevelParentCorrelationIdInvalues.Results must be sorted by
BatchItemCompletion.lineNumberin ascending order.- Parameters:
importId- the ID of the import which results should be filtered bycorrelationIdIn- a list of correlation IDs that are valid to return in the result (optional)topLevelParentCorrelationIdIn- a list of top level parent correlation IDs that are valid to return in the result (optional)- Returns:
- all records which either have a
BatchItemCompletion.correlationIdthat matches one of the givencorrelationIdInvalues or aBatchItemCompletion.topLevelParentCorrelationIdthat matches one of the giventopLevelParentCorrelationIdInvalues, sorted byBatchItemCompletion.lineNumberin ascending order
-
initializeForIndexing
@Deprecated(since="1.8.2", forRemoval=true) @Nullable D initializeForIndexing(String batchItemCompletionId, com.broadleafcommerce.data.tracking.core.messaging.search.BatchIndexableType type, List<String> idsToIndex) Deprecated, for removal: This API element is subject to removal in a future version.replaced byinitializeForIndexing(String, String, List)If the import is found, atomically initializes theNotificationStateforBatchIndexRequestProducer.TYPE, and renewsImport.getLastUpdated().- Parameters:
batchItemCompletionId- the ID of the BatchItemCompletion instance to modifytype- The indexable type for the importidsToIndex- The repository entity ids to index- Returns:
- the updated
Importif found and updated,nullotherwise
-
initializeForIndexing
@Nullable D initializeForIndexing(String batchItemCompletionId, String batchIndexableType, List<String> idsToIndex) If the import is found, atomically initializes theNotificationStateforBatchIndexRequestProducer.TYPE, and renewsImport.getLastUpdated().- Parameters:
batchItemCompletionId- the ID of the BatchItemCompletion instance to modifybatchIndexableType- The indexable type for the importidsToIndex- The repository entity ids to index- Returns:
- the updated
Importif found and updated,nullotherwise
-
findAllBatchItemCompletionIdsByImportIds
Read a list of batch item completion ids for the provided import ids.- Parameters:
importIds- the import ids to match batch item completions againstbatchSize- the batch size for results returned- Returns:
- a list of batch item completion ids for the provided import id
-
deleteAllByIdInBatch
Delete the batch item completions that match the corresponding ids using a single query.- Parameters:
ids- the list of ids to delete- Returns:
- the number of batch item completions deleted
-
initializeForIndexing(String, String, List)