Class SearchCountQuery
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.domain.SearchQuery
-
- org.linuxforhealth.fhir.persistence.jdbc.domain.SearchCountQuery
-
public class SearchCountQuery extends SearchQuery
A domain model of the query used to count the number of resources matching a particular search context. The purpose of this class is to model the general structure of the query we need to perform the search, but not worry about the details of exactly which tables are required and how they should be joined. This abstraction lets us hide details of the schema from the complex search code. This also makes it easier to implement different queries and or join strategies if we find one thing works better than another. The new query builder avoids the DISTINCT clause (previously required because of duplicate parameter matches). Instead, parameters are matched using an EXISTS clause, which avoids any issues related to duplicates, and thus the DISTINCT is no longer needed.
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.persistence.jdbc.domain.SearchQuery
extensions, INCLUDE_RESOURCE_TYPE_ID
-
-
Constructor Summary
Constructors Constructor Description SearchCountQuery(java.lang.String rootResourceType)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getRoot(SearchQueryVisitor<T> visitor)
Process the logical query definition through the visitor-
Methods inherited from class org.linuxforhealth.fhir.persistence.jdbc.domain.SearchQuery
add, add, getRootResourceType, visit, visitExtensions, visitSearchParams
-
-
-
-
Method Detail
-
getRoot
public <T> T getRoot(SearchQueryVisitor<T> visitor)
Description copied from class:SearchQuery
Process the logical query definition through the visitor- Specified by:
getRoot
in classSearchQuery
- Returns:
-
-