Interface InventoryTransactionRepository<T extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
T
-
- All Superinterfaces:
CustomizedInventoryTransactionRepository<T>
,com.broadleafcommerce.common.extension.DomainTypeAware
,com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
,org.springframework.data.repository.Repository<T,
,String> com.broadleafcommerce.data.tracking.core.TrackableRepository<T>
- All Known Subinterfaces:
JpaInventoryTransactionRepository<D>
@NoRepositoryBean
public interface InventoryTransactionRepository<T extends com.broadleafcommerce.data.tracking.core.Trackable>
extends CustomizedInventoryTransactionRepository<T>, com.broadleafcommerce.data.tracking.core.TrackableRepository<T>, com.broadleafcommerce.common.extension.DomainTypeAware
Spring Repository API to store and retrieve individual inventory transactions.
- Author:
- Kelly Tisdell (ktisdell)
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<T>
findByBatchId
(String batchId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a list ofInventoryTransaction
records by a batch ID.org.springframework.data.domain.Page<T>
findByDateCreatedBeforeAndTransactionTypeIn
(Instant maxCreatedDate, Set<String> transactionTypes, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a page of inventory transactions created before a certain date and of certain transaction types.findByReferenceNumberAndTransactionTypeIn
(String referenceNumber, Set<String> transactionTypes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list ofInventoryTransaction
records that have 1 or more transaction types for the same reference number.findByReferenceNumberInAndTransactionTypeIn
(List<String> referenceNumbers, Set<String> transactionTypes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list ofInventoryTransaction
records that have 1 or more transaction types for the given reference numbers.org.springframework.data.domain.Page<T>
findBySkuInventoryId
(String skuInventoryId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Convenience method to retrieve allJpaInventoryTransaction
records for a givenJpaSkuInventory.getContextId()
.findBySkuInventoryIdAndReferenceNumberAndTransactionTypeIn
(String skuInventoryId, String referenceNumber, Set<String> transactionTypes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list ofInventoryTransaction
records that have 1 or more transaction types for the sameSkuInventory.getId()
and reference number.org.springframework.data.domain.Page<T>
findBySkuInventoryIdAndTransactionType
(String skuInventoryId, String transactionType, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns aPage
ofInventoryTransaction
instances by skuInventoryId and transactionType.findByTransactionTypeAndReferenceNumber
(String transactionType, String referenceNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns aList
ofInventoryTransaction
instances by transactionType, and referenceNumber.findByTransactionTypeAndReferenceNumberAndDateProcessedIsNull
(String transactionType, String referenceNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns aList
ofInventoryTransaction
instances by transactionType, and referenceNumber where the dateProcessed is null.Methods inherited from interface com.broadleafcommerce.inventory.repository.CustomizedInventoryTransactionRepository
enhancedFindByContextId, enhancedFindByDateCreatedBeforeAndTransactionTypeIn
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRepository
archive, existsByContextId, findAll, findAll, findAll, findAll, findAll, findAll, findAllByContextId, findByContextId, findByContextIdAndCatalog, findByNativeId, findDeployable, findMaxSortMember, findMinSortMember, findOriginal, findPromotable, findPromoteOrientedItems, findRebasable, findRejectable, findRevertable, findTarget, getDomainType, getEntityInformation, getTrackableBehaviorUtil, getTypesToRegisterInMappingContext, pruneChangeDetails, pruneRestingNotificationStates, purgeObsoleteSandboxData, save, saveAll, setTrackableBehaviorUtil
-
Method Details
-
findBySkuInventoryId
org.springframework.data.domain.Page<T> findBySkuInventoryId(@NonNull String skuInventoryId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Convenience method to retrieve allJpaInventoryTransaction
records for a givenJpaSkuInventory.getContextId()
.- Parameters:
skuInventoryId
-page
-contextInfo
-- Returns:
-
findBySkuInventoryIdAndTransactionType
org.springframework.data.domain.Page<T> findBySkuInventoryIdAndTransactionType(@NonNull String skuInventoryId, @NonNull String transactionType, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns aPage
ofInventoryTransaction
instances by skuInventoryId and transactionType.- Parameters:
skuInventoryId
-transactionType
-page
-contextInfo
-- Returns:
- See Also:
-
findByTransactionTypeAndReferenceNumber
List<T> findByTransactionTypeAndReferenceNumber(@NonNull String transactionType, @NonNull String referenceNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns aList
ofInventoryTransaction
instances by transactionType, and referenceNumber.- Parameters:
transactionType
-referenceNumber
-contextInfo
-- Returns:
- See Also:
-
findByTransactionTypeAndReferenceNumberAndDateProcessedIsNull
List<T> findByTransactionTypeAndReferenceNumberAndDateProcessedIsNull(@NonNull String transactionType, @NonNull String referenceNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns aList
ofInventoryTransaction
instances by transactionType, and referenceNumber where the dateProcessed is null.- Parameters:
transactionType
-referenceNumber
-contextInfo
-- Returns:
- See Also:
-
findBySkuInventoryIdAndReferenceNumberAndTransactionTypeIn
List<T> findBySkuInventoryIdAndReferenceNumberAndTransactionTypeIn(@NonNull String skuInventoryId, @NonNull String referenceNumber, @NonNull Set<String> transactionTypes, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list ofInventoryTransaction
records that have 1 or more transaction types for the sameSkuInventory.getId()
and reference number.- Parameters:
skuInventoryId
-referenceNumber
-transactionTypes
-contextInfo
-- Returns:
-
findByReferenceNumberAndTransactionTypeIn
List<T> findByReferenceNumberAndTransactionTypeIn(@NonNull String referenceNumber, @NonNull Set<String> transactionTypes, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list ofInventoryTransaction
records that have 1 or more transaction types for the same reference number.- Parameters:
referenceNumber
-transactionTypes
-contextInfo
-- Returns:
-
findByReferenceNumberInAndTransactionTypeIn
List<T> findByReferenceNumberInAndTransactionTypeIn(@NonNull List<String> referenceNumbers, @NonNull Set<String> transactionTypes, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns a list ofInventoryTransaction
records that have 1 or more transaction types for the given reference numbers.- Parameters:
referenceNumbers
- the reference numbers to search fortransactionTypes
- the transaction types to search forcontextInfo
- context information around sandbox and multitenant state- Returns:
- a list of
InventoryTransaction
records that have 1 or more transaction types for the given reference numbers
-
findByBatchId
org.springframework.data.domain.Page<T> findByBatchId(@NonNull String batchId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a list ofInventoryTransaction
records by a batch ID.- Parameters:
batchId
-page
-contextInfo
-- Returns:
-
findByDateCreatedBeforeAndTransactionTypeIn
org.springframework.data.domain.Page<T> findByDateCreatedBeforeAndTransactionTypeIn(Instant maxCreatedDate, Set<String> transactionTypes, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a page of inventory transactions created before a certain date and of certain transaction types.
-