]> git.somenet.org - pub/jan/sbc.git/blob - src/main/java/at/ac/tuwien/sbc/valesriegler/types/PizzaOrder.java
Support for space notifications for pizzeria and group agents. Change table model...
[pub/jan/sbc.git] / src / main / java / at / ac / tuwien / sbc / valesriegler / types / PizzaOrder.java
1 package at.ac.tuwien.sbc.valesriegler.types;
2
3 import java.io.Serializable;
4
5 import at.ac.tuwien.sbc.valesriegler.common.HasId;
6
7 public class PizzaOrder implements Serializable, HasId {
8         private static int nextID = 0;
9         final private int id;
10
11         private final PizzaType pizzaType;
12         private PizzaOrderStatus status;
13
14         public PizzaOrder(PizzaType pizzaType) {
15                 id = ++nextID;
16                 this.pizzaType = pizzaType;
17                 status = PizzaOrderStatus.NEW;
18         }
19
20         public PizzaType getPizzaType() {
21                 return pizzaType;
22         }
23
24         public PizzaOrderStatus getStatus() {
25                 return status;
26         }
27
28         public int getId() {
29                 return id;
30         }
31
32         public void setStatus(PizzaOrderStatus status) {
33                 this.status = status;
34         }
35
36         @Override
37         public String toString() {
38                 return "PizzaOrder [id=" + id + ", pizzaType=" + pizzaType + ", status=" + status + "]";
39         }
40 }