Class ProductOnOrder
- java.lang.Object
-
- edu.cnm.deepdive.albuquirky.model.entity.ProductOnOrder
-
@Entity public class ProductOnOrder extends Object
This is theProductOnOrderentity class, which declares the attributes needed for products on order which include,id,itemQuantityand the unit price. Two attributes that are annotated @ManyToOne are theProductID and theOrderID.
-
-
Constructor Summary
Constructors Constructor Description ProductOnOrder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetId()Returns theidintgetItemQuantity()Returns theitemQuantityOrdergetOrder()Returns theOrderidProductgetProduct()Returns theProductidintgetUnitPrice()Returns theunitPricevoidsetItemQuantity(int itemQuantity)Sets theitemQuantityvoidsetOrder(Order order)SetsOrdervoidsetProduct(Product product)SetsProductvoidsetUnitPrice(int unitPrice)Sets theunitPrice
-
-
-
Method Detail
-
getProduct
@NonNull public Product getProduct()
Returns theProductid- Returns:
- The ID of the
Product.
-
setProduct
public void setProduct(@NonNull Product product)SetsProduct- Parameters:
product- - Product
-
getItemQuantity
public int getItemQuantity()
Returns theitemQuantity- Returns:
- The quantity of the
Producton the order.
-
setItemQuantity
public void setItemQuantity(int itemQuantity)
Sets theitemQuantity- Parameters:
itemQuantity- - int
-
setUnitPrice
public void setUnitPrice(int unitPrice)
Sets theunitPrice- Parameters:
unitPrice- - int
-
-