Interface BulkUpdateRepository<D extends com.broadleafcommerce.data.tracking.core.Identifiable>
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<D,,String> CustomizedBulkUpdateRepository<D>,com.broadleafcommerce.common.extension.DomainTypeAware,com.broadleafcommerce.common.messaging.notification.NotificationStateRepository,com.broadleafcommerce.common.extension.data.PagingAndSortingRepository<D,,String> org.springframework.data.repository.Repository<D,String>
- All Known Subinterfaces:
JpaBulkUpdateRepository<D>
@NoRepositoryBean
public interface BulkUpdateRepository<D extends com.broadleafcommerce.data.tracking.core.Identifiable>
extends com.broadleafcommerce.common.extension.data.PagingAndSortingRepository<D,String>, CustomizedBulkUpdateRepository<D>, com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
Repository for persistent counter-parts of
BulkUpdate- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionfindByStatusInAndLastUpdatedBefore(List<String> statuses, Instant cutoff) Finds the bulk updates whoseBulkUpdate.statusmatches one of the givenstatusesand whoseBulkUpdate.lastUpdatedis before the givencutoff.findByStatusInAndLastUpdatedBeforeAndTenantId(List<String> statuses, Instant cutoff, String tenantId) Finds the bulk updates whoseBulkUpdate.statusmatches one of the givenstatusesand whoseBulkUpdate.lastUpdatedis before the givencutoff.org.springframework.data.domain.Page<D>findByTargetAndApplicationId(String target, String applicationId, org.springframework.data.domain.Pageable pageable) Reads the bulk updates with the givenBulkUpdate.targetandBulkUpdate.applicationId.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAllMethods inherited from interface com.broadleafcommerce.bulk.repository.CustomizedBulkUpdateRepository
initializeCreateSandboxNotificationState, initializeDeleteSandboxNotificationState, setContainedErrors, setFinishedStatus, setNumberOfRecordsProcessed, setProcessingStatusMethods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainTypeMethods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledgedMethods inherited from interface com.broadleafcommerce.common.extension.data.PagingAndSortingRepository
findAll, findAll
-
Method Details
-
findByStatusInAndLastUpdatedBefore
Finds the bulk updates whoseBulkUpdate.statusmatches one of the givenstatusesand whoseBulkUpdate.lastUpdatedis before the givencutoff.- Parameters:
statuses- the results will be filtered to only include those updates whoseBulkUpdate.statusmatches one of these valuescutoff- the results will be filtered to only include those updates whoseBulkUpdate.lastUpdatedis before this value- Returns:
- the bulk updates which have one of the given
statusesand have aBulkUpdate.lastUpdatedbefore the givencutoff
-
findByStatusInAndLastUpdatedBeforeAndTenantId
List<D> findByStatusInAndLastUpdatedBeforeAndTenantId(List<String> statuses, Instant cutoff, String tenantId) Finds the bulk updates whoseBulkUpdate.statusmatches one of the givenstatusesand whoseBulkUpdate.lastUpdatedis before the givencutoff.- Parameters:
statuses- the results will be filtered to only include those updates whoseBulkUpdate.statusmatches one of these valuescutoff- the results will be filtered to only include those updates whoseBulkUpdate.lastUpdatedis before this valuetenantId- the tenant id that this bulk update operation was initiated from- Returns:
- the bulk updates which have one of the given
statusesand have aBulkUpdate.lastUpdatedbefore the givencutoffandtenantId
-
findByTargetAndApplicationId
org.springframework.data.domain.Page<D> findByTargetAndApplicationId(@NonNull String target, @Nullable String applicationId, @NonNull org.springframework.data.domain.Pageable pageable) Reads the bulk updates with the givenBulkUpdate.targetandBulkUpdate.applicationId.- Parameters:
target- theBulkUpdate.targetto filter byapplicationId- theBulkUpdate.applicationIdto filter results by. Note that if this isnull, only bulk updates withnullapplication IDs will be returned.pageable- information about which page of results to return from the database- Returns:
- the bulk updates with the given
BulkUpdate.target
-