private Restaurant warmupRestaurant(Order order, Model uiModel) {
   Collection<Restaurant> restaurants = restaurantService.findAll();
   uiModel.addAttribute("restaurants", restaurants);
   Restaurant restaurant =
       restaurantService.fetchWarmedUp(order.getBill().getDiningTable().getRestaurant().getId());
   uiModel.addAttribute("restaurant", restaurant);
   return restaurant;
 }
 private Bill warmupRestaurant(String billId, Model uiModel) {
   Bill bill = billService.findById(Long.valueOf(billId));
   Collection<Restaurant> restaurants = restaurantService.findAll();
   uiModel.addAttribute("restaurants", restaurants);
   Restaurant restaurant =
       restaurantService.fetchWarmedUp(bill.getDiningTable().getRestaurant().getId());
   uiModel.addAttribute("restaurant", restaurant);
   return bill;
 }
 private Order warmupRestaurantByOrder(String orderId, Model uiModel) {
   Order order = orderService.findById(Long.valueOf(orderId));
   Collection<Restaurant> restaurants = restaurantService.findAll();
   uiModel.addAttribute("restaurants", restaurants);
   Restaurant restaurant =
       restaurantService.fetchWarmedUp(order.getBill().getDiningTable().getRestaurant().getId());
   uiModel.addAttribute("restaurant", restaurant);
   return order;
 }
  @RequestMapping(value = "/restaurants/{restaurantName}/waiter", method = RequestMethod.GET)
  public String showWaiter(@PathVariable("restaurantName") String restaurantName, Model uiModel) {

    // warmup stuff
    Collection<Restaurant> restaurants = restaurantService.findAll();
    uiModel.addAttribute("restaurants", restaurants);
    Restaurant restaurant = restaurantService.fetchWarmedUp(restaurantName);
    uiModel.addAttribute("restaurant", restaurant);

    List<Order> allPreparedOrders = orderService.findPreparedOrdersForRestaurant(restaurant);
    uiModel.addAttribute("allPreparedOrders", allPreparedOrders);

    List<Bill> allSubmittedBills = billService.findSubmittedBillsForRestaurant(restaurant);
    uiModel.addAttribute("allSubmittedBills", allSubmittedBills);

    return "hartigehap/waiter";
  }