Class InMemoryResourceMatcher

java.lang.Object
ca.uhn.fhir.jpa.searchparam.matcher.InMemoryResourceMatcher

public class InMemoryResourceMatcher extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • match

      @Deprecated public InMemoryMatchResult match(String theCriteria, org.hl7.fhir.instance.model.api.IBaseResource theResource, @Nullable ResourceIndexedSearchParams theIndexedSearchParams)
    • match

      public InMemoryMatchResult match(String theCriteria, org.hl7.fhir.instance.model.api.IBaseResource theResource, @Nullable ResourceIndexedSearchParams theIndexedSearchParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
      This method is called in two different scenarios. With a null theResource, it determines whether database matching might be required. Otherwise, it tries to perform the match in-memory, returning UNSUPPORTED if it's not possible.

      Note that there will be cases where it returns UNSUPPORTED with a null resource, but when a non-null resource it returns supported and no match. This is because an earlier parameter may be matchable in-memory in which case processing stops and we never get to the parameter that would have required a database call.

      Parameters:
      theIndexedSearchParams - If the search params have already been calculated for the given resource, they can be passed in. Passing in null is also fine, in which case they will be calculated for the resource. It can be preferable to pass in null unless you already actually had to calculate the indexes for another reason, since we can be efficient here and only calculate the params that are actually relevant for the given search expression.
    • canBeEvaluatedInMemory

      Parameters:
      theCriteria -
      Returns:
      result.supported() will be true if theCriteria can be evaluated in-memory
    • canBeEvaluatedInMemory

      public InMemoryMatchResult canBeEvaluatedInMemory(SearchParameterMap theSearchParameterMap, ca.uhn.fhir.context.RuntimeResourceDefinition theResourceDefinition)
      Parameters:
      theSearchParameterMap -
      theResourceDefinition -
      Returns:
      result.supported() will be true if theSearchParameterMap can be evaluated in-memory
    • match

      @Nonnull public InMemoryMatchResult match(SearchParameterMap theSearchParameterMap, org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.context.RuntimeResourceDefinition theResourceDefinition, ResourceIndexedSearchParams theSearchParams)