@Override public void deleteMealFood(int userMealId) throws UnexpectedErrorException { try { mealFoodDao.delete(userMealId); } catch (DAOException e) { throw new UnexpectedErrorException(); } }
private void insert(List<Food> foodList, int userMealId, List<MealFood> mealFoodList) throws UnexpectedErrorException { try { for (Food food : foodList) { mealFoodList.add(mealFoodDao.add(userMealId, food.getId())); } } catch (DAOException e) { throw new UnexpectedErrorException(); } }