public interface AdvancedInventoryDao
ConcurrentInventoryModificationException if the queried Inventory record has been locked for updating.| Modifier and Type | Method and Description |
|---|---|
void |
delete(Inventory inventory)
Deletes the
Inventory |
void |
deleteReservation(InventoryReservation reservation)
Deletes the reservation from the system
|
Inventory |
readById(Long id) |
Inventory |
readForUpdateById(Long id)
Same as read, but refreshes and handles locking for concurrent updates
|
List<Inventory> |
readInventoriesForUpdateFromSkus(Set<Long> skus,
FulfillmentLocation fulfillmentLocation) |
Inventory |
readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku,
FulfillmentLocation fulfillmentLocation)
|
List<Inventory> |
readInventoryAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku)
Returns all of the inventory records for the given sku within all {@link FulfillmentLocations
|
List<Inventory> |
readInventoryAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku,
org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType)
Returns all of the inventory records for the given sku at
FulfillmentLocations with the given
fulfillmentType |
int |
readInventoryCountAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku)
Reads a sum of all available quantities for a Sku across all fulfillment locations.
|
int |
readInventoryCountInFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku,
List<FulfillmentLocation> locations)
Sums all of the
Inventory.getQuantityAvailable() for |
Inventory |
readInventoryForDefaultFulfillmentLocation(org.broadleafcommerce.core.catalog.domain.Sku sku)
Retrieves the
Inventory for the given Sku |
List<Inventory> |
readInventoryForFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
Retrieves all instances of Inventory for this fulfillmentLocation
|
List<Inventory> |
readInventoryForFulfillmentLocation(List<org.broadleafcommerce.core.catalog.domain.Sku> skus,
FulfillmentLocation fulfillmentLocation)
Reads inventories for a list of skus in the default fulfillment location.
|
Inventory |
readInventoryForUpdate(org.broadleafcommerce.core.catalog.domain.Sku sku,
FulfillmentLocation fulfillmentLocation)
Same as readInventory but refreshes and locks the object.
|
Inventory |
readInventoryForUpdateForDefaultFulfillmentLocation(org.broadleafcommerce.core.catalog.domain.Sku sku)
Same as readInventoryForDefaultFulfillmentLocation but refreshes and locks the object.
|
int |
readMaxInventoryAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku)
Gets the maximum quantity at a single fulfillment location for the given sku acros all locations
|
int |
readMaxInventoryInFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku,
List<FulfillmentLocation> locations)
Gets the maximum quantity at a single fulfillment location for the given sku filtered by the given locations
|
Inventory |
save(Inventory inventory)
Persists the
Inventory |
InventoryReservation |
saveReservation(InventoryReservation reservation)
Saves the given reservation
|
Inventory readForUpdateById(Long id) throws ConcurrentInventoryModificationException
id - {@link - ConcurrentInventoryModificationException}ConcurrentInventoryModificationExceptionInventory readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku, FulfillmentLocation fulfillmentLocation)
sku - SkufulfillmentLocation - FulfillmentLocationInventoryInventory readInventoryForUpdate(org.broadleafcommerce.core.catalog.domain.Sku sku, FulfillmentLocation fulfillmentLocation) throws ConcurrentInventoryModificationException
sku - fulfillmentLocation - ConcurrentInventoryModificationExceptionList<Inventory> readInventoriesForUpdateFromSkus(Set<Long> skus, FulfillmentLocation fulfillmentLocation) throws ConcurrentInventoryModificationException
Inventory readInventoryForDefaultFulfillmentLocation(org.broadleafcommerce.core.catalog.domain.Sku sku)
Inventory for the given Skusku - SkuListList<Inventory> readInventoryForFulfillmentLocation(List<org.broadleafcommerce.core.catalog.domain.Sku> skus, FulfillmentLocation fulfillmentLocation)
skus - Inventory readInventoryForUpdateForDefaultFulfillmentLocation(org.broadleafcommerce.core.catalog.domain.Sku sku) throws ConcurrentInventoryModificationException
sku - ConcurrentInventoryModificationExceptionInventory save(Inventory inventory) throws ConcurrentInventoryModificationException
Inventoryinventory - InventoryInventoryConcurrentInventoryModificationExceptionList<Inventory> readInventoryForFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
fulfillmentLocation - Inventoryint readInventoryCountAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku)
sku - int readMaxInventoryAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku)
sku - int readInventoryCountInFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku,
List<FulfillmentLocation> locations)
Inventory.getQuantityAvailable() forsku - locations - int readMaxInventoryInFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku,
List<FulfillmentLocation> locations)
sku - locations - List<Inventory> readInventoryAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku)
sku - the Sku to find inventory forFulfillmentLocationsList<Inventory> readInventoryAcrossFulfillmentLocations(org.broadleafcommerce.core.catalog.domain.Sku sku, org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType)
FulfillmentLocations with the given
fulfillmentTypesku - the {@link sfulfillmentType - the type of FulfillmentLocations to checkFulfillmentLocations filtered by the given fulfillmentTypeFulfillmentTypeHelper}InventoryReservation saveReservation(InventoryReservation reservation)
reservation - the entity to savevoid deleteReservation(InventoryReservation reservation)
reservation - the InventoryReservation to deleteCopyright © 2020. All rights reserved.