query.join(feed.subscriptions, subs).join(subs.user, user).where(disabledDatePredicate, user.lastLogin.gt(lastLoginThreshold));
} else {
query.where(disabledDatePredicate);
}
return query.orderBy(feed.disabledUntil.asc()).limit(count).distinct().list(feed);
}
public Feed findByUrl(String normalizedUrl) {
List<Feed> feeds = newQuery().from(feed).where(feed.normalizedUrlHash.eq(DigestUtils.sha1Hex(normalizedUrl))).list(feed);
Feed feed = Iterables.getFirst(feeds, null);