Package adios.model

Examples of adios.model.Recipe


          Log.info("user/anadirReceta/{step}.html");
          String ingName = request.getParameter("name");
          String ingUnit = request.getParameter("unit");
          String ingQuantity = request.getParameter("quantity");
          try{
            Recipe r = (Recipe)request.getSession().getAttribute("recipe");
            Ingredient4Recipe i = new Ingredient4Recipe();
            i.setQuantity(Integer.parseInt(ingQuantity));
            i.setName(ingName);
            i.setRecipeId(r.getRecipeId());
            i.setUnit(ingUnit);
           
            ingredientService.addIngredient(i);
           
            request.getSession().setAttribute("recipe", r);
View Full Code Here


     * @return
     */
    @Transactional
    public boolean update(Recipe r){
      String imageName = this.createImageName(r.getName(),r.getUserId());
        Recipe recipeDB = em.find(Recipe.class, r.getRecipeId());
        recipeDB.setInstructions(r.getInstructions());
        recipeDB.setName(r.getName());
        recipeDB.setDescription(r.getDescription());
        recipeDB.setExternalMedia(r.getExternalMedia());
        recipeDB.setImageName(imageName);
        em.persist(recipeDB);
  return true;
     
    }
View Full Code Here

TOP

Related Classes of adios.model.Recipe

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.