Class MultiInventoryItem
- java.lang.Object
-
- org.salespointframework.core.AbstractEntity<InventoryItemIdentifier>
-
- org.salespointframework.inventory.InventoryItem<MultiInventoryItem>
-
- org.salespointframework.inventory.MultiInventoryItem
-
- All Implemented Interfaces:
org.springframework.data.domain.Persistable<InventoryItemIdentifier>
@Entity public class MultiInventoryItem extends InventoryItem<MultiInventoryItem>
AnMultiInventoryItem
that establishes a many-to-one relationship to aProduct
instance, i.e. it can be used to keep track of stock for products in e.g. multiple warehouses etc.- Author:
- Oliver Drotbohm
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MultiInventoryItem()
MultiInventoryItem(Product product, Quantity quantity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Product
getProduct()
-
Methods inherited from class org.salespointframework.inventory.InventoryItem
decreaseQuantity, getId, getQuantity, hasSufficientQuantity, increaseQuantity, keepsTrackOf, toString
-
Methods inherited from class org.salespointframework.core.AbstractEntity
equals, hashCode, isNew
-
-
-
-
Constructor Detail
-
MultiInventoryItem
public MultiInventoryItem(Product product, Quantity quantity)
- Parameters:
product
- theProduct
for thisMultiInventoryItem
, must not be null.quantity
- the initialQuantity
for thisMultiInventoryItem
, must not be null.
-
MultiInventoryItem
protected MultiInventoryItem()
-
-
Method Detail
-
getProduct
protected Product getProduct()
- Specified by:
getProduct
in classInventoryItem<MultiInventoryItem>
-
-