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.status
matches one of the givenstatuses
and whoseBulkUpdate.lastUpdated
is before the givencutoff
.findByStatusInAndLastUpdatedBeforeAndTenantId
(List<String> statuses, Instant cutoff, String tenantId) Finds the bulk updates whoseBulkUpdate.status
matches one of the givenstatuses
and whoseBulkUpdate.lastUpdated
is 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.target
andBulkUpdate.applicationId
.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
Methods inherited from interface com.broadleafcommerce.bulk.repository.CustomizedBulkUpdateRepository
initializeCreateSandboxNotificationState, initializeDeleteSandboxNotificationState, setContainedErrors, setFinishedStatus, setNumberOfRecordsProcessed, setProcessingStatus
Methods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainType
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
Methods inherited from interface com.broadleafcommerce.common.extension.data.PagingAndSortingRepository
findAll, findAll
-
Method Details
-
findByStatusInAndLastUpdatedBefore
Finds the bulk updates whoseBulkUpdate.status
matches one of the givenstatuses
and whoseBulkUpdate.lastUpdated
is before the givencutoff
.- Parameters:
statuses
- the results will be filtered to only include those updates whoseBulkUpdate.status
matches one of these valuescutoff
- the results will be filtered to only include those updates whoseBulkUpdate.lastUpdated
is before this value- Returns:
- the bulk updates which have one of the given
statuses
and have aBulkUpdate.lastUpdated
before the givencutoff
-
findByStatusInAndLastUpdatedBeforeAndTenantId
List<D> findByStatusInAndLastUpdatedBeforeAndTenantId(List<String> statuses, Instant cutoff, String tenantId) Finds the bulk updates whoseBulkUpdate.status
matches one of the givenstatuses
and whoseBulkUpdate.lastUpdated
is before the givencutoff
.- Parameters:
statuses
- the results will be filtered to only include those updates whoseBulkUpdate.status
matches one of these valuescutoff
- the results will be filtered to only include those updates whoseBulkUpdate.lastUpdated
is before this valuetenantId
- the tenant id that this bulk update operation was initiated from- Returns:
- the bulk updates which have one of the given
statuses
and have aBulkUpdate.lastUpdated
before the givencutoff
andtenantId
-
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.target
andBulkUpdate.applicationId
.- Parameters:
target
- theBulkUpdate.target
to filter byapplicationId
- theBulkUpdate.applicationId
to filter results by. Note that if this isnull
, only bulk updates withnull
application 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
-