Class UniqueInventoryItem
java.lang.Object
org.salespointframework.core.AbstractEntity<ID>
org.salespointframework.core.AbstractAggregateRoot<InventoryItemIdentifier>
org.salespointframework.inventory.InventoryItem<UniqueInventoryItem>
org.salespointframework.inventory.UniqueInventoryItem
- All Implemented Interfaces:
Persistable<InventoryItemIdentifier>
@Entity public class UniqueInventoryItem extends InventoryItem<UniqueInventoryItem>
An
InventoryItem
that requires a unique one-to-one relationship to a Product
instance.- Since:
- 7.2
- Author:
- Oliver Drotbohm
-
Constructor Summary
Constructors Modifier Constructor Description protected
UniqueInventoryItem()
UniqueInventoryItem(Product product, Quantity quantity)
-
Method Summary
Modifier and Type Method Description Product
getProduct()
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.AbstractEntity
equals, hashCode, hasId, isNew
-
Constructor Details
-
UniqueInventoryItem
- Parameters:
product
- theProduct
for thisUniqueInventoryItem
, must not be null.quantity
- the initialQuantity
for thisUniqueInventoryItem
, must not be null.
-
UniqueInventoryItem
protected UniqueInventoryItem()
-
-
Method Details
-
getProduct
Description copied from class:InventoryItem
Returns theProduct
thisInventoryItem
belongs to.- Specified by:
getProduct
in classInventoryItem<UniqueInventoryItem>
- Returns:
- must not be null.
-