mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 14:03:17 +00:00
port pr 1862
This commit is contained in:
@@ -244,6 +244,12 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
||||
return itemDAO.findAllByCollection(context, collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Item> findAllByCollection(Context context, Collection collection, Integer limit, Integer offset)
|
||||
throws SQLException {
|
||||
return itemDAO.findAllByCollection(context, collection, limit, offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Item> findInArchiveOrWithdrawnDiscoverableModifiedSince(Context context, Date since)
|
||||
throws SQLException {
|
||||
@@ -1161,6 +1167,12 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
return itemDAO.countItems(context, collection, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countAllItems(Context context, Collection collection) throws SQLException {
|
||||
return itemDAO.countItems(context, collection, true, false) + itemDAO.countItems(context, collection,
|
||||
false, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countItems(Context context, Community community) throws SQLException {
|
||||
// First we need a list of all collections under this community in the hierarchy
|
||||
@@ -1170,6 +1182,16 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
return itemDAO.countItems(context, collections, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countAllItems(Context context, Community community) throws SQLException {
|
||||
// First we need a list of all collections under this community in the hierarchy
|
||||
List<Collection> collections = communityService.getAllCollections(context, community);
|
||||
|
||||
// Now, lets count unique items across that list of collections
|
||||
return itemDAO.countItems(context, collections, true, false) + itemDAO.countItems(context, collections,
|
||||
false, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void getAuthoritiesAndConfidences(String fieldKey, Collection collection, List<String> values,
|
||||
List<String> authorities, List<Integer> confidences, int i) {
|
||||
|
Reference in New Issue
Block a user