
org.jsmart.zerocode.zerocodejavaexec.pojo.Order Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-testing Show documentation
Show all versions of http-testing Show documentation
How to use zerocode in your project
The newest version!
package org.jsmart.zerocode.zerocodejavaexec.pojo;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
public class Order {
private Integer orderId;
private String itemName;
private Long quantity;
@JsonCreator
public Order(
@JsonProperty("orderId")Integer orderId,
@JsonProperty("itemName")String itemName,
@JsonProperty("quantity")Long quantity) {
this.orderId = orderId;
this.itemName = itemName;
this.quantity = quantity;
}
public Integer getOrderId() {
return orderId;
}
public String getItemName() {
return itemName;
}
public Long getQuantity() {
return quantity;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Order order = (Order) o;
return Objects.equals(orderId, order.orderId) &&
Objects.equals(itemName, order.itemName) &&
Objects.equals(quantity, order.quantity);
}
@Override
public int hashCode() {
return Objects.hash(orderId, itemName, quantity);
}
@Override
public String toString() {
return "Order{" +
"orderId=" + orderId +
", itemName='" + itemName + '\'' +
", quantity=" + quantity +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy