Class Order
java.lang.Object
com.needleandstitch.pavuk.model.Order
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum representing the possible statuses of an order. -
Constructor Summary
ConstructorsConstructorDescriptionOrder()
Default constructor.Order
(Customer customer, ClothingItem clothingItem, ShippingInfo shippingInfo) Constructor to create a new order with the specified customer, clothing item, and shipping information. -
Method Summary
Modifier and TypeMethodDescriptionGets the clothing item that was ordered.Gets the customer who placed the order.getId()
Gets the unique identifier for the order.Gets the date when the order was placed.Gets the shipping information for the order.Gets the status of the order.void
setClothingItem
(ClothingItem clothingItem) Sets the clothing item that was ordered.void
setCustomer
(Customer customer) Sets the customer who placed the order.void
Sets the unique identifier for the order.void
setOrderDate
(LocalDateTime orderDate) Sets the date when the order was placed.void
setShippingInfo
(ShippingInfo shippingInfo) Sets the shipping information for the order.void
setStatus
(Order.Status status) Sets the status of the order.
-
Constructor Details
-
Order
public Order()Default constructor. -
Order
Constructor to create a new order with the specified customer, clothing item, and shipping information.- Parameters:
customer
- The customer placing the orderclothingItem
- The clothing item being orderedshippingInfo
- The shipping information for the order
-
-
Method Details
-
getId
-
setId
Sets the unique identifier for the order.- Parameters:
id
- The order ID to set
-
getCustomer
Gets the customer who placed the order.- Returns:
- The customer who placed the order
-
setCustomer
Sets the customer who placed the order.- Parameters:
customer
- The customer to set
-
getClothingItem
Gets the clothing item that was ordered.- Returns:
- The clothing item ordered
-
setClothingItem
Sets the clothing item that was ordered.- Parameters:
clothingItem
- The clothing item to set
-
getShippingInfo
Gets the shipping information for the order.- Returns:
- The shipping information for the order
-
setShippingInfo
Sets the shipping information for the order.- Parameters:
shippingInfo
- The shipping information to set
-
getOrderDate
Gets the date when the order was placed.- Returns:
- The order date
-
setOrderDate
Sets the date when the order was placed.- Parameters:
orderDate
- The order date to set
-
getStatus
-
setStatus
Sets the status of the order.- Parameters:
status
- The status to set for the order
-