Interface InventoryTransactionService<T extends InventoryTransaction>

  • All Superinterfaces:
    com.broadleafcommerce.data.tracking.core.service.CrudEntityService<T>
    All Known Implementing Classes:
    DefaultInventoryTransactionService

    public interface InventoryTransactionService<T extends InventoryTransaction>
    extends com.broadleafcommerce.data.tracking.core.service.CrudEntityService<T>
    Service to save and retrieve InventoryTransaction records.
    Author:
    Kelly Tisdell (ktisdell)
    • Method Detail

      • readBySkuInventoryId

        org.springframework.data.domain.Page<T> readBySkuInventoryId​(@NonNull
                                                                     String skuInventoryId,
                                                                     @Nullable
                                                                     org.springframework.data.domain.Pageable page,
                                                                     @Nullable
                                                                     com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Reads InventoryTransaction records by SkuInventory#getContextId().
        Parameters:
        skuInventoryId -
        page -
        contextInfo -
        Returns:
      • readBySkuInventoryIdAndTransactionType

        org.springframework.data.domain.Page<T> readBySkuInventoryIdAndTransactionType​(@NonNull
                                                                                       String skuInventoryId,
                                                                                       @NonNull
                                                                                       String transactionType,
                                                                                       @Nullable
                                                                                       org.springframework.data.domain.Pageable page,
                                                                                       @Nullable
                                                                                       com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Reads InventoryTransaction records by SkuInventory#getContextId() and InventoryTransactionType.
        Parameters:
        skuInventoryId -
        transactionType -
        page -
        contextInfo -
        Returns:
        See Also:
        DefaultInventoryTransactionType
      • readByTransactionTypeAndReferenceNumber

        List<T> readByTransactionTypeAndReferenceNumber​(@NonNull
                                                        String transactionType,
                                                        @NonNull
                                                        String referenceNumber,
                                                        @Nullable
                                                        com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Reads InventoryTransaction records by InventoryTransactionType and a referenceNumber. The referenceNumber could be anything, but typically a unique identifier across a tenant (e.g. Fulfillment Group Item ID, Purchase Order Item ID, etc.)
        Parameters:
        transactionType -
        referenceNumber -
        contextInfo -
        Returns:
      • readByTransactionTypeAndReferenceNumberAndDateProcessedIsNull

        List<T> readByTransactionTypeAndReferenceNumberAndDateProcessedIsNull​(@NonNull
                                                                              String transactionType,
                                                                              @NonNull
                                                                              String referenceNumber,
                                                                              @Nullable
                                                                              com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Reads InventoryTransaction records by InventoryTransactionType and a referenceNumber where the processed date is null. The referenceNumber could be anything, but typically a sales order number, a PO number, or another document number. This allows you to search for records that have not been processed yet.
        Parameters:
        transactionType -
        referenceNumber -
        contextInfo -
        Returns:
      • readReservationTransactionsBySkuInventoryIdAndReferenceNumber

        List<T> readReservationTransactionsBySkuInventoryIdAndReferenceNumber​(@NonNull
                                                                              String skuInventoryId,
                                                                              @NonNull
                                                                              String referenceNumber,
                                                                              @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 -
        contextInfo -
        Returns:
      • readByReferenceNumberAndTransactionTypes

        List<T> readByReferenceNumberAndTransactionTypes​(@NonNull
                                                         String referenceNumber,
                                                         @NonNull
                                                         Set<String> transactionTypes,
                                                         @Nullable
                                                         com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Returns a list of InventoryTransaction records for 1 or more transaction type with the same referenceNumber.
        Parameters:
        referenceNumber -
        transactionTypes -
        contextInfo -
        Returns:
      • readByReferenceNumbersAndTransactionTypes

        List<T> readByReferenceNumbersAndTransactionTypes​(@NonNull
                                                          List<String> referenceNumbers,
                                                          @NonNull
                                                          Set<String> transactionTypes,
                                                          @Nullable
                                                          com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Returns a list of InventoryTransaction records for 1 or more transaction type with 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
      • readByBatchId

        org.springframework.data.domain.Page<T> readByBatchId​(@NonNull
                                                              String batchId,
                                                              @Nullable
                                                              org.springframework.data.domain.Pageable page,
                                                              @Nullable
                                                              com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Reads a paginated list of InventoryTransaction records based on batchId.
        Parameters:
        batchId -
        page -
        contextInfo -
        Returns:
      • readByDateCreatedBeforeAndTransactionTypeIn

        org.springframework.data.domain.Page<T> readByDateCreatedBeforeAndTransactionTypeIn​(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.