|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.domain.impl.AbstractEpDomainImpl com.elasticpath.domain.impl.AbstractPersistenceImpl com.elasticpath.domain.impl.AbstractValueObjectImpl com.elasticpath.domain.catalog.impl.InventoryImpl
public class InventoryImpl
Represents inventory information about a ProductSku
.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial version id. |
Constructor Summary | |
---|---|
InventoryImpl()
|
Method Summary | |
---|---|
void |
decrementInventory(int quantity)
Decrement the inventory by the given quantity. |
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 class com.elasticpath.domain.impl.AbstractPersistenceImpl |
---|
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk |
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.domain.Persistence |
---|
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public InventoryImpl()
Method Detail |
---|
public void decrementInventory(int quantity)
decrementInventory
in interface Inventory
quantity
- the qunatity to decrement the Inventory by
InsufficientInventoryException
- if there is insufficient inventorypublic int getAvailableQuantity()
getAvailableQuantity
in interface Inventory
public int getQuantityOnHand()
getQuantityOnHand
in interface Inventory
public int getReorderMinimum()
getReorderMinimum
in interface Inventory
public int getReservedQuantity()
getReservedQuantity
in interface Inventory
public java.util.Date getRestockDate()
getRestockDate
in interface Inventory
public boolean hasSufficientInventory(int quantity)
hasSufficientInventory
in interface Inventory
quantity
- the quantity of items to check for availability
quantity
items can be soldpublic boolean isInfiniteQuantityOnHand()
isInfiniteQuantityOnHand
in interface Inventory
QuantityOnHand
is presumed to be infinitepublic boolean isVisibleWhenOutOfStock()
isVisibleWhenOutOfStock
in interface Inventory
public void setInfiniteQuantityOnHand(boolean isInfiniteQuantityOnHand)
setInfiniteQuantityOnHand
in interface Inventory
isInfiniteQuantityOnHand
- set to true if infinite on hand quantity is requiredpublic void setQuantityOnHand(int quantityOnHand)
setQuantityOnHand
in interface Inventory
quantityOnHand
- the quantity on handpublic void setReorderMinimum(int reorderMinimum)
setReorderMinimum
in interface Inventory
reorderMinimum
- the reorder minimumpublic void setReservedQuantity(int reservedQuantity)
setReservedQuantity
in interface Inventory
reservedQuantity
- the reserved quantitypublic void setRestockDate(java.util.Date restockDate)
setRestockDate
in interface Inventory
restockDate
- the restock datepublic void setVisibleWhenOutOfStock(boolean isVisibleWhenOutOfStock)
setVisibleWhenOutOfStock
in interface Inventory
isVisibleWhenOutOfStock
- true if visible
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |