Interface CustomizedBulkUpdateRepository<D extends com.broadleafcommerce.data.tracking.core.Identifiable>
- All Superinterfaces:
com.broadleafcommerce.common.extension.DomainTypeAware
- All Known Subinterfaces:
BulkUpdateRepository<D>,JpaBulkUpdateRepository<D>
- All Known Implementing Classes:
JpaCustomizedBulkUpdateRepository
public interface CustomizedBulkUpdateRepository<D extends com.broadleafcommerce.data.tracking.core.Identifiable>
extends com.broadleafcommerce.common.extension.DomainTypeAware
Additional functionality necessary for a
BulkUpdateRepository.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptioninitializeCreateSandboxNotificationState(String bulkUpdateId) Atomically initializes theNotificationStateforCreateSandboxRequestProducer.TYPEon the given bulk update if it is found to have aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.initializeDeleteSandboxNotificationState(String bulkUpdateId) Atomically initializes theNotificationStateforDeleteSandboxRequestProducer.TYPEon the given bulk update if it is found to have aBulkUpdate.statusofBulkUpdateStatus.ERROR.setContainedErrors(D bulkUpdate) Atomically finds and updates the given bulk update: finds the bulk update with the ID matching the givenbulkUpdate, sets the bulk update'sBulkUpdate.errorsto the errors contained within the givenbulkUpdate, setsBulkUpdate.statustoBulkUpdateStatus.ERROR, and renewsBulkUpdate.lastUpdated.setFinishedStatus(String bulkUpdateId) Atomically sets theBulkUpdate.statustoBulkUpdateStatus.FINISHEDand renewsBulkUpdate.lastUpdatedif the bulk update is found and has aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.setNumberOfRecordsProcessed(String bulkUpdateId, long numberOfRecordsProcessed) Atomically sets theBulkUpdate.numberOfRecordsProcessedto the given value and renewsBulkUpdate.lastUpdatedif the bulk update is found and has aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.setProcessingStatus(String bulkUpdateId) Atomically updateBulkUpdate.statustoBulkUpdateStatus.PROCESSINGand renewBulkUpdate.lastUpdatedif the currentBulkUpdate.statusisBulkUpdateStatus.REQUESTED.Methods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainType
-
Method Details
-
setProcessingStatus
Atomically updateBulkUpdate.statustoBulkUpdateStatus.PROCESSINGand renewBulkUpdate.lastUpdatedif the currentBulkUpdate.statusisBulkUpdateStatus.REQUESTED.- Parameters:
bulkUpdateId- the ID of the bulk update to modify- Returns:
- the updated
BulkUpdateif found and updated,nullotherwise
-
setContainedErrors
Atomically finds and updates the given bulk update: finds the bulk update with the ID matching the givenbulkUpdate, sets the bulk update'sBulkUpdate.errorsto the errors contained within the givenbulkUpdate, setsBulkUpdate.statustoBulkUpdateStatus.ERROR, and renewsBulkUpdate.lastUpdated. No other values frombulkUpdateare applied.The change is applied only if the bulk update is found to have a
BulkUpdate.statusofBulkUpdateStatus.REQUESTEDorBulkUpdateStatus.PROCESSING.- Parameters:
bulkUpdate- a bulk update object containing the errors to set- Returns:
- the updated bulk update if found and updated,
nullotherwise
-
setNumberOfRecordsProcessed
Atomically sets theBulkUpdate.numberOfRecordsProcessedto the given value and renewsBulkUpdate.lastUpdatedif the bulk update is found and has aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.- Parameters:
bulkUpdateId- the ID of the bulk update to modifynumberOfRecordsProcessed- the new value to set forBulkUpdate.numberOfRecordsProcessed- Returns:
- the updated
BulkUpdateif found and updated,nullotherwise
-
setFinishedStatus
Atomically sets theBulkUpdate.statustoBulkUpdateStatus.FINISHEDand renewsBulkUpdate.lastUpdatedif the bulk update is found and has aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.- Parameters:
bulkUpdateId- the ID of the bulk update to modify- Returns:
- the updated
BulkUpdateif found and updated,nullotherwise
-
initializeCreateSandboxNotificationState
Atomically initializes theNotificationStateforCreateSandboxRequestProducer.TYPEon the given bulk update if it is found to have aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.- Parameters:
bulkUpdateId- the ID of the bulk update to modify- Returns:
- the updated
BulkUpdateif found and updated,nullotherwise
-
initializeDeleteSandboxNotificationState
Atomically initializes theNotificationStateforDeleteSandboxRequestProducer.TYPEon the given bulk update if it is found to have aBulkUpdate.statusofBulkUpdateStatus.ERROR.- Parameters:
bulkUpdateId- the ID of the bulk update to modify- Returns:
- the updated
BulkUpdateif found and updated,nullotherwise
-