public <T> Integer save(T obj) throws DaoException {
        try {
            return (Integer) sessionFactory.getCurrentSession().save(obj);
        } catch (HibernateException e) {
            throw new DaoException();
        }

    }