Skip to content

Instantly share code, notes, and snippets.

@caina
Last active June 29, 2018 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caina/c32286f78b4026132cb115368ead0874 to your computer and use it in GitHub Desktop.
Save caina/c32286f78b4026132cb115368ead0874 to your computer and use it in GitHub Desktop.
public News saveNews(News news) {
news.publishedAt = convertToDate(news.publishedAt);
orm.save(news);
}
private Timestamp convertToDate(String date) {
if(date == null) {
return null;
}
[.<implementation>.]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment