use of com.tomasio.projects.trainning.model.ObjetivoDisciplina in project trainning by fernandotomasio.
the class HibernateObjetivoDisciplinaDAO method remove.
@Override
public void remove(Long id) throws DAOException {
Session session = sessionFactory.getCurrentSession();
try {
ObjetivoDisciplina objetivo = (ObjetivoDisciplina) session.get(ObjetivoDisciplina.class, id);
session.delete(objetivo);
} catch (HibernateException e) {
Logger.getLogger(HibernateObjetivoDisciplinaDAO.class.getName()).log(Level.SEVERE, null, e);
throw new DAOException("Erro ao remover ObjetivoDisciplina!");
}
}
Aggregations