]> git.somenet.org - pub/jan/sbc.git/blob - src/main/java/at/ac/tuwien/sbc/valesriegler/types/Pizza.java
added some not really helpful class descriptions + removed types that got duplicated...
[pub/jan/sbc.git] / src / main / java / at / ac / tuwien / sbc / valesriegler / types / Pizza.java
1 package at.ac.tuwien.sbc.valesriegler.types;
2
3 import java.io.Serializable;
4
5 import at.ac.tuwien.sbc.valesriegler.cook.JMSCook;
6 import at.ac.tuwien.sbc.valesriegler.waiter.Waiter;
7
8 /**
9  * this is a PIZZA! omnomnomnom
10  * 
11  * @author jan
12  * 
13  */
14 public class Pizza implements Serializable {
15         final private int id;
16         final private PizzaType type;
17         final public int cookId;
18         public Waiter deliveryAgent;
19
20         // private Person consumer;
21
22         private Pizza(int id, PizzaType type, int cookId) {
23                 this.id = id;
24                 this.type = type;
25                 this.cookId = cookId;
26         }
27
28         public static Pizza createPizzaFromPizzaOrder(PizzaOrder pizzaorder, JMSCook producer) {
29                 return new Pizza(pizzaorder.getId(), pizzaorder.getPizzaType(), producer.getId());
30         }
31
32         @Override
33         public String toString() {
34                 return "Pizza [id=" + id + ", type=" + type + ", cookId=" + cookId + ", deliveryAgent=" + deliveryAgent + "]";
35         }
36
37 }