This commit is contained in:
Athou
2013-04-09 11:50:21 +02:00
parent 7c3d299805
commit 71499b5ed0
5 changed files with 22 additions and 12 deletions

View File

@@ -13,6 +13,13 @@ import com.uaihebert.model.EasyCriteria;
@SuppressWarnings("serial")
public class FeedService extends GenericDAO<Feed> {
public List<Feed> findNextUpdatable(int count) {
EasyCriteria<Feed> criteria = createCriteria();
criteria.orderByAsc(MF.i(proxy().getLastUpdated()));
criteria.setMaxResults(count);
return criteria.getResultList();
}
public Feed findByUrl(String url) {
List<Feed> feeds = findByField(MF.i(proxy().getUrl()), url);
return Iterables.getFirst(feeds, null);