@Override
    public List<SymptomDTO> getAllSymptoms() throws SQLException {
        Session session = null;
        List<SymptomDTO> symptoms = new ArrayList<SymptomDTO>();
        try {
            session = HibernateUtil.getSessionFactory().openSession();
            symptoms = session.createCriteria(SymptomDTO.class).list();
        } catch (Exception e) {
            System.err.println("Error while getting all the symptoms!");
        } finally {
            if (session != null && session.isOpen()) {
                session.close();
            }
        }
        return symptoms;
    }