Created
October 21, 2022 18:05
-
-
Save volodink/dd6cb258690eb3681dbea7c363400fa7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Customer { | |
| private Long id; | |
| private String name; | |
| private Integer tier; | |
| public Long getId() { | |
| return id; | |
| } | |
| public void setId(Long id) { | |
| this.id = id; | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| public Integer getTier() { | |
| return tier; | |
| } | |
| public void setTier(Integer tier) { | |
| this.tier = tier; | |
| } | |
| @Override | |
| public String toString() { | |
| return "Customer{" + | |
| "id=" + id + | |
| ", name='" + name + '\'' + | |
| ", tier=" + tier + | |
| '}'; | |
| } | |
| } | |
| public class Order { | |
| Set<Product> products; | |
| private Long id; | |
| private LocalDate orderDate; | |
| private LocalDate deliveryDate; | |
| private String status; | |
| private Customer customer; | |
| public Set<Product> getProducts() { | |
| return products; | |
| } | |
| public void setProducts(Set<Product> products) { | |
| this.products = products; | |
| } | |
| public Long getId() { | |
| return id; | |
| } | |
| public void setId(Long id) { | |
| this.id = id; | |
| } | |
| public LocalDate getOrderDate() { | |
| return orderDate; | |
| } | |
| public void setOrderDate(LocalDate orderDate) { | |
| this.orderDate = orderDate; | |
| } | |
| public LocalDate getDeliveryDate() { | |
| return deliveryDate; | |
| } | |
| public void setDeliveryDate(LocalDate deliveryDate) { | |
| this.deliveryDate = deliveryDate; | |
| } | |
| public String getStatus() { | |
| return status; | |
| } | |
| public void setStatus(String status) { | |
| this.status = status; | |
| } | |
| public Customer getCustomer() { | |
| return customer; | |
| } | |
| public void setCustomer(Customer customer) { | |
| this.customer = customer; | |
| } | |
| @Override | |
| public String toString() { | |
| return "Order{" + | |
| "products=" + products + | |
| ", id=" + id + | |
| ", orderDate=" + orderDate + | |
| ", deliveryDate=" + deliveryDate + | |
| ", status='" + status + '\'' + | |
| ", customer=" + customer + | |
| '}'; | |
| } | |
| } | |
| public class Product { | |
| private Long id; | |
| private String name; | |
| private String category; | |
| private Double price; | |
| public Long getId() { | |
| return id; | |
| } | |
| public void setId(Long id) { | |
| this.id = id; | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| public String getCategory() { | |
| return category; | |
| } | |
| public void setCategory(String category) { | |
| this.category = category; | |
| } | |
| public Double getPrice() { | |
| return price; | |
| } | |
| public void setPrice(Double price) { | |
| this.price = price; | |
| } | |
| @Override | |
| public String toString() { | |
| return "Product{" + | |
| "id=" + id + | |
| ", name='" + name + '\'' + | |
| ", category='" + category + '\'' + | |
| ", price=" + price + | |
| '}'; | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment