Created
November 13, 2012 19:37
-
-
Save fieldju/4067880 to your computer and use it in GitHub Desktop.
abstract scoped entity search for reviews that need to be published
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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