]> git.somenet.org - pub/jan/sbc.git/blob - src/main/java/at/ac/tuwien/sbc/valesriegler/types/PizzaOrder.java
Merge branch 'master' of https://bitbucket.org/rgregor/sbc-ss-2013
[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 /**
8  * Class denoting one Pizza in the future and its state.
9  * 
10  * @author jan
11  * 
12  */
13 public class PizzaOrder implements Serializable, HasId {
14         private static int nextID = 0;
15         final private int id;
16
17         private final PizzaType pizzaType;
18         private PizzaOrderStatus status;
19
20         public PizzaOrder(PizzaType pizzaType) {
21                 id = ++nextID;
22                 this.pizzaType = pizzaType;
23                 status = PizzaOrderStatus.NEW;
24         }
25
26         public PizzaType getPizzaType() {
27                 return pizzaType;
28         }
29
30         public PizzaOrderStatus getStatus() {
31                 return status;
32         }
33
34         public int getId() {
35                 return id;
36         }
37
38         public void setStatus(PizzaOrderStatus status) {
39                 this.status = status;
40         }
41
42         @Override
43         public String toString() {
44                 return "PizzaOrder [id=" + id + ", pizzaType=" + pizzaType + ", status=" + status + "]";
45         }
46 }