Search in sources :

Example 6 with DominioAprendizagem

use of com.tomasio.projects.trainning.model.DominioAprendizagem in project trainning by fernandotomasio.

the class HibernateNivelAprendizagemDAO method findAllDominiosAprendizagem.

@SuppressWarnings("unchecked")
@Override
public List<DominioAprendizagem> findAllDominiosAprendizagem() throws DAOException {
    Session session = sessionFactory.getCurrentSession();
    List<DominioAprendizagem> dominios;
    try {
        Criteria criteria = session.createCriteria(DominioAprendizagem.class);
        dominios = criteria.list();
        return dominios;
    } catch (HibernateException e) {
        Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, e);
        throw new DAOException(MessageHelper.getMessage("indicadores.find.unique.error"));
    }
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) HibernateException(org.hibernate.HibernateException) Criteria(org.hibernate.Criteria) DominioAprendizagem(com.tomasio.projects.trainning.model.DominioAprendizagem) Session(org.hibernate.Session)

Aggregations

DAOException (com.tomasio.projects.trainning.exception.DAOException)6 DominioAprendizagem (com.tomasio.projects.trainning.model.DominioAprendizagem)6 CoreException (com.tomasio.projects.trainning.exeption.CoreException)4 Transactional (org.springframework.transaction.annotation.Transactional)4 HibernateException (org.hibernate.HibernateException)2 Session (org.hibernate.Session)2 DominioAprendizagemDTO (com.tomasio.projects.trainning.dto.DominioAprendizagemDTO)1 Criteria (org.hibernate.Criteria)1