Interface ImportRepository<D extends com.broadleafcommerce.data.tracking.core.Identifiable>
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<D,
,String> CustomizedImportRepository<D>
,com.broadleafcommerce.common.extension.DomainTypeAware
,com.broadleafcommerce.data.tracking.core.service.MappableRsqlFilterExecutor<D>
,com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
,org.springframework.data.repository.PagingAndSortingRepository<D,
,String> org.springframework.data.repository.Repository<D,
String>
- All Known Subinterfaces:
JpaImportRepository<D>
@NoRepositoryBean
public interface ImportRepository<D extends com.broadleafcommerce.data.tracking.core.Identifiable>
extends org.springframework.data.repository.PagingAndSortingRepository<D,String>, com.broadleafcommerce.data.tracking.core.service.MappableRsqlFilterExecutor<D>, CustomizedImportRepository<D>, com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptiondeleteByIdIn
(List<String> importIds) Delete the imports that match the corresponding idsfindAllByLastUpdatedBefore
(Instant beforeDate) Read all imports whoseImport.getLastUpdated()
occurs before the provided timeorg.springframework.data.domain.Page<D>
findByAuthorAndApplicationIdAndTenantId
(String author, String applicationId, String tenantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable) Deprecated.findByStatusAndLastUpdatedBefore
(String status, Instant cutoff) Finds the imports whoseImport.status
equals the givenstatus
and whoseImport.lastUpdated
is before the givencutoff
.findByStatusAndLastUpdatedBeforeAndTenantId
(String status, Instant cutoff, String tenantId) Finds the imports whoseImport.status
equals the givenstatus
and whoseImport.lastUpdated
is before the givencutoff
, within the specified tenant.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.dataimport.repository.CustomizedImportRepository
findByAuthor, findById, incrementSuccessAndErrorCounts, initializeDeleteSandboxNotificationState, initializeForSandboxCreation, markCancelled, markCompleted, markErrored, markHanging, markProcessing, readAll, readByStatus, readByStatusNot, setTotalItems
Methods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainType
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.MappableRsqlFilterExecutor
exists, findAll, findAll, findAll, findAll
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll, findAll
-
Method Details
-
findByStatusAndLastUpdatedBefore
Finds the imports whoseImport.status
equals the givenstatus
and whoseImport.lastUpdated
is before the givencutoff
.- Parameters:
status
- the results will be filtered to only include those imports whoseImport.status
equals this valuecutoff
- the results will be filtered to only include those imports whoseImport.lastUpdated
is before this value- Returns:
- the imports which have one of the given
statuses
and have aImport.lastUpdated
before the givencutoff
-
findByStatusAndLastUpdatedBeforeAndTenantId
Finds the imports whoseImport.status
equals the givenstatus
and whoseImport.lastUpdated
is before the givencutoff
, within the specified tenant.- Parameters:
status
- the results will be filtered to only include those imports whoseImport.status
equals this valuecutoff
- the results will be filtered to only include those imports whoseImport.lastUpdated
is before this valuetenantId
- the tenant id that this import was initiated from- Returns:
- the imports which have one of the given
statuses
and have aImport.lastUpdated
before the givencutoff
-
findByAuthorAndApplicationIdAndTenantId
@Deprecated org.springframework.data.domain.Page<D> findByAuthorAndApplicationIdAndTenantId(String author, @Nullable String applicationId, String tenantId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable) Deprecated.since 1.3, replaced byCustomizedImportRepository.findByAuthor(String, Node, Pageable, ContextInfo)
Finds the imports with the givenImport.author
, andImport.applicationId
.- Parameters:
author
- theImport.author
to filter results byapplicationId
- theImport.applicationId
to filter results by. Note that if this isnull
, only imports with null application IDs will be returned.tenantId
- theImport.tenantId
to filter results byfilters
- additional filters to apply, must not be nullpageable
- information about which page of results to return from the database- Returns:
- the imports matching the given criteria
-
findAllByLastUpdatedBefore
Read all imports whoseImport.getLastUpdated()
occurs before the provided time- Parameters:
beforeDate
- the time for which to get all imports older than- Returns:
- all imports whose
Import.getLastUpdated()
occurs before the provided time
-
deleteByIdIn
Delete the imports that match the corresponding ids- Parameters:
importIds
- the list of import ids to delete against- Returns:
- the number of imports deleted
-
CustomizedImportRepository.findByAuthor(String, Node, Pageable, ContextInfo)