Escolar Documentos
Profissional Documentos
Cultura Documentos
throws Exception {
try {
Query query ;
query = em.createQuery("Update Categoria set nombre= '?1', descripcion=
'?2' WHERE sec_categoria = ?5");
query.setParameter(1, nombre);
query.setParameter(2, descripcion);
query.setParameter(5, idCategoria);
} catch (Exception e) {
throw e;
}
}
@Override
public void eliminarCategoria(int idCategoria) throws Exception {
try {
Query query ;
query = em.createQuery("Delete from Categoria e WHERE e.secCategoria
= ?5");
query.setParameter(5, idCategoria);
} catch (Exception e) {
throw e;
}
}