+++ /dev/null
-package de.juplo.kafka.payment.transfer;
-
-import javax.validation.constraints.NotNull;
-
-
-/**
- * Simple DTO used by the REST interface
- */
-public class OrderBean
-{
- @NotNull(message = "Cannot be null")
- private long id;
- @NotNull(message = "Cannot be null")
- private long customerId;
- @NotNull(message = "Cannot be null")
- private long productId;
- @NotNull(message = "Cannot be null")
- private int quantity;
-
-
- public OrderBean() {}
-
- public OrderBean(
- final long id,
- final long customerId,
- final long productId,
- final int quantity)
- {
- this.id = id;
- this.customerId = customerId;
- this.productId = productId;
- this.quantity = quantity;
- }
-
- public long getId()
- {
- return id;
- }
-
- public long getCustomerId()
- {
- return customerId;
- }
-
- public long getProductId()
- {
- return productId;
- }
-
- public int getQuantity()
- {
- return quantity;
- }
-
-
- @Override
- public boolean equals(final Object o) {
- if (this == o)
- return true;
- if (o == null || this.getClass() != o.getClass())
- return false;
-
- final OrderBean orderBean = (OrderBean) o;
-
- return this.customerId == orderBean.customerId;
- }
-
- @Override
- public String toString()
- {
- return "{" +
- "id=" + id +
- ", customerId=" + customerId +
- ", productId=" + productId +
- ", quantity=" + quantity +
- '}';
- }
-
- @Override
- public int hashCode()
- {
- return Long.hashCode(this.id);
- }
-}