]> git.somenet.org - pub/jan/sbc.git/blob - src/main/java/at/ac/tuwien/sbc/valesriegler/types/Pizza.java
Space cooks prepare pizzas and Pizzeria GUI shows that
[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.common.HasId;
6 import at.ac.tuwien.sbc.valesriegler.common.Util;
7 import at.ac.tuwien.sbc.valesriegler.waiter.Waiter;
8
9 /**
10  * this is a PIZZA! omnomnomnom
11  * 
12  * @author jan
13  * 
14  */
15 public class Pizza extends PizzaOrder implements Serializable {
16         public Waiter deliveryAgent;
17
18         // private Person consumer;
19
20         private Pizza(int id, PizzaType type, int cookId, int orderId) {
21                 super(id);
22                 this.id = id;
23                 this.pizzaType = type;
24                 this.cookId = cookId;
25                 this.orderId = orderId;
26         }
27
28         public static Pizza createPizzaFromPizzaOrder(PizzaOrder pizzaorder, int cookId) {
29                 return new Pizza(pizzaorder.getId(), pizzaorder.getPizzaType(), cookId, pizzaorder.getOrderId());
30         }
31
32
33
34         @Override
35         public String toString() {
36                 return "Pizza [pizzaType=" + pizzaType + ", id=" + id + ", cookId=" + cookId + ", deliveryAgent=" + deliveryAgent + "]";
37         }
38
39 }