Package ca.cdr.api.fhirgw.model
Class BundleResultsAccumulator
java.lang.Object
ca.cdr.api.fhirgw.model.BundleResultsAccumulator
- All Implemented Interfaces:
IResultsAccumulator<SearchSingleTargetResponse>
,ISearchResultsAccumulator
public class BundleResultsAccumulator
extends Object
implements IResultsAccumulator<SearchSingleTargetResponse>
This class is used to collect the search results as they are fetched from
individual targets from the gateway.
An instance is created for each set of request sent from the gateway to target servers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accumulate
(List<IBaseResource> theResults, SearchSingleTargetResponse theResponse, String theId) Accumulates a list of resources that was originally obtained from the RESPONSE and processed by interceptors if applicable.void
addResults
(String theTargetId, List<IBaseResource> theSearchResults, int theTotal) getIncludeResults
(String theTargetId) getMatchedResults
(String theTargetId) getOutcomeResults
(String theTargetId) getPageableResults
(String theTargetId) getResults
(String theTargetId) int
getTotal()
boolean
getUncategorizedResults
(String theTargetId) void
removeResults
(String theTargetId, List<IBaseResource> theResultsToBeRemoved) void
setTotalOmitted
(boolean theTotalOmitted)
-
Constructor Details
-
BundleResultsAccumulator
-
-
Method Details
-
addResults
- Specified by:
addResults
in interfaceISearchResultsAccumulator
-
getResults
- Specified by:
getResults
in interfaceISearchResultsAccumulator
-
getPageableResults
- Specified by:
getPageableResults
in interfaceISearchResultsAccumulator
-
getMatchedResults
- Specified by:
getMatchedResults
in interfaceISearchResultsAccumulator
-
getIncludeResults
- Specified by:
getIncludeResults
in interfaceISearchResultsAccumulator
-
getOutcomeResults
- Specified by:
getOutcomeResults
in interfaceISearchResultsAccumulator
-
getUncategorizedResults
- Specified by:
getUncategorizedResults
in interfaceISearchResultsAccumulator
-
removeResults
- Specified by:
removeResults
in interfaceISearchResultsAccumulator
-
getTotal
- Specified by:
getTotal
in interfaceISearchResultsAccumulator
-
getTotalOmitted
- Specified by:
getTotalOmitted
in interfaceISearchResultsAccumulator
-
setTotalOmitted
- Specified by:
setTotalOmitted
in interfaceISearchResultsAccumulator
-
accumulate
public void accumulate(List<IBaseResource> theResults, SearchSingleTargetResponse theResponse, String theId) Description copied from interface:IResultsAccumulator
Accumulates a list of resources that was originally obtained from the RESPONSE and processed by interceptors if applicable.- Specified by:
accumulate
in interfaceIResultsAccumulator<SearchSingleTargetResponse>
- Parameters:
theResults
- the list of resources to accumulatetheResponse
- the original response from which a list of resources was obtained and submitted to interceptorstheId
- the id of the target that returned the RESPONSE
-