@Override public UserMeal update(UserMeal meal, int userId) { return ExceptionUtil.check(repository.save(meal, userId), meal.getId()); }
@Override public UserMeal save(UserMeal meal, int userId) { return repository.save(meal, userId); }
@Override public void deleteAll(int userId) { repository.deleteAll(userId); }
@Override public List<UserMeal> getAll(int userId) { return repository.getAll(userId); }
@Override public List<UserMeal> getBetween(LocalDateTime startDate, LocalDateTime endDate, int userId) { return repository.getBetween( startDate, StringUtils.isEmpty(endDate) ? LocalDateTime.now() : endDate, userId); }
@Override public void delete(int id, int userId) { ExceptionUtil.check(repository.delete(id, userId), id); }
@Override public UserMeal get(int id, int userId) { return ExceptionUtil.check(repository.get(id, userId), id); }