public void deleteItems(List<Integer> numbers, List<Product> products) { EntityTransaction tx = null; int cntr = 0; for (Integer anInt : numbers) { Product anProduct = products.get(anInt); this.deleteKey(anProduct.getId()); cntr++; } System.out.println("" + cntr + " products deleted"); }
public void delete(Product product) { EntityTransaction tx = null; this.deleteKey(product.getId()); }