package org.lanyonm.grabbag.persistence; import java.util.HashMap; import java.util.List; import org.lanyonm.grabbag.domain.Ingredient; import org.lanyonm.grabbag.domain.Recipe; /** * Mybatis mappers are autogenerated. Put any special sauce in the service layer. * * @author lanyonm */ public interface RecipeMapper { public List<Recipe> getAllRecipes(); public Recipe getRecipe(int id); public List<Recipe> getRecipeWithIngredient(Ingredient ingredient); public int updateRecipe(Recipe recipe); public int updateRecipeIngredient(HashMap<String, Object> params); /** * This method will update the recipe's id with the generated id. * * @param recipe * @return the number of affected rows */ public int insertRecipe(Recipe recipe); public int insertRecipeIngredient(HashMap<String, Object> params); public int deleteRecipe(Recipe recipe); public boolean deleteRecipeIngredient(HashMap<String, Integer> params); }