mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 10:34:25 +00:00
Refactor ItemCounter and ItemCountDAO to act like other DSpace beans. Also ensure they do not cache a Context object.
This commit is contained in:
@@ -28,7 +28,6 @@ import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.Transient;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.browse.ItemCountException;
|
||||
import org.dspace.content.comparator.NameAscendingComparator;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.content.service.CollectionService;
|
||||
@@ -335,18 +334,4 @@ public class Collection extends CacheableDSpaceObject implements DSpaceObjectLeg
|
||||
}
|
||||
return collectionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* return count of the collection items
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public int countArchivedItems() {
|
||||
try {
|
||||
return collectionService.countArchivedItems(this);
|
||||
} catch (ItemCountException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user