Interface IQuery<Y>

All Superinterfaces:
IBaseQuery<IQuery<Y>>, IClientExecutable<IQuery<Y>,Y>

public interface IQuery<Y> extends IBaseQuery<IQuery<Y>>, IClientExecutable<IQuery<Y>,Y>
  • Method Details

    • and

      IQuery<Y> and(ICriterion<?> theCriterion)
      Add a search parameter to the query.

      Note that this method is a synonym for IBaseQuery.where(ICriterion), and is only here to make fluent queries read more naturally.

      Specified by:
      and in interface IBaseQuery<Y>
    • count

      IQuery<Y> count(int theCount)
      Specifies the _count parameter, which indicates to the server how many resources should be returned on a single page.
      Since:
      1.4
    • offset

      IQuery<Y> offset(int theOffset)
      Specifies the _offset parameter, which indicates to the server the offset of the query. Use with count(int). This parameter is not part of the FHIR standard, all servers might not implement it.
      Since:
      5.2
    • include

      IQuery<Y> include(Include theInclude)
      Add an "_include" specification or an "_include:recurse" specification. If you are using a constant from one of the built-in structures you can select whether you want recursive behaviour by using the following syntax:
      • Recurse: .include(Patient.INCLUDE_ORGANIZATION.asRecursive())
      • No Recurse: .include(Patient.INCLUDE_ORGANIZATION.asNonRecursive())
    • lastUpdated

      IQuery<Y> lastUpdated(DateRangeParam theLastUpdated)
      Add a "_lastUpdated" specification
      Since:
      HAPI FHIR 1.1 - Note that option was added to FHIR itself in DSTU2
    • limitTo

      @Deprecated IQuery<Y> limitTo(int theLimitTo)
      Deprecated.
      This parameter is badly named, since FHIR calls this parameter "_count" and not "_limit". Use count(int) instead (it also sets the _count parameter)
      Specifies the _count parameter, which indicates to the server how many resources should be returned on a single page.
      See Also:
    • returnBundle

      <B extends IBaseBundle> IQuery<B> returnBundle(Class<B> theClass)
      Request that the client return the specified bundle type, e.g. org.hl7.fhir.dstu2.model.Bundle.class or ca.uhn.fhir.model.dstu2.resource.Bundle.class
    • totalMode

      Request that the server modify the response using the _total param THIS IS AN EXPERIMENTAL FEATURE - Use with caution, as it may be removed or modified in a future version.
    • revInclude

      IQuery<Y> revInclude(Include theIncludeTarget)
      Add a "_revinclude" specification
      Since:
      HAPI FHIR 1.0 - Note that option was added to FHIR itself in DSTU2
    • sort

      Adds a sort criteria
      See Also:
    • sort

      IQuery<Y> sort(SortSpec theSortSpec)
      Adds a sort using a SortSpec object
      See Also:
    • usingStyle

      Forces the query to perform the search using the given method (allowable methods are described in the FHIR Search Specification)

      This can be used to force the use of an HTTP POST instead of an HTTP GET

      Since:
      0.6
      See Also:
    • where

      IQuery<Y> where(ICriterion<?> theCriterion)
      Add a search parameter to the query.
      Specified by:
      where in interface IBaseQuery<Y>
    • withAnyProfile

      Matches any of the profiles given as argument. This would result in an OR search for resources matching one or more profiles. To do an AND search, make multiple calls to withProfile(String).
      Parameters:
      theProfileUris - The URIs of a given profile to search for resources which match.
    • withIdAndCompartment

      IQuery<Y> withIdAndCompartment(String theResourceId, String theCompartmentName)
    • withProfile

      IQuery<Y> withProfile(String theProfileUri)
      Match only resources where the resource has the given profile declaration. This parameter corresponds to the _profile URL parameter.
      Parameters:
      theProfileUri - The URI of a given profile to search for resources which match
    • withSecurity

      IQuery<Y> withSecurity(String theSystem, String theCode)
      Match only resources where the resource has the given security tag. This parameter corresponds to the _security URL parameter.
      Parameters:
      theSystem - The tag code system, or null to match any code system (this may not be supported on all servers)
      theCode - The tag code. Must not be null or empty.
    • withTag

      IQuery<Y> withTag(String theSystem, String theCode)
      Match only resources where the resource has the given tag. This parameter corresponds to the _tag URL parameter.
      Parameters:
      theSystem - The tag code system, or null to match any code system (this may not be supported on all servers)
      theCode - The tag code. Must not be null or empty.