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 Details

    • findByStatusInAndLastUpdatedBefore

      List<D> findByStatusInAndLastUpdatedBefore(List<String> statuses, Instant cutoff)
      Finds the bulk updates whose BulkUpdate.status matches one of the given statuses and whose BulkUpdate.lastUpdated is before the given cutoff.
      Parameters:
      statuses - the results will be filtered to only include those updates whose BulkUpdate.status matches one of these values
      cutoff - the results will be filtered to only include those updates whose BulkUpdate.lastUpdated is before this value
      Returns:
      the bulk updates which have one of the given statuses and have a BulkUpdate.lastUpdated before the given cutoff
    • findByStatusInAndLastUpdatedBeforeAndTenantId

      List<D> findByStatusInAndLastUpdatedBeforeAndTenantId(List<String> statuses, Instant cutoff, String tenantId)
      Finds the bulk updates whose BulkUpdate.status matches one of the given statuses and whose BulkUpdate.lastUpdated is before the given cutoff.
      Parameters:
      statuses - the results will be filtered to only include those updates whose BulkUpdate.status matches one of these values
      cutoff - the results will be filtered to only include those updates whose BulkUpdate.lastUpdated is before this value
      tenantId - the tenant id that this bulk update operation was initiated from
      Returns:
      the bulk updates which have one of the given statuses and have a BulkUpdate.lastUpdated before the given cutoff and tenantId
    • 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 given BulkUpdate.target and BulkUpdate.applicationId.
      Parameters:
      target - the BulkUpdate.target to filter by
      applicationId - the BulkUpdate.applicationId to filter results by. Note that if this is null, only bulk updates with null 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