|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Inventory
Represents inventory information about a ProductSku
. It is separted from ProductSku
to allow only caching
ProductSku
without Inventory
. Currently, it is a one-to-one relationship between ProductSku
and
Inventory
. In the future, it may be changed to one-to-many to allow multi-stores.
Method Summary | |
---|---|
void |
decrementInventory(int quantity)
Decrement inventory by the given quanity. |
int |
getAvailableQuantity()
Get the available quantity. |
int |
getQuantityOnHand()
Get the quantity on hand. |
int |
getReorderMinimum()
Get the reorder minimum quantity. |
int |
getReservedQuantity()
Get the reserved quantity. |
java.util.Date |
getRestockDate()
Get the expected date when this inventory item will be restocked. |
boolean |
hasSufficientInventory(int quantity)
Returns true if there is sufficient stock of this Inventory to sell the specified quantity of items. |
boolean |
isInfiniteQuantityOnHand()
Returns true if the quantity on hand is presumed to allways be infinite. |
boolean |
isVisibleWhenOutOfStock()
True if this Inventory is visible in the when out of stock. |
void |
setInfiniteQuantityOnHand(boolean isInfiniteQuantityOnHand)
Set if the quantity on hand is presumed to be infinite. |
void |
setQuantityOnHand(int quantityOnHand)
Set the quantity on hand. |
void |
setReorderMinimum(int reorderMinimum)
Set the reorder minimum quantity. |
void |
setReservedQuantity(int reservedQuantity)
Set the reserved quantity. |
void |
setRestockDate(java.util.Date restockDate)
Set the restock date. |
void |
setVisibleWhenOutOfStock(boolean isVisibleWhenOutOfStock)
Set to true if this Inventory is visible in the when out of stock. |
Methods inherited from interface com.elasticpath.domain.Persistence |
---|
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Method Detail |
---|
void decrementInventory(int quantity)
quantity
- the quantity by which the inventory is to be decremented
InsufficientInventoryException
- if there is insufficient inventoryint getAvailableQuantity()
int getQuantityOnHand()
int getReorderMinimum()
int getReservedQuantity()
java.util.Date getRestockDate()
boolean hasSufficientInventory(int quantity)
quantity
- the quantity of items to check for availability
quantity
items can be soldboolean isInfiniteQuantityOnHand()
QuantityOnHand
is presumed to be infiniteboolean isVisibleWhenOutOfStock()
void setInfiniteQuantityOnHand(boolean isInfiniteQuantityOnHand)
isInfiniteQuantityOnHand
- set to true if infinite on hand quantity is requiredvoid setQuantityOnHand(int quantityOnHand)
quantityOnHand
- the quantity on handvoid setReorderMinimum(int reorderMinimum)
reorderMinimum
- the reorder minimumvoid setReservedQuantity(int reservedQuantity)
reservedQuantity
- the reserved quantityvoid setRestockDate(java.util.Date restockDate)
restockDate
- the restock datevoid setVisibleWhenOutOfStock(boolean isVisibleWhenOutOfStock)
isVisibleWhenOutOfStock
- true if visible
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |