Skip to content

Instantly share code, notes, and snippets.

@richardgrantserverless
Created April 11, 2022 22:11
Show Gist options
  • Save richardgrantserverless/b272a8f5cd5cf6dc56a45fdf2987b2f5 to your computer and use it in GitHub Desktop.
Save richardgrantserverless/b272a8f5cd5cf6dc56a45fdf2987b2f5 to your computer and use it in GitHub Desktop.
public Boolean delete(String id) throws IOException {
Product product = null;
// get product if exists
product = get(id);
if (product != null) {
logger.info("Products - delete(): " + product.toString());
this.mapper.delete(product);
} else {
logger.info("Products - delete(): product - does not exist.");
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment