Class Order
java.lang.Object
com.iu.javadatastructureslab.model.Order
Represents a shop order used in the queue simulation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStatus values for the order lifecycle.static enumPriority levels for incoming orders. -
Constructor Summary
ConstructorsConstructorDescriptionOrder(int orderId, String customerName, String productName, Order.PriorityOrder priority, Order.OrderStatus status, LocalDateTime orderDate, double totalAmount) Creates an order instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the customer name.Returns the order date/time.intReturns the order identifier.Returns the order priority.Returns the product name.Returns the current order status.doubleReturns the order total amount.voidsetStatus(Order.OrderStatus status) Updates the order status.
-
Constructor Details
-
Order
public Order(int orderId, String customerName, String productName, Order.PriorityOrder priority, Order.OrderStatus status, LocalDateTime orderDate, double totalAmount) Creates an order instance.- Parameters:
orderId- order identifiercustomerName- customer nameproductName- product namepriority- order prioritystatus- order statusorderDate- order timestamptotalAmount- order total value
-
-
Method Details
-
getOrderId
public int getOrderId()Returns the order identifier.- Returns:
- order id
-
getCustomerName
Returns the customer name.- Returns:
- customer name
-
getProductName
Returns the product name.- Returns:
- product name
-
getPriority
Returns the order priority.- Returns:
- priority
-
getStatus
Returns the current order status.- Returns:
- status
-
getOrderDate
Returns the order date/time.- Returns:
- order date
-
getTotalAmount
public double getTotalAmount()Returns the order total amount.- Returns:
- total amount
-
setStatus
Updates the order status.- Parameters:
status- new status
-