@Override public void remove(Product entity) { if (entity == null) { throw new IllegalArgumentException("Product is null"); } if (!orderProductDAO.findByProduct(entity).isEmpty()) { throw new IllegalArgumentException("Cannot remove product, because is ordered by customer"); } productDAO.remove(entity); }