Class MultiInventoryItem
java.lang.Object
org.salespointframework.core.AbstractEntity<ID>
org.salespointframework.core.AbstractAggregateRoot<InventoryItemIdentifier>
org.salespointframework.inventory.InventoryItem<MultiInventoryItem>
org.salespointframework.inventory.MultiInventoryItem
- All Implemented Interfaces:
Persistable<InventoryItemIdentifier>
@Entity public class MultiInventoryItem extends InventoryItem<MultiInventoryItem>
An
MultiInventoryItem that establishes a many-to-one relationship to a Product 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 protectedMultiInventoryItem()MultiInventoryItem(Product product, Quantity quantity) -
Method Summary
Modifier and Type Method Description protected ProductgetProduct()Returns theProductthisInventoryItembelongs to.Methods inherited from class org.salespointframework.inventory.InventoryItem
decreaseQuantity, getId, getQuantity, hasSufficientQuantity, increaseQuantity, keepsTrackOf, toStringMethods inherited from class org.salespointframework.core.AbstractEntity
equals, hashCode, hasId, isNew
-
Constructor Details
-
MultiInventoryItem
- Parameters:
product- theProductfor thisMultiInventoryItem, must not be null.quantity- the initialQuantityfor thisMultiInventoryItem, must not be null.
-
MultiInventoryItem
protected MultiInventoryItem()
-
-
Method Details
-
getProduct
Description copied from class:InventoryItemReturns theProductthisInventoryItembelongs to.- Specified by:
getProductin classInventoryItem<MultiInventoryItem>- Returns:
- must not be null.
-