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;
21 protected Integer cookId;
23 public PizzaOrder(PizzaType pizzaType) {
25 this.pizzaType = pizzaType;
26 status = PizzaOrderStatus.NEW;
29 public PizzaOrder(int id) {
36 public PizzaType getPizzaType() {
40 public PizzaOrderStatus getStatus() {
48 public int getCookId() {
49 return Util.getIntSafe(cookId);
52 public void setCookId(int cookId) {
56 public void setStatus(PizzaOrderStatus status) {
60 public void setId(Integer id) {
64 public void setPizzaType(PizzaType pizzaType) {
65 this.pizzaType = pizzaType;
70 public int getOrderId() {
71 return Util.getIntSafe(orderId);
74 public void setOrderId(Integer orderId) {
75 this.orderId = orderId;
79 public String toString() {
80 return "PizzaOrder [id=" + id + ", orderId=" + orderId + ", pizzaType="
81 + pizzaType + ", status=" + status + "]";