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.DomainTypeAwareAdditional functionality necessary for aBulkUpdateRepository.- Author:
 - Samarth Dhruva (samarthd)
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DinitializeCreateSandboxNotificationState(String bulkUpdateId)Atomically initializes theNotificationStateforCreateSandboxRequestProducer.TYPEon the given bulk update if it is found to have aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.DinitializeDeleteSandboxNotificationState(String bulkUpdateId)Atomically initializes theNotificationStateforDeleteSandboxRequestProducer.TYPEon the given bulk update if it is found to have aBulkUpdate.statusofBulkUpdateStatus.ERROR.DsetContainedErrors(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.DsetFinishedStatus(String bulkUpdateId)Atomically sets theBulkUpdate.statustoBulkUpdateStatus.FINISHEDand renewsBulkUpdate.lastUpdatedif the bulk update is found and has aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.DsetNumberOfRecordsProcessed(String bulkUpdateId, long numberOfRecordsProcessed)Atomically sets theBulkUpdate.numberOfRecordsProcessedto the given value and renewsBulkUpdate.lastUpdatedif the bulk update is found and has aBulkUpdate.statusofBulkUpdateStatus.PROCESSING.DsetProcessingStatus(String bulkUpdateId)Atomically updateBulkUpdate.statustoBulkUpdateStatus.PROCESSINGand renewBulkUpdate.lastUpdatedif the currentBulkUpdate.statusisBulkUpdateStatus.REQUESTED. 
 - 
 
- 
- 
Method Detail
- 
setProcessingStatus
@Nullable D setProcessingStatus(String bulkUpdateId)
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
@Nullable D 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. 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
@Nullable D 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.- 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
@Nullable D setFinishedStatus(String bulkUpdateId)
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
@Nullable D initializeCreateSandboxNotificationState(String bulkUpdateId)
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
@Nullable D initializeDeleteSandboxNotificationState(String bulkUpdateId)
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 
 
 - 
 
 -