use of com.tomasio.projects.trainning.model.CapituloApostila in project trainning by fernandotomasio.
the class HibernateCapituloApostilaDAO method remove.
@Override
public void remove(Long id) throws DAOException {
Session session = sessionFactory.getCurrentSession();
CapituloApostila capitulo = (CapituloApostila) session.get(CapituloApostila.class, id);
try {
session.delete(capitulo);
} catch (HibernateException e) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, e);
throw new DAOException(MessageHelper.getMessage("capitulos.remove.error"));
}
}
Aggregations