add awareness of the pagination

This commit is contained in:
Andrea Bollini
2017-03-02 19:34:11 +01:00
committed by Terry W Brady
parent ea41259274
commit 52f284ea5a
2 changed files with 2 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ public class CollectionRestRepository extends DSpaceRestRepository<CollectionRes
int total = 0;
try {
total = cs.countTotal(context);
it = cs.findAll(context);
it = cs.findAll(context, pageable.getPageSize(), pageable.getOffset());
for (Collection c: it) {
collections.add(c);
}

View File

@@ -64,7 +64,7 @@ public class CommunityRestRepository extends DSpaceRestRepository<CommunityRest,
int total = 0;
try {
total = cs.countTotal(context);
it = cs.findAll(context);
it = cs.findAll(context, pageable.getPageSize(), pageable.getOffset());
for (Community c: it) {
communities.add(c);
}