Class UniqueInventoryItem
- java.lang.Object
-
- org.salespointframework.core.AbstractEntity<InventoryItemIdentifier>
-
- org.salespointframework.inventory.InventoryItem<UniqueInventoryItem>
-
- org.salespointframework.inventory.UniqueInventoryItem
-
- All Implemented Interfaces:
org.springframework.data.domain.Persistable<InventoryItemIdentifier>
@Entity public class UniqueInventoryItem extends InventoryItem<UniqueInventoryItem>
AnInventoryItem
that requires a unique one-to-one relationship to aProduct
instance.- Since:
- 7.2
- Author:
- Oliver Drotbohm
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UniqueInventoryItem()
UniqueInventoryItem(Product product, Quantity quantity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
UniqueInventoryItem
public UniqueInventoryItem(Product product, Quantity quantity)
- Parameters:
product
- theProduct
for thisUniqueInventoryItem
, must not be null.quantity
- the initialQuantity
for thisUniqueInventoryItem
, must not be null.
-
UniqueInventoryItem
protected UniqueInventoryItem()
-
-
Method Detail
-
getProduct
public Product getProduct()
- Specified by:
getProduct
in classInventoryItem<UniqueInventoryItem>
-
-