Class CartItem
java.lang.Object
org.mybatis.jpetstore.domain.CartItem
- All Implemented Interfaces:
Serializable
The Class CartItem.
- Author:
- Eduardo Macarron
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItem()Gets the item.intGets the quantity.getTotal()Gets the total.voidIncrement quantity.booleanChecks if is in stock.voidsetInStock(boolean inStock) Sets the in stock.voidSets the item.voidsetQuantity(int quantity) Sets the quantity.
-
Constructor Details
-
CartItem
public CartItem()
-
-
Method Details
-
isInStock
public boolean isInStock()Checks if is in stock.- Returns:
- true, if successful
-
setInStock
public void setInStock(boolean inStock) Sets the in stock.- Parameters:
inStock- the in stock
-
getTotal
-
getItem
-
setItem
-
getQuantity
public int getQuantity()Gets the quantity.- Returns:
- the quantity
-
setQuantity
public void setQuantity(int quantity) Sets the quantity.- Parameters:
quantity- the quantity
-
incrementQuantity
public void incrementQuantity()Increment quantity.
-