Interface MultiInventory<T extends MultiInventoryItem>
- All Superinterfaces:
CrudRepository<T,InventoryItemIdentifier>,Inventory<MultiInventoryItem>,Repository<T,InventoryItemIdentifier>,SalespointRepository<T,InventoryItemIdentifier>
public interface MultiInventory<T extends MultiInventoryItem> extends Inventory<MultiInventoryItem>, SalespointRepository<T,InventoryItemIdentifier>
An
Inventory that stores MultiInventoryItems, i.e. InventoyItems for which multiple might
exist per product, e.g. if you need to keep track of an item per warehouse or the like.- Since:
- 7.2
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and Type Method Description default InventoryItems<T>findByProduct(Product product)Returns allInventoryItemsavailable for a givenProduct.InventoryItems<T>findByProductIdentifier(ProductIdentifier productIdentifier)Returns allInventoryItemsavailable for a givenProductIdentifier.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAllById, findById, save, saveAllMethods inherited from interface org.salespointframework.inventory.Inventory
findItemsOutOfStock, streamAll
-
Method Details
-
findByProductIdentifier
@Query("select i from #{#entityName} i where i.product.id = ?1") InventoryItems<T> findByProductIdentifier(ProductIdentifier productIdentifier)Returns allInventoryItemsavailable for a givenProductIdentifier.- Parameters:
productIdentifier- must not be null.- Returns:
-
findByProduct
Returns allInventoryItemsavailable for a givenProduct.- Parameters:
product- must not be null.- Returns:
-