public void editMeal(long id, String newName, double newCalories, double newProtein) {
        SimpleMealDaoImpl dao = getSimpleMealDaoImpl();
        Session session = null;
        Transaction tx = null;

        try {
            session = HbUtil.getSession();
            //TRANSACTION START
            tx = session.beginTransaction();

            SimpleMeal mealToEdit = dao.getSimpleMeal(id);
            mealToEdit.setName(newName);
            mealToEdit.setCalories(newCalories);
            mealToEdit.setProtein(newProtein);

            tx.commit();
            //TRANSACTION END
            //SESSION CLOSE
        } catch (RuntimeException e) {
            if (tx != null) {
                tx.rollback();
            }
            throw e;
        } finally {
            if (session != null && session.isOpen()) {
                session.close();
            }
        }

    }