Class InMemoryResourceMatcher

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

public class InMemoryResourceMatcher extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • match

      public InMemoryMatchResult match(String theCriteria, org.hl7.fhir.instance.model.api.IBaseResource theResource, ResourceIndexedSearchParams theSearchParams)
      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.

    • 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)