Package de.peacei.gae.foodsupplier.data

Examples of de.peacei.gae.foodsupplier.data.Menu


          for (FoodConfig foodConfig : configs) {
            if((foodArr=parse(html, foodConfig.keyword))!=null)foods.add(foodArr);
          }
         
          for (int i = 0; i < 5; i++) {
            Menu menu = new Menu();
            menu.setDay(getWeekdayForWeekAndIndex(week, i));
            for (Food[] foods2 : foods) {
              menu.getFoods().add(foods2[i]);
            }
            menus.add(menu);
          }
           
        }
View Full Code Here


    try {
      weekplanJsonObj.put(WEEKPLAN_WEEKNUMBER, weekplan.getWeek());
      JSONArray menuesJsonArr = new JSONArray();
      Iterator<Menu> menuIter = weekplan.getMenus().iterator();
      while (menuIter.hasNext()) {
        Menu menu = menuIter.next();
       
        JSONObject menuJsonObj = new JSONObject();
        menuJsonObj.put(MENU_DAY, CalendarUtil.getDayOfWeek(menu.getDay())-2);
        menuJsonObj.put(MENU_KEY, KeyFactory.keyToString(menu.getKey()));
       
        JSONArray foodsJsonArr = new JSONArray();
        Iterator<Food> foodIter = menu.getFoods().iterator();
        while (foodIter.hasNext()) {
          Food food = foodIter.next();
         
          JSONObject foodJsonObj = new JSONObject();
          foodJsonObj.put(FOOD_TITLE, food.getTitle());
View Full Code Here

TOP

Related Classes of de.peacei.gae.foodsupplier.data.Menu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.