Class Order
- java.lang.Object
-
- edu.cnm.deepdive.albuquirky.model.entity.Order
-
@Entity public class Order extends Object
This is theOrderentity class, which declares the attributes needed for orders. Those include theid, aplacedDateand buyer id which is annotated by a ManyToOne fromProfile. A @OneToMany annotation for items on order which returns a list of items on order coming fromProductOnOrder.
-
-
Constructor Summary
Constructors Constructor Description Order()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProfilegetBuyer()Gets the buyingProfile.LonggetId()Gets the ID for the order.List<ProductOnOrder>getItemsOnOrder()Gets the items on the order.DategetPlacedDate()Gets the creation timestamp for when the order was placed.voidsetBuyer(Profile buyer)Setsbuyer
-
-
-
Method Detail
-
getId
public Long getId()
Gets the ID for the order.- Returns:
- The order's ID.
-
getPlacedDate
@NonNull public Date getPlacedDate()
Gets the creation timestamp for when the order was placed.- Returns:
- The creation timestamp.
-
getBuyer
@NonNull public Profile getBuyer()
Gets the buyingProfile.- Returns:
- The
Profilethat placed the order.
-
getItemsOnOrder
@NonNull public List<ProductOnOrder> getItemsOnOrder()
Gets the items on the order.- Returns:
- List of itemsOnOrder
-
-