org.broadleafcommerce.inventory.dao
Interface InventoryDao

All Known Implementing Classes:
InventoryDaoImpl

public interface InventoryDao


Method Summary
 void delete(Inventory inventory)
          Deletes the Inventory
 Inventory readById(Long id)
           
 Inventory readForUpdateById(Long id)
          Same as read, but refreshes and handles locking for concurrent updates
 Inventory readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku, FulfillmentLocation fulfillmentLocation)
          Retrieves the Inventory for the given Sku and FulfillmentLocation
 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
 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.
 List<org.broadleafcommerce.core.catalog.domain.Sku> readSkusNotAtFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
          Retrieves skus that do not have inventory records at a particular fulfillment location
 Inventory save(Inventory inventory)
          Persists the Inventory
 

Method Detail

readById

Inventory readById(Long id)

readForUpdateById

Inventory readForUpdateById(Long id)
                            throws ConcurrentInventoryModificationException
Same as read, but refreshes and handles locking for concurrent updates

Parameters:
id -
Returns:
Throws:
ConcurrentInventoryModificationException

readInventory

Inventory readInventory(org.broadleafcommerce.core.catalog.domain.Sku sku,
                        FulfillmentLocation fulfillmentLocation)
Retrieves the Inventory for the given Sku and FulfillmentLocation

Parameters:
sku - Sku
fulfillmentLocation - FulfillmentLocation
Returns:
Inventory

readInventoryForUpdate

Inventory readInventoryForUpdate(org.broadleafcommerce.core.catalog.domain.Sku sku,
                                 FulfillmentLocation fulfillmentLocation)
                                 throws ConcurrentInventoryModificationException
Same as readInventory but refreshes and locks the object.

Parameters:
sku -
fulfillmentLocation -
Returns:
Throws:
ConcurrentInventoryModificationException

readInventoryForDefaultFulfillmentLocation

Inventory readInventoryForDefaultFulfillmentLocation(org.broadleafcommerce.core.catalog.domain.Sku sku)
Retrieves the Inventory for the given Sku

Parameters:
sku - Sku
Returns:
List

readInventoryForUpdateForDefaultFulfillmentLocation

Inventory readInventoryForUpdateForDefaultFulfillmentLocation(org.broadleafcommerce.core.catalog.domain.Sku sku)
                                                              throws ConcurrentInventoryModificationException
Same as readInventoryForDefaultFulfillmentLocation but refreshes and locks the object.

Parameters:
sku -
Returns:
Throws:
ConcurrentInventoryModificationException

save

Inventory save(Inventory inventory)
               throws ConcurrentInventoryModificationException
Persists the Inventory

Parameters:
inventory - Inventory
Returns:
the persisted Inventory
Throws:
ConcurrentInventoryModificationException

delete

void delete(Inventory inventory)
Deletes the Inventory

Parameters:
inventory -

readInventoryForFulfillmentLocation

List<Inventory> readInventoryForFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
Retrieves all instances of Inventory for this fulfillmentLocation

Parameters:
fulfillmentLocation -
Returns:
list of Inventory

readSkusNotAtFulfillmentLocation

List<org.broadleafcommerce.core.catalog.domain.Sku> readSkusNotAtFulfillmentLocation(FulfillmentLocation fulfillmentLocation)
Retrieves skus that do not have inventory records at a particular fulfillment location

Parameters:
fulfillmentLocation -
Returns:


Copyright © 2013. All Rights Reserved.