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 MultiInventoryItem
s, i.e. InventoyItem
s 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 allInventoryItems
available for a givenProduct
.InventoryItems<T>
findByProductIdentifier(ProductIdentifier productIdentifier)
Returns allInventoryItems
available for a givenProductIdentifier
.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAllById, findById, save, saveAll
Methods 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 allInventoryItems
available for a givenProductIdentifier
.- Parameters:
productIdentifier
- must not be null.- Returns:
-
findByProduct
Returns allInventoryItems
available for a givenProduct
.- Parameters:
product
- must not be null.- Returns:
-