1 package at.ac.tuwien.sbc.valesriegler.types;
3 import java.io.Serializable;
5 import at.ac.tuwien.sbc.valesriegler.common.HasId;
6 import at.ac.tuwien.sbc.valesriegler.common.Util;
9 * Class denoting one Pizza in the future and its state.
14 public class PizzaOrder implements Serializable, HasId {
15 private static int nextID = 0;
18 protected Integer orderId;
19 protected PizzaType pizzaType;
20 protected PizzaOrderStatus status;
23 public PizzaOrder(PizzaType pizzaType) {
25 this.pizzaType = pizzaType;
26 status = PizzaOrderStatus.NEW;
29 public PizzaOrder(int id) {
33 public PizzaType getPizzaType() {
37 public PizzaOrderStatus getStatus() {
45 public int getCookId() {
49 public void setCookId(int cookId) {
53 public void setStatus(PizzaOrderStatus status) {
57 public void setId(Integer id) {
61 public void setPizzaType(PizzaType pizzaType) {
62 this.pizzaType = pizzaType;
67 public int getOrderId() {
68 return Util.getIntSafe(orderId);
71 public void setOrderId(Integer orderId) {
72 this.orderId = orderId;
76 public String toString() {
77 return "PizzaOrder [id=" + id + ", orderId=" + orderId + ", pizzaType="
78 + pizzaType + ", status=" + status + "]";