@Override public void update(Article article) { Article a1 = em.find(Article.class, article.getReference()); a1.setPrix(article.getPrix()); a1.setQuantite(article.getQuantite()); a1.setTva(article.getTva()); a1.setLibelle(article.getLibelle()); em.persist(a1); }
@Override public void delete(Article article) { if (em.find(Article.class, article.getReference()) != null) em.remove(em.find(Article.class, article.getReference())); }