
Package ca.uhn.fhir.jpa.searchparam
Class SearchParameterMap
java.lang.Object
ca.uhn.fhir.jpa.searchparam.SearchParameterMap
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructorSearchParameterMap(String theName, ca.uhn.fhir.model.api.IQueryParameterType theParam) Constructor -
Method Summary
Modifier and TypeMethodDescriptionaddInclude(ca.uhn.fhir.model.api.Include theInclude) Adds a list of parameters to the map, treating them as OR predicatesaddRevInclude(ca.uhn.fhir.model.api.Include theInclude) voidclean()clone()Creates and returns a copy of this mapbooleancontainsKey(String theName) entrySet()booleanList<ca.uhn.fhir.rest.api.SortSpec> getCount()Set<ca.uhn.fhir.model.api.Include> If set, tells the server the maximum number of observations to return for each observation code in the result set of a lastn operationca.uhn.fhir.rest.param.DateRangeParamReturns null if there is no last updated valueIf set, tells the server to load these results synchronously, and not to load more than X resultsca.uhn.fhir.rest.param.QuantityParamSet<ca.uhn.fhir.model.api.Include> ca.uhn.fhir.rest.api.SearchContainedModeEnumca.uhn.fhir.rest.api.SearchIncludeDeletedEnumca.uhn.fhir.rest.api.SearchTotalModeEnumca.uhn.fhir.rest.api.SortSpecgetSort()ca.uhn.fhir.rest.api.SummaryEnuminthashCode()booleanbooleanbooleanbooleanisEmpty()booleanisLastN()If set, tells the server to use an Elasticsearch query to generate a list of Resource IDs for the LastN operationbooleanIf set, tells the server to load these results synchronously, and not to load more than X resultsbooleanReturns true ifgetOffset()andgetCount()both return a non null responsebooleankeySet()static SearchParameterMapstatic SearchParameterMapnewSynchronous(String theName, ca.uhn.fhir.model.api.IQueryParameterType theParam) voidremoveByNameAndModifier(String theName, ca.uhn.fhir.rest.param.TokenParamModifier theModifier) removeByNameAndModifier(String theName, String theModifier) Given a search parameter name and modifier (e.g.removeByNameUnmodified(String theName) Variant of removeByNameAndModifier for unmodified params.removeByQualifier(ca.uhn.fhir.rest.param.TokenParamModifier theModifier) removeByQualifier(String theQualifier) For each search parameter in the map, extract any which have the given qualifier.setDeleteExpunge(boolean theDeleteExpunge) voidsetEverythingMode(SearchParameterMap.EverythingModeEnum theConsolidateMatches) voidsetIncludes(Set<ca.uhn.fhir.model.api.Include> theIncludes) setLastN(boolean theLastN) If set, tells the server to use an Elasticsearch query to generate a list of Resource IDs for the LastN operationsetLastNMax(Integer theLastNMax) If set, tells the server the maximum number of observations to return for each observation code in the result set of a lastn operationvoidsetLastUpdated(ca.uhn.fhir.rest.param.DateRangeParam theLastUpdated) setLoadSynchronous(boolean theLoadSynchronous) If set, tells the server to load these results synchronously, and not to load more than X resultssetLoadSynchronousUpTo(Integer theLoadSynchronousUpTo) If set, tells the server to load these results synchronously, and not to load more than X results.voidsetNearDistanceParam(ca.uhn.fhir.rest.param.QuantityParam theQuantityParam) voidvoidsetRevIncludes(Set<ca.uhn.fhir.model.api.Include> theRevIncludes) voidsetSearchContainedMode(ca.uhn.fhir.rest.api.SearchContainedModeEnum theSearchContainedMode) voidsetSearchIncludeDeletedMode(ca.uhn.fhir.rest.api.SearchIncludeDeletedEnum theSearchIncludeDeletedMode) voidsetSearchTotalMode(ca.uhn.fhir.rest.api.SearchTotalModeEnum theSearchTotalMode) setSort(ca.uhn.fhir.rest.api.SortSpec theSort) voidsetSummaryMode(ca.uhn.fhir.rest.api.SummaryEnum theSummaryMode) intsize()This method creates a URL query string representation of the parameters in this object, excluding the part before the parameters, e.g.toNormalizedQueryString(ca.uhn.fhir.context.FhirContext theCtx) Deprecated, for removal: This API element is subject to removal in a future version.toString()Collection<List<List<ca.uhn.fhir.model.api.IQueryParameterType>>> values()
-
Field Details
-
INTEGER_0
-
-
Constructor Details
-
SearchParameterMap
public SearchParameterMap()Constructor -
SearchParameterMap
Constructor
-
-
Method Details
-
clone
Creates and returns a copy of this map -
getSummaryMode
-
setSummaryMode
-
getSearchTotalMode
-
setSearchTotalMode
-
add
-
add
-
add
@Nonnull public SearchParameterMap add(@Nonnull String theName, @Nullable ca.uhn.fhir.model.api.IQueryParameterOr<?> theOr) -
addOrList
@Nonnull public SearchParameterMap addOrList(@Nonnull String theName, @Nullable List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theOrList) Adds a list of parameters to the map, treating them as OR predicates -
values
-
add
-
addInclude
-
addRevInclude
-
getCount
-
setCount
-
getOffset
-
setOffset
-
getEverythingMode
-
setEverythingMode
-
getIncludes
-
setIncludes
-
getLastUpdated
Returns null if there is no last updated value -
setLastUpdated
-
getLoadSynchronousUpTo
If set, tells the server to load these results synchronously, and not to load more than X results -
setLoadSynchronousUpTo
If set, tells the server to load these results synchronously, and not to load more than X results. Note that setting this to a value will also setsetLoadSynchronous(boolean)to true -
getRevIncludes
-
setRevIncludes
-
getSort
-
setSort
-
isLoadSynchronous
If set, tells the server to load these results synchronously, and not to load more than X results -
setLoadSynchronous
If set, tells the server to load these results synchronously, and not to load more than X results -
isLastN
If set, tells the server to use an Elasticsearch query to generate a list of Resource IDs for the LastN operation -
setLastN
If set, tells the server to use an Elasticsearch query to generate a list of Resource IDs for the LastN operation -
getLastNMax
If set, tells the server the maximum number of observations to return for each observation code in the result set of a lastn operation -
setLastNMax
If set, tells the server the maximum number of observations to return for each observation code in the result set of a lastn operation -
toNormalizedQueryString
@Deprecated(since="8.6.0", forRemoval=true) public String toNormalizedQueryString(ca.uhn.fhir.context.FhirContext theCtx) Deprecated, for removal: This API element is subject to removal in a future version.UsetoNormalizedQueryString()instead. -
toNormalizedQueryString
This method creates a URL query string representation of the parameters in this object, excluding the part before the parameters, e.g.?name=smith&_sort=Patient:familyThis method excludes the
_countparameter, as it doesn't affect the substance of the results returned -
hasIncludes
- Since:
- 5.5.0
-
hasRevIncludes
- Since:
- 6.2.0
-
toString
-
clean
-
getNearDistanceParam
-
setNearDistanceParam
-
isWantOnlyCount
-
isDeleteExpunge
-
setDeleteExpunge
-
get
-
put
-
containsKey
-
keySet
-
isEmpty
-
entrySet
-
remove
-
removeByNameUnmodified
Variant of removeByNameAndModifier for unmodified params.- Parameters:
theName- the query parameter key- Returns:
- an And/Or List of Query Parameters matching the name with no modifier.
-
removeByNameAndModifier
public List<List<ca.uhn.fhir.model.api.IQueryParameterType>> removeByNameAndModifier(String theName, String theModifier) Given a search parameter name and modifier (e.g. :text), get and remove all Search Parameters matching this name and modifier- Parameters:
theName- the query parameter keytheModifier- the qualifier you want to remove - nullable for unmodified params.- Returns:
- an And/Or List of Query Parameters matching the qualifier.
-
removeByNameAndModifier
public List<List<ca.uhn.fhir.model.api.IQueryParameterType>> removeByNameAndModifier(String theName, @Nonnull ca.uhn.fhir.rest.param.TokenParamModifier theModifier) -
removeByQualifier
public Map<String,List<List<ca.uhn.fhir.model.api.IQueryParameterType>>> removeByQualifier(String theQualifier) For each search parameter in the map, extract any which have the given qualifier. e.g. Take the url:Observation?code:text=abc&code=123&code:text=def&reason:text=somereasonIf we call this function with `:text`, it will return a map that looks like:
code -> [[code:text=abc], [code:text=def]] reason -> [[reason:text=somereason]]
and the remaining search parameters in the map will be:
code -> [[code=123]]
-
removeByQualifier
public Map<String,List<List<ca.uhn.fhir.model.api.IQueryParameterType>>> removeByQualifier(@Nonnull ca.uhn.fhir.rest.param.TokenParamModifier theModifier) -
size
-
getSearchContainedMode
-
setSearchContainedMode
public void setSearchContainedMode(ca.uhn.fhir.rest.api.SearchContainedModeEnum theSearchContainedMode) -
getSearchIncludeDeletedMode
-
setSearchIncludeDeletedMode
public void setSearchIncludeDeletedMode(ca.uhn.fhir.rest.api.SearchIncludeDeletedEnum theSearchIncludeDeletedMode) -
isOffsetQuery
Returns true ifgetOffset()andgetCount()both return a non null response- Since:
- 5.5.0
-
newSynchronous
-
newSynchronous
public static SearchParameterMap newSynchronous(String theName, ca.uhn.fhir.model.api.IQueryParameterType theParam) -
getAllChainsInOrder
-
equals
-
hashCode
-
toNormalizedQueryString()instead.