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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulate(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.voidaddResults(String theTargetId, List<IBaseResource> theSearchResults, int theTotal) getIncludeResults(String theTargetId) getMatchedResults(String theTargetId) getOutcomeResults(String theTargetId) getPageableResults(String theTargetId) getResults(String theTargetId) intgetTotal()booleangetUncategorizedResults(String theTargetId) voidremoveResults(String theTargetId, List<IBaseResource> theResultsToBeRemoved) voidsetTotalOmitted(boolean theTotalOmitted)
-
Constructor Details
-
BundleResultsAccumulator
-
-
Method Details
-
addResults
- Specified by:
addResultsin interfaceISearchResultsAccumulator
-
getResults
- Specified by:
getResultsin interfaceISearchResultsAccumulator
-
getPageableResults
- Specified by:
getPageableResultsin interfaceISearchResultsAccumulator
-
getMatchedResults
- Specified by:
getMatchedResultsin interfaceISearchResultsAccumulator
-
getIncludeResults
- Specified by:
getIncludeResultsin interfaceISearchResultsAccumulator
-
getOutcomeResults
- Specified by:
getOutcomeResultsin interfaceISearchResultsAccumulator
-
getUncategorizedResults
- Specified by:
getUncategorizedResultsin interfaceISearchResultsAccumulator
-
removeResults
- Specified by:
removeResultsin interfaceISearchResultsAccumulator
-
getTotal
- Specified by:
getTotalin interfaceISearchResultsAccumulator
-
getTotalOmitted
- Specified by:
getTotalOmittedin interfaceISearchResultsAccumulator
-
setTotalOmitted
- Specified by:
setTotalOmittedin interfaceISearchResultsAccumulator
-
accumulate
public void accumulate(List<IBaseResource> theResults, SearchSingleTargetResponse theResponse, String theId) Description copied from interface:IResultsAccumulatorAccumulates a list of resources that was originally obtained from the RESPONSE and processed by interceptors if applicable.- Specified by:
accumulatein 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
-