Details
-
Sub-task
-
Status: Closed
-
Must
-
Resolution: Fixed
-
None
-
None
-
Medium
-
Soldevelo Sprint 1
Description
ConceptService.getCountOfConcepts calls getConcepts and returns the size of the list. It results in fetching all matching concepts from DB and instantiating objects. Instead it should call a new method ConceptDAO.getCountOfConcepts which will request getResultSize() on a lucene query from HibernateConceptDAO.getConcepts. This way we will not hit the DB to get result size.
Note that you need to refactor HibernateConceptDAO.getConcepts and extract constructing lucene query to a new method so that you can use it in getCountOfConcepts.