Class ResourceIndexedSearchParams
java.lang.Object
ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceIndexedSearchParams
empty()
Create an empty and immutable structure.extractCompositeStringUniquesValueChains
(String theResourceType, List<List<String>> thePartsChoices) This method is used to create a set of all possible combinations of parameters across a set of search parameters.void
findMissingSearchParams
(PartitionSettings thePartitionSettings, StorageSettings theStorageSettings, ResourceTable theEntity, ca.uhn.fhir.rest.server.util.ResourceSearchParams theActiveSearchParams) static boolean
isMatchSearchParam
(StorageSettings theStorageSettings, String theResourceName, String theParamName, BaseResourceIndexedSearchParam theIndexedSearchParam) boolean
matchParam
(StorageSettings theStorageSettings, String theResourceName, String theParamName, ca.uhn.fhir.context.RuntimeSearchParam theParamDef, ca.uhn.fhir.model.api.IQueryParameterType theValue) boolean
matchResourceLinks
(StorageSettings theStorageSettings, String theResourceName, String theParamName, ca.uhn.fhir.model.api.IQueryParameterType theParam, String theParamPath) boolean
matchResourceLinks
(StorageSettings theStorageSettings, String theResourceName, String theParamName, ca.uhn.fhir.model.api.IQueryParameterType theParam, List<String> theParamPaths) boolean
matchResourceLinks
(String theResourceName, String theParamName, ca.uhn.fhir.model.api.IQueryParameterType theParam, String theParamPath) Deprecated.Replace with the method belowvoid
void
toString()
void
updateSpnamePrefixForIndexOnUpliftedChain
(String theContainingType, String theSpnamePrefix) void
updateSpnamePrefixForLinksOnContainedResource
(String theSpNamePrefix) static ResourceIndexedSearchParams
withLists
(ResourceTable theResourceTable) Create a new instance that holds all the existing indexes in lists so that any duplicates are preserved.static ResourceIndexedSearchParams
withSets()
Create a new instance that uses Sets as the internal collection type in order to defend against duplicates.
-
Field Details
-
myStringParams
-
myTokenParams
-
myNumberParams
-
myQuantityParams
-
myQuantityNormalizedParams
-
myDateParams
-
myUriParams
-
myCoordsParams
-
myComboStringUniques
-
myComboTokenNonUnique
-
myLinks
-
mySearchParamPresentEntities
-
myCompositeParams
-
myPopulatedResourceLinkParameters
-
-
Constructor Details
-
ResourceIndexedSearchParams
Deprecated.Use a factory constructor insteadTODO: Remove this - Currently used by CDR though
-
-
Method Details
-
getResourceLinks
-
populateResourceTableSearchParamsPresentFlags
-
populateResourceTableParamCollections
-
updateSpnamePrefixForIndexOnUpliftedChain
public void updateSpnamePrefixForIndexOnUpliftedChain(String theContainingType, String theSpnamePrefix) -
updateSpnamePrefixForLinksOnContainedResource
-
getPopulatedResourceLinkParameters
-
matchParam
public boolean matchParam(StorageSettings theStorageSettings, String theResourceName, String theParamName, ca.uhn.fhir.context.RuntimeSearchParam theParamDef, ca.uhn.fhir.model.api.IQueryParameterType theValue) -
isMatchSearchParam
public static boolean isMatchSearchParam(StorageSettings theStorageSettings, String theResourceName, String theParamName, BaseResourceIndexedSearchParam theIndexedSearchParam) -
matchResourceLinks
@Deprecated public boolean matchResourceLinks(String theResourceName, String theParamName, ca.uhn.fhir.model.api.IQueryParameterType theParam, String theParamPath) Deprecated.Replace with the method below -
matchResourceLinks
public boolean matchResourceLinks(StorageSettings theStorageSettings, String theResourceName, String theParamName, ca.uhn.fhir.model.api.IQueryParameterType theParam, List<String> theParamPaths) -
matchResourceLinks
public boolean matchResourceLinks(StorageSettings theStorageSettings, String theResourceName, String theParamName, ca.uhn.fhir.model.api.IQueryParameterType theParam, String theParamPath) -
toString
-
findMissingSearchParams
public void findMissingSearchParams(PartitionSettings thePartitionSettings, StorageSettings theStorageSettings, ResourceTable theEntity, ca.uhn.fhir.rest.server.util.ResourceSearchParams theActiveSearchParams) -
extractCompositeStringUniquesValueChains
public static Set<String> extractCompositeStringUniquesValueChains(String theResourceType, List<List<String>> thePartsChoices) This method is used to create a set of all possible combinations of parameters across a set of search parameters. An example of why this is needed:Let's say we have a unique index on (Patient:gender AND Patient:name). Then we pass in
SMITH, John
with a gender ofmale
.In this case, because the name parameter matches both first and last name, we now need two unique indexes:
- Patient?gender=male&name=SMITH
- Patient?gender=male&name=JOHN
So this recursive algorithm calculates those
- Parameters:
theResourceType
- E.g.Patient
thePartsChoices
- E.g.[[gender=male], [name=SMITH, name=JOHN]]
-
withSets
Create a new instance that uses Sets as the internal collection type in order to defend against duplicates. This should be used when calculating the set of indexes for a resource that is about to be stored. -
empty
Create an empty and immutable structure. -
withLists
Create a new instance that holds all the existing indexes in lists so that any duplicates are preserved.
-