mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
store only 10 entries for new users
This commit is contained in:
@@ -25,10 +25,13 @@ public class FeedService extends GenericDAO<Feed> {
|
||||
return Iterables.getFirst(feeds, null);
|
||||
}
|
||||
|
||||
public Feed getByIdWithEntries(Long feedId) {
|
||||
public Feed getByIdWithEntries(Long feedId, int offset, int limit) {
|
||||
EasyCriteria<Feed> criteria = createCriteria();
|
||||
criteria.andEquals(MF.i(proxy().getId()), feedId);
|
||||
criteria.leftJoinFetch(MF.i(proxy().getEntries()));
|
||||
|
||||
criteria.setFirstResult(offset);
|
||||
criteria.setMaxResults(limit);
|
||||
return criteria.getSingleResult();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user