Search in sources :

Example 6 with CertificadoConclusao

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

the class HibernateCertificadoConclusaoDAO method remove.

@Override
public void remove(Long certificadoConclusaoId) throws DAOException {
    Session session = sessionFactory.getCurrentSession();
    CertificadoConclusao certificadoConclusao = (CertificadoConclusao) session.get(CertificadoConclusao.class, certificadoConclusaoId);
    try {
        session.delete(certificadoConclusao);
    } catch (HibernateException e) {
        Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, e);
        throw new DAOException(MessageHelper.getMessage("certificadoConclusao.remove.error"));
    }
}
Also used : DAOException(com.tomasio.projects.trainning.exception.DAOException) CertificadoConclusao(com.tomasio.projects.trainning.model.CertificadoConclusao) HibernateException(org.hibernate.HibernateException) Session(org.hibernate.Session)

Aggregations

DAOException (com.tomasio.projects.trainning.exception.DAOException)6 CertificadoConclusao (com.tomasio.projects.trainning.model.CertificadoConclusao)6 HibernateException (org.hibernate.HibernateException)4 Session (org.hibernate.Session)4 Conclusao (com.tomasio.projects.trainning.model.Conclusao)3 ArrayList (java.util.ArrayList)3 CertificadoConclusaoDAO (com.tomasio.projects.trainning.dao.CertificadoConclusaoDAO)2 CoreException (com.tomasio.projects.trainning.exeption.CoreException)2 ParseException (java.text.ParseException)2 Transactional (org.springframework.transaction.annotation.Transactional)2 CertificadoConclusaoDTO (com.tomasio.projects.trainning.dto.CertificadoConclusaoDTO)1