public void removeBlogPost(@Named("id") Long id, User user) throws OAuthRequestException, NotFoundException {
if (user != null) {
BlogPost deletedBp = ofy().load().type(BlogPost.class).id(id).get();
if (deletedBp == null) {
throw new NotFoundException("No entity with the id " + id + " exists.");
}
BlogPostContent deletedBpc = ofy().load().type(BlogPostContent.class).id(id).get();
if (deletedBpc == null) {
throw new NotFoundException("No entity with the id " + id + " exists.");
}
ofy().delete().entity(deletedBp);
ofy().delete().entity(deletedBpc);
} else {
throw new OAuthRequestException("Invalid user.");