forked from Archives/Athou_commafeed
unused method
This commit is contained in:
@@ -11,9 +11,7 @@ import org.hibernate.SessionFactory;
|
||||
|
||||
import com.commafeed.backend.model.Feed;
|
||||
import com.commafeed.backend.model.FeedEntry;
|
||||
import com.commafeed.backend.model.QFeed;
|
||||
import com.commafeed.backend.model.QFeedEntry;
|
||||
import com.commafeed.backend.model.QFeedSubscription;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
@Singleton
|
||||
@@ -32,13 +30,6 @@ public class FeedEntryDAO extends GenericDAO<FeedEntry> {
|
||||
return Iterables.getFirst(list, null);
|
||||
}
|
||||
|
||||
public List<FeedEntry> findWithoutSubscriptions(int max) {
|
||||
QFeed feed = QFeed.feed;
|
||||
QFeedSubscription sub = QFeedSubscription.feedSubscription;
|
||||
return newQuery().from(entry).join(entry.feed, feed).leftJoin(feed.subscriptions, sub).where(sub.id.isNull()).limit(max)
|
||||
.list(entry);
|
||||
}
|
||||
|
||||
public int delete(Date olderThan, int max) {
|
||||
List<FeedEntry> list = newQuery().from(entry).where(entry.inserted.lt(olderThan)).limit(max).list(entry);
|
||||
int deleted = list.size();
|
||||
|
||||
Reference in New Issue
Block a user