@Override
    public IllnessDTO getIllnessById(Long id) throws SQLException {
        Session session = null;
        IllnessDTO illness = null;
        try {
            session = HibernateUtil.getSessionFactory().openSession();
            illness = (IllnessDTO) session.load(IllnessDTO.class, id);
        } catch (Exception e) {
            System.err.println("Error while getting illness!");
        } finally {
            if (session != null && session.isOpen()) {
                session.close();
            }
        }
        return illness;
    }