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