Пример #1
0
 @End
 public String confirmOrder() {
   order.setCreationDate(new Date());
   for (Pizza pizza : order.getPizzas()) em.persist(pizza);
   em.persist(order);
   log.infov(
       "Order {0} placed by {1} with {2} pizzas",
       order.getId(), user.getUsername(), order.getPizzas().size());
   return "completed";
 }
Пример #2
0
 public String addressSelection(Address address) {
   order.setAddress(address);
   return "confirmOrder";
 }
Пример #3
0
 public String addPizzaToOrder() {
   order.getPizzas().remove(currentPizza);
   order.getPizzas().add(currentPizza);
   currentPizza = new Pizza(order);
   return "createOrder";
 }
Пример #4
0
 public void removeFromOrder(Pizza pizza) {
   order.getPizzas().remove(pizza);
 }