moved methods around

This commit is contained in:
Athou
2013-07-25 11:02:49 +02:00
parent d293e972f2
commit 00159ce1c5
4 changed files with 28 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package com.commafeed.backend;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -12,6 +13,7 @@ import org.slf4j.LoggerFactory;
import com.commafeed.backend.dao.FeedDAO;
import com.commafeed.backend.dao.FeedEntryContentDAO;
import com.commafeed.backend.dao.FeedEntryDAO;
import com.commafeed.backend.dao.FeedEntryStatusDAO;
import com.commafeed.backend.dao.FeedSubscriptionDAO;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedSubscription;
@@ -33,6 +35,9 @@ public class DatabaseCleaner {
@Inject
FeedEntryContentDAO feedEntryContentDAO;
@Inject
FeedEntryStatusDAO feedEntryStatusDAO;
@Inject
ApplicationSettingsService applicationSettingsService;
@@ -92,4 +97,10 @@ public class DatabaseCleaner {
}
feedDAO.saveOrUpdate(into);
}
public void cleanStatusesOlderThan(Date olderThan) {
log.info("cleaning old read statuses");
int deleted = feedEntryStatusDAO.deleteOldStatuses(olderThan);
log.info("cleaned {} read statuses", deleted);
}
}