mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 14:03:17 +00:00
Remove unused function findAllCollectionsByEntityType of CollectionService
This commit is contained in:
@@ -1109,26 +1109,6 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
|
|||||||
return (int) resp.getTotalSearchResults();
|
return (int) resp.getTotalSearchResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
public List<Collection> findAllCollectionsByEntityType(Context context, String entityType)
|
|
||||||
throws SearchServiceException {
|
|
||||||
List<Collection> collectionList = new ArrayList<>();
|
|
||||||
|
|
||||||
DiscoverQuery discoverQuery = new DiscoverQuery();
|
|
||||||
discoverQuery.setDSpaceObjectFilter(IndexableCollection.TYPE);
|
|
||||||
discoverQuery.addFilterQueries("dspace.entity.type:" + entityType);
|
|
||||||
|
|
||||||
DiscoverResult discoverResult = searchService.search(context, discoverQuery);
|
|
||||||
List<IndexableObject> solrIndexableObjects = discoverResult.getIndexableObjects();
|
|
||||||
|
|
||||||
for (IndexableObject solrCollection : solrIndexableObjects) {
|
|
||||||
Collection c = ((IndexableCollection) solrCollection).getIndexedObject();
|
|
||||||
collectionList.add(c);
|
|
||||||
}
|
|
||||||
return collectionList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns total collection archived items
|
* Returns total collection archived items
|
||||||
*
|
*
|
||||||
|
@@ -484,21 +484,6 @@ public interface CollectionService
|
|||||||
public int countCollectionsWithSubmit(String q, Context context, Community community, String entityType)
|
public int countCollectionsWithSubmit(String q, Context context, Community community, String entityType)
|
||||||
throws SQLException, SearchServiceException;
|
throws SQLException, SearchServiceException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of all collections for a specific entity type.
|
|
||||||
* NOTE: for better performance, this method retrieves its results from an index (cache)
|
|
||||||
* and does not query the database directly.
|
|
||||||
* This means that results may be stale or outdated until
|
|
||||||
* https://github.com/DSpace/DSpace/issues/2853 is resolved."
|
|
||||||
*
|
|
||||||
* @param context DSpace Context
|
|
||||||
* @param entityType limit the returned collection to those related to given entity type
|
|
||||||
* @return list of collections found
|
|
||||||
* @throws SearchServiceException if search error
|
|
||||||
*/
|
|
||||||
public List<Collection> findAllCollectionsByEntityType(Context context, String entityType)
|
|
||||||
throws SearchServiceException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns total collection archived items
|
* Returns total collection archived items
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user