Interface MultiInventory<T extends MultiInventoryItem>
- All Superinterfaces:
CrudRepository<T, InventoryItem.InventoryItemIdentifier>, Inventory<MultiInventoryItem>, PagingAndSortingRepository<T, InventoryItem.InventoryItemIdentifier>, Repository<T, InventoryItem.InventoryItemIdentifier>, SalespointRepository<T, InventoryItem.InventoryItemIdentifier>
public interface MultiInventory<T extends MultiInventoryItem>
extends Inventory<MultiInventoryItem>, SalespointRepository<T, InventoryItem.InventoryItemIdentifier>
An
Inventory that stores MultiInventoryItems, i.e. InventoryItems 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 TypeMethodDescriptiondefault InventoryItems<T> findByProduct(Product product) Returns allInventoryItemsavailable for a givenProduct.findByProductIdentifier(Product.ProductIdentifier productIdentifier) Returns allInventoryItemsavailable for a givenProduct.ProductIdentifier.Methods inherited from interface CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface Inventory
findItemsOutOfStock, streamAllMethods inherited from interface PagingAndSortingRepository
findAllMethods inherited from interface SalespointRepository
findAll, findAll, findAllById, saveAll
-
Method Details
-
findByProductIdentifier
@Query("select i from #{#entityName} i\n where i.product.id = ?1\n") InventoryItems<T> findByProductIdentifier(Product.ProductIdentifier productIdentifier) Returns allInventoryItemsavailable for a givenProduct.ProductIdentifier.- Parameters:
productIdentifier- must not be null.- Returns:
-
findByProduct
Returns allInventoryItemsavailable for a givenProduct.- Parameters:
product- must not be null.- Returns:
-