Skip to content

Instantly share code, notes, and snippets.

@fieldju
Created November 13, 2012 19:37
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 fieldju/4067880 to your computer and use it in GitHub Desktop.
Save fieldju/4067880 to your computer and use it in GitHub Desktop.
abstract scoped entity search for reviews that need to be published
public List<EditorialReview> getReviewsToBePublished() {
final AbstractScopedEntitySearch<EditorialReview> search =
new AbstractScopedEntitySearch<EditorialReview>() {
@Override
protected Class<EditorialReview> getType() {
return EditorialReview.class;
}
@Override
public String getQueryString() {
return "FROM EditorialReview" +
"WHERE publish status = 'PENDING'" +
"AND dontPublishBeforeDTTM < '" + new Date() +"'";
}
};
return foremanDao.find(search);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment