Examples of Recipe


Examples of org.springmodules.db4o.examples.recipemanager.domain.Recipe

      String idAsString = request.getParameter(RECIPE_ID_ATTRIBUTE);
      if (idAsString != null) {
        long id = Long.parseLong(idAsString);
        return recipeManager.getById(id);
      } else {
        return new Recipe("");
      }
    }
View Full Code Here

Examples of org.springmodules.db4o.examples.recipemanager.domain.Recipe

        return new Recipe("");
      }
    }
   
    protected ModelAndView onSubmit(Object command) throws Exception {
      Recipe r = (Recipe) command;
      recipeManager.saveRecipe(r);
   
      System.out.println("Saving recipe: " + r.getTitle());
     
    RedirectView view = new RedirectView(getSuccessView());
    view.addStaticAttribute(RECIPE_ID_ATTRIBUTE, Long.valueOf(recipeManager.getId(r)));
   
    System.out.println("Save recipe successfully. id=" + Long.valueOf(recipeManager.getId(r)));
View Full Code Here

Examples of ru.webcrafter.core.entities.Recipe

            ItemTemplate coal = service.getItemTemplate("Coal");
            if (coal == null) {
                coal = new ItemTemplate("Coal");
                service.addItemTemplate(coal);
            }
            Recipe makeWoodCoal = service.getRecipe("Coal");
            if (makeWoodCoal == null) {
                List<ItemTemplate> ingredients = new ArrayList<ItemTemplate>();
                ingredients.add(wood);
                ingredients.add(fire);
                makeWoodCoal = new Recipe("Coal", ingredients, coal);
                service.addRecipe(makeWoodCoal);
            }
            System.out.println(makeWoodCoal.getId());
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.