Interface InventoryTransactionRepository<T extends com.broadleafcommerce.data.tracking.core.Trackable>

  • Type Parameters:
    D -
    All Superinterfaces:
    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 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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.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 of InventoryTransaction 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.
      List<T> findByReferenceNumberAndTransactionTypeIn​(String referenceNumber, Set<String> transactionTypes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns a list of InventoryTransaction records that have 1 or more transaction types for the same reference number.
      List<T> findByReferenceNumberInAndTransactionTypeIn​(List<String> referenceNumbers, Set<String> transactionTypes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns a list of InventoryTransaction 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 all JpaInventoryTransaction records for a given JpaSkuInventory.getContextId().
      List<T> findBySkuInventoryIdAndReferenceNumberAndTransactionTypeIn​(String skuInventoryId, String referenceNumber, Set<String> transactionTypes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns a list of InventoryTransaction records that have 1 or more transaction types for the same SkuInventory.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 a Page of InventoryTransaction instances by skuInventoryId and transactionType.
      List<T> findByTransactionTypeAndReferenceNumber​(String transactionType, String referenceNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns a List of InventoryTransaction instances by transactionType, and referenceNumber.
      List<T> findByTransactionTypeAndReferenceNumberAndDateProcessedIsNull​(String transactionType, String referenceNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns a List of InventoryTransaction instances by transactionType, and referenceNumber where the dateProcessed is null.
      • 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 Detail

      • 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 all JpaInventoryTransaction records for a given JpaSkuInventory.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 a Page of InventoryTransaction instances by skuInventoryId and transactionType.
        Parameters:
        skuInventoryId -
        transactionType -
        page -
        contextInfo -
        Returns:
        See Also:
        InventoryTransactionType, DefaultInventoryTransactionType
      • findByTransactionTypeAndReferenceNumberAndDateProcessedIsNull

        List<T> findByTransactionTypeAndReferenceNumberAndDateProcessedIsNull​(@NonNull
                                                                              String transactionType,
                                                                              @NonNull
                                                                              String referenceNumber,
                                                                              @Nullable
                                                                              com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Returns a List of InventoryTransaction instances by transactionType, and referenceNumber where the dateProcessed is null.
        Parameters:
        transactionType -
        referenceNumber -
        contextInfo -
        Returns:
        See Also:
        InventoryTransactionType, DefaultInventoryTransactionType
      • 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 of InventoryTransaction records that have 1 or more transaction types for the same SkuInventory.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 of InventoryTransaction 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 of InventoryTransaction records that have 1 or more transaction types for the given reference numbers.
        Parameters:
        referenceNumbers - the reference numbers to search for
        transactionTypes - the transaction types to search for
        contextInfo - 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 of InventoryTransaction 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.