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