Entity classes

The Restaurant entity, which extends BaseEntity, is defined as follows:

public class Restaurant extends BaseEntity<String> {  private Optional<List<Table>> tables;  private String address;  public String getAddress() {    return address;  }  public void setAddress(String address) {    this.address = address;  }  public Restaurant(String name, String id, String address, Optional<List<Table>> tables) {    super(id, name);    this.address = address;    this.tables = tables;  }  private Restaurant(String name, String id) {    super(id, name);    this.tables = Optional.empty();  }  public static Restaurant getDummyRestaurant() {    return new Restaurant(null, null);  }  public void setTables(Optional<List<Table>> tables) {    this.tables = tables;  } public Optional<List<Table>> ...

Get Mastering Microservices with Java - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.