Class LineItem
java.lang.Object
org.mybatis.jpetstore.domain.LineItem
- All Implemented Interfaces:
Serializable
The Class LineItem.
- Author:
- Eduardo Macarron
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItem()Gets the item.Gets the item id.intGets the line number.intGets the order id.intGets the quantity.getTotal()Gets the total.Gets the unit price.voidSets the item.voidSets the item id.voidsetLineNumber(int lineNumber) Sets the line number.voidsetOrderId(int orderId) Sets the order id.voidsetQuantity(int quantity) Sets the quantity.voidsetUnitPrice(BigDecimal unitprice) Sets the unit price.
-
Constructor Details
-
LineItem
public LineItem()Instantiates a new line item. -
LineItem
Instantiates a new line item.- Parameters:
lineNumber- the line numbercartItem- the cart item
-
-
Method Details
-
getOrderId
public int getOrderId()Gets the order id.- Returns:
- the order id
-
setOrderId
public void setOrderId(int orderId) Sets the order id.- Parameters:
orderId- the order id
-
getLineNumber
public int getLineNumber()Gets the line number.- Returns:
- the line number
-
setLineNumber
public void setLineNumber(int lineNumber) Sets the line number.- Parameters:
lineNumber- the line number
-
getItemId
-
setItemId
-
getUnitPrice
-
setUnitPrice
Sets the unit price.- Parameters:
unitprice- the unitprice
-
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
-