Package org.ocobo.dao

Examples of org.ocobo.dao.RecipeException


  public Recipe loadRecipe(int id) throws RecipeException {
    try {
      return (Recipe) getJpaTemplate().find(Recipe.class, id);
    }
    catch (DataAccessException ex) {
      throw new RecipeException(id, "Error loading the recipe.", ex);
    }
  }
View Full Code Here


    try {
      getJpaTemplate().persist(recipe);
      return recipe;
    }
    catch (DataAccessException ex) {
      throw new RecipeException(recipe.getId(), "Error saving the recipe.", ex);
    }
  }
View Full Code Here

    try {
      final Recipe recipe = loadRecipe(id);
      return removeRecipe(recipe);
    }
    catch (DataAccessException ex) {
      throw new RecipeException(id, "Error removing the recipe.", ex);
    }
  }
View Full Code Here

    try {
      getJpaTemplate().remove(recipe);
      return recipe;
    }
    catch (DataAccessException ex) {
      throw new RecipeException(recipe.getId(), "Error removing the recipe.", ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.ocobo.dao.RecipeException

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.