mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
return count only (fixes #18)
This commit is contained in:
@@ -112,6 +112,14 @@ public class FeedEntryService extends GenericDAO<FeedEntry> {
|
||||
return buildList(query.getResultList());
|
||||
}
|
||||
|
||||
public Long getUnreadCount(Feed feed, User user) {
|
||||
TypedQuery<Long> query = em.createNamedQuery("Entry.unreadByFeedCount",
|
||||
Long.class);
|
||||
query.setParameter("feed", feed);
|
||||
query.setParameter("userId", user.getId());
|
||||
return query.getSingleResult();
|
||||
}
|
||||
|
||||
public List<FeedEntryWithStatus> getEntries(Feed feed, User user,
|
||||
boolean unreadOnly) {
|
||||
return getEntries(feed, user, unreadOnly, -1, -1);
|
||||
|
||||
Reference in New Issue
Block a user