Class Order

java.lang.Object
com.needleandstitch.pavuk.model.Order

@Entity public class Order extends Object
An entity class for order.

This class serves as a model for the order table in the database.

Since:
15.12.2024
Version:
1.0.0
Author:
Needle & Stitch
  • Constructor Details

    • Order

      public Order()
      Default constructor.
    • Order

      public Order(Customer customer, ClothingItem clothingItem, ShippingInfo shippingInfo)
      Constructor to create a new order with the specified customer, clothing item, and shipping information.
      Parameters:
      customer - The customer placing the order
      clothingItem - The clothing item being ordered
      shippingInfo - The shipping information for the order
  • Method Details

    • getId

      public Long getId()
      Gets the unique identifier for the order.
      Returns:
      The order ID
    • setId

      public void setId(Long id)
      Sets the unique identifier for the order.
      Parameters:
      id - The order ID to set
    • getCustomer

      public Customer getCustomer()
      Gets the customer who placed the order.
      Returns:
      The customer who placed the order
    • setCustomer

      public void setCustomer(Customer customer)
      Sets the customer who placed the order.
      Parameters:
      customer - The customer to set
    • getClothingItem

      public ClothingItem getClothingItem()
      Gets the clothing item that was ordered.
      Returns:
      The clothing item ordered
    • setClothingItem

      public void setClothingItem(ClothingItem clothingItem)
      Sets the clothing item that was ordered.
      Parameters:
      clothingItem - The clothing item to set
    • getShippingInfo

      public ShippingInfo getShippingInfo()
      Gets the shipping information for the order.
      Returns:
      The shipping information for the order
    • setShippingInfo

      public void setShippingInfo(ShippingInfo shippingInfo)
      Sets the shipping information for the order.
      Parameters:
      shippingInfo - The shipping information to set
    • getOrderDate

      public LocalDateTime getOrderDate()
      Gets the date when the order was placed.
      Returns:
      The order date
    • setOrderDate

      public void setOrderDate(LocalDateTime orderDate)
      Sets the date when the order was placed.
      Parameters:
      orderDate - The order date to set
    • getStatus

      public Order.Status getStatus()
      Gets the status of the order.
      Returns:
      The status of the order
    • setStatus

      public void setStatus(Order.Status status)
      Sets the status of the order.
      Parameters:
      status - The status to set for the order