
Package ca.uhn.fhir.repository.impl
Class MultiMapRepositoryRestQueryBuilder
java.lang.Object
ca.uhn.fhir.repository.impl.MultiMapRepositoryRestQueryBuilder
- All Implemented Interfaces:
IRepositoryRestQueryBuilder
public class MultiMapRepositoryRestQueryBuilder
extends Object
implements IRepositoryRestQueryBuilder
This class provides a rest-query builder over a plain Multimap.
It is used to convert
IRepository.IRepositoryRestQueryContributor implementations
that are not Multimap-based so they can be used by IRepository implementations that are.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOrList(String theParamName, List<IQueryParameterType> theParameters) The main method for implementations to add a parameter to the query.static com.google.common.collect.Multimap<String, List<IQueryParameterType>> contributorToMultimap(IRepository.IRepositoryRestQueryContributor theSearchQueryBuilder) Converts aIRepository.IRepositoryRestQueryContributorto a Multimap.toFlatMap(IRepository.IRepositoryRestQueryContributor searchParameterMap) com.google.common.collect.Multimap<String, List<IQueryParameterType>> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.repository.IRepositoryRestQueryBuilder
addAll, addAll, addNumericParameter, addOrList
-
Constructor Details
-
MultiMapRepositoryRestQueryBuilder
public MultiMapRepositoryRestQueryBuilder()
-
-
Method Details
-
toFlatMap
@Nonnull public static Map<String,String[]> toFlatMap(IRepository.IRepositoryRestQueryContributor searchParameterMap) -
addOrList
public IRepositoryRestQueryBuilder addOrList(String theParamName, List<IQueryParameterType> theParameters) Description copied from interface:IRepositoryRestQueryBuilderThe main method for implementations to add a parameter to the query.- Specified by:
addOrListin interfaceIRepositoryRestQueryBuilder- Parameters:
theParamName- the search parameter name, without modifiers. E.g. "name", or "_sort"theParameters- a list of parameters - this is the comma-separated list after the "=" in a rest query.- Returns:
- this for chaining
-
toMultiMap
-
contributorToMultimap
public static com.google.common.collect.Multimap<String,List<IQueryParameterType>> contributorToMultimap(IRepository.IRepositoryRestQueryContributor theSearchQueryBuilder) Converts aIRepository.IRepositoryRestQueryContributorto a Multimap.- Parameters:
theSearchQueryBuilder- the contributor to convert- Returns:
- a Multimap containing the search parameters contributed by the contributor
-