Пример #1
0
 @Override
 public void deleteMealFood(int userMealId) throws UnexpectedErrorException {
   try {
     mealFoodDao.delete(userMealId);
   } catch (DAOException e) {
     throw new UnexpectedErrorException();
   }
 }
Пример #2
0
 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();
   }
 }