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 MultiInventoryItem
s, i.e. InventoryItem
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 TypeMethodDescriptiondefault InventoryItems
<T> findByProduct
(Product product) Returns allInventoryItems
available for a givenProduct
.findByProductIdentifier
(Product.ProductIdentifier productIdentifier) Returns allInventoryItems
available for a givenProduct.ProductIdentifier
.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.salespointframework.inventory.Inventory
findItemsOutOfStock, streamAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.salespointframework.core.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 allInventoryItems
available for a givenProduct.ProductIdentifier
.- Parameters:
productIdentifier
- must not be null.- Returns:
-
findByProduct
Returns allInventoryItems
available for a givenProduct
.- Parameters:
product
- must not be null.- Returns:
-