Package ca.uhn.fhir.rest.gclient
Interface IQuery<Y>
- All Superinterfaces:
IBaseQuery<IQuery<Y>>
,IClientExecutable<IQuery<Y>,
Y>
-
Method Summary
Modifier and TypeMethodDescriptionand
(ICriterion<?> theCriterion) Add a search parameter to the query.count
(int theCount) Specifies the_count
parameter, which indicates to the server how many resources should be returned on a single page.Add an "_include" specification or an "_include:recurse" specification.lastUpdated
(DateRangeParam theLastUpdated) Add a "_lastUpdated" specificationlimitTo
(int theLimitTo) Deprecated.This parameter is badly named, since FHIR calls this parameter "_count" and not "_limit".offset
(int theOffset) Specifies the_offset
parameter, which indicates to the server the offset of the query.<B extends IBaseBundle>
IQuery<B> returnBundle
(Class<B> theClass) Request that the client return the specified bundle type, e.g.revInclude
(Include theIncludeTarget) Add a "_revinclude" specificationsort()
Adds a sort criteriaAdds a sort using aSortSpec
objecttotalMode
(SearchTotalModeEnum theTotalMode) 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.usingStyle
(SearchStyleEnum theStyle) Forces the query to perform the search using the given method (allowable methods are described in the FHIR Search Specification)where
(ICriterion<?> theCriterion) Add a search parameter to the query.withAnyProfile
(Collection<String> theProfileUris) Matches any of the profiles given as argument.withIdAndCompartment
(String theResourceId, String theCompartmentName) withProfile
(String theProfileUri) Match only resources where the resource has the given profile declaration.withSecurity
(String theSystem, String theCode) Match only resources where the resource has the given security tag.Match only resources where the resource has the given tag.Methods inherited from interface ca.uhn.fhir.rest.gclient.IBaseQuery
where, whereMap
Methods inherited from interface ca.uhn.fhir.rest.gclient.IClientExecutable
accept, andLogRequestAndResponse, cacheControl, elementsSubset, encoded, encodedJson, encodedXml, execute, preferResponseType, preferResponseTypes, prettyPrint, summaryMode, withAdditionalHeader
-
Method Details
-
and
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 interfaceIBaseQuery<Y>
-
count
Specifies the_count
parameter, which indicates to the server how many resources should be returned on a single page.- Since:
- 1.4
-
offset
Specifies the_offset
parameter, which indicates to the server the offset of the query. Use withcount(int)
. This parameter is not part of the FHIR standard, all servers might not implement it.- Since:
- 5.2
-
include
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())
- Recurse:
-
lastUpdated
Add a "_lastUpdated" specification- Since:
- HAPI FHIR 1.1 - Note that option was added to FHIR itself in DSTU2
-
limitTo
Deprecated.This parameter is badly named, since FHIR calls this parameter "_count" and not "_limit". Usecount(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
Request that the client return the specified bundle type, e.g.org.hl7.fhir.dstu2.model.Bundle.class
orca.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
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
Adds a sort using aSortSpec
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
Add a search parameter to the query.- Specified by:
where
in interfaceIBaseQuery<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 towithProfile(String)
.- Parameters:
theProfileUris
- The URIs of a given profile to search for resources which match.
-
withIdAndCompartment
-
withProfile
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
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, ornull
to match any code system (this may not be supported on all servers)theCode
- The tag code. Must not benull
or empty.
-
withTag
Match only resources where the resource has the given tag. This parameter corresponds to the_tag
URL parameter.- Parameters:
theSystem
- The tag code system, ornull
to match any code system (this may not be supported on all servers)theCode
- The tag code. Must not benull
or empty.
-