Interface SkuInventoryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

Type Parameters:
D -
All Superinterfaces:
CustomizableSkuInventoryRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware, com.broadleafcommerce.common.messaging.notification.NotificationStateRepository, org.springframework.data.repository.Repository<D,String>, com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
All Known Subinterfaces:
JpaSkuInventoryRepository<D>

@NoRepositoryBean public interface SkuInventoryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable> extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>, CustomizableSkuInventoryRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware
Repository for persisting and retrieving SkuInventory records. Note that a SkuInventory record is always associated with an InventoryLocation. Note, also, that there is no default delete method on this repository. Rather, you may delete (archive) the associated InventoryLocation or you may update / adjust the inventory so that its quantities are zero.
Author:
Kelly Tisdell (ktisdell)
  • Method Details

    • readByInventoryLocationContextIdOrderByContextIdAsc

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> readByInventoryLocationContextIdOrderByContextIdAsc(String inventoryLocationContextId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads a paginated list of SkuInventory records for a given InventoryLocation#getContextId()
      Parameters:
      inventoryLocationContextId -
      page -
      contextInfo -
      Returns:
    • findAllBySkuNameContainingIgnoreCase

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllBySkuNameContainingIgnoreCase(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find all SkuInventory, filtered by name.
      Parameters:
      name - the SkuInventory name to filter by
      page - the requested page of results from the database
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      contextInfo - context information
      Returns:
      all SkuInventory, filtered by name
    • findByParentSkuInventoryIdAndSerializationValue

      @Policy(operationTypes=READ) Optional<D> findByParentSkuInventoryIdAndSerializationValue(String parentSkuInventoryId, String serializationValue, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds a (unique) SkuInventory record for a given parent sku inventory id and serialization value.
      Parameters:
      parentSkuInventoryId - the parent sku inventory id
      serializationValue - the serialization value
      context - context information surrounding sandboxing and multitenant state
      Returns:
      a (unique) SkuInventory record for a given parent sku inventory id and serialization value.
    • existsByParentSkuInventoryId

      @Policy(operationTypes=READ) boolean existsByParentSkuInventoryId(String parentSkuInventoryId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Determines if any SkuInventory records exist with the given SkuInventory.getParentSkuInventoryId().
      Parameters:
      parentSkuInventoryId - the parent sku inventory id to filter by
      context - context information surrounding sandboxing and multitenant state
      Returns:
      true if any SkuInventory records exist with the given SkuInventory.getParentSkuInventoryId(), otherwise false
    • findAllBySkuRefSkuNameContainingIgnoreCase

      @Deprecated @Policy(operationTypes=READ) default org.springframework.data.domain.Page<D> findAllBySkuRefSkuNameContainingIgnoreCase(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find all SkuInventory, filtered by name.
      Parameters:
      name - the SkuInventory name to filter by
      page - the requested page of results from the database
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      contextInfo - context information
      Returns:
      all SkuInventory, filtered by name
    • findAllByInventoryLocationContextId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByInventoryLocationContextId(String inventoryLocationId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Read all Sku Inventories for the specified inventory location id matching the given filters. Read all Inventory Locations,
      Parameters:
      inventoryLocationId - the inventory location id
      filters - additional filters to apply in the query, can be null
      page - the requested page of results from the database
      context - context information surrounding sandboxing and multitenant state
      Returns:
      the Sku Inventories for the specified inventory location id