Interface MultiInventory<T extends MultiInventoryItem>
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<T,InventoryItemIdentifier>,Inventory<MultiInventoryItem>,org.springframework.data.repository.Repository<T,InventoryItemIdentifier>
public interface MultiInventory<T extends MultiInventoryItem> extends Inventory<MultiInventoryItem>, org.springframework.data.repository.CrudRepository<T,InventoryItemIdentifier>
AnInventorythat storesMultiInventoryItems, 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
All Methods Instance Methods Abstract Methods Default Methods 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, findAll, findAllById, findById, save, saveAll
-
Methods inherited from interface org.salespointframework.inventory.Inventory
findItemsOutOfStock
-
-
-
-
Method Detail
-
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
default InventoryItems<T> findByProduct(Product product)
Returns allInventoryItemsavailable for a givenProduct.- Parameters:
product- must not be null.- Returns:
-
-