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