Class MultiInventoryItem
java.lang.Object
org.salespointframework.core.AbstractEntity<ID>
org.salespointframework.core.AbstractAggregateRoot<InventoryItem.InventoryItemIdentifier>
org.salespointframework.inventory.InventoryItem<MultiInventoryItem>
org.salespointframework.inventory.MultiInventoryItem
- All Implemented Interfaces:
Persistable<InventoryItem.InventoryItemIdentifier>
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.salespointframework.inventory.InventoryItem
InventoryItem.InventoryItemIdentifier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Product
Returns theProduct
thisInventoryItem
belongs to.Methods inherited from class org.salespointframework.inventory.InventoryItem
decreaseQuantity, getId, getQuantity, hasSufficientQuantity, increaseQuantity, keepsTrackOf, toString
Methods inherited from class org.salespointframework.core.AbstractAggregateRoot
registerEvent
Methods inherited from class org.salespointframework.core.AbstractEntity
equals, hashCode, hasId, isNew
-
Constructor Details
-
MultiInventoryItem
- Parameters:
product
- theProduct
for thisMultiInventoryItem
, must not be null.quantity
- the initialQuantity
for thisMultiInventoryItem
, must not be null.
-
-
Method Details
-
getProduct
Description copied from class:InventoryItem
Returns theProduct
thisInventoryItem
belongs to.- Specified by:
getProduct
in classInventoryItem<MultiInventoryItem>
- Returns:
- must not be null.
-