Package ca.uhn.fhir.rest.gclient
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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description IQuery<Y>and(ICriterion<?> theCriterion)Add a search parameter to the query.IQuery<Y>count(int theCount)Specifies the_countparameter, which indicates to the server how many resources should be returned on a single page.IQuery<Y>include(Include theInclude)Add an "_include" specification or an "_include:recurse" specification.IQuery<Y>lastUpdated(DateRangeParam theLastUpdated)Add a "_lastUpdated" specificationIQuery<Y>limitTo(int theLimitTo)Deprecated.This parameter is badly named, since FHIR calls this parameter "_count" and not "_limit".<B extends IBaseBundle>
IQuery<B>returnBundle(Class<B> theClass)Request that the client return the specified bundle type, e.g.IQuery<Y>revInclude(Include theIncludeTarget)Add a "_revinclude" specificationISort<Y>sort()Adds a sort criteriaIQuery<Y>sort(SortSpec theSortSpec)Adds a sort using aSortSpecobjectIQuery<Y>totalMode(SearchTotalModeEnum theTotalMode)Request that the server modify the response using the_totalparam THIS IS AN EXPERIMENTAL FEATURE - Use with caution, as it may be removed or modified in a future version.IQuery<Y>usingStyle(SearchStyleEnum theStyle)Forces the query to perform the search using the given method (allowable methods are described in the FHIR Search Specification)IQuery<Y>where(ICriterion<?> theCriterion)Add a search parameter to the query.IQuery<Y>withAnyProfile(Collection<String> theProfileUris)Matches any of the profiles given as argument.IQuery<Y>withIdAndCompartment(String theResourceId, String theCompartmentName)IQuery<Y>withProfile(String theProfileUri)Match only resources where the resource has the given profile declaration.IQuery<Y>withSecurity(String theSystem, String theCode)Match only resources where the resource has the given security tag.IQuery<Y>withTag(String theSystem, String theCode)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 Detail
-
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:
andin interfaceIBaseQuery<Y>
-
count
IQuery<Y> count(int theCount)
Specifies the_countparameter, which indicates to the server how many resources should be returned on a single page.- Since:
- 1.4
-
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())
- Recurse:
-
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". Usecount(int)instead (it also sets the _count parameter)Specifies the_countparameter, which indicates to the server how many resources should be returned on a single page.
-
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.classorca.uhn.fhir.model.dstu2.resource.Bundle.class
-
totalMode
IQuery<Y> totalMode(SearchTotalModeEnum theTotalMode)
Request that the server modify the response using the_totalparam 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
ISort<Y> sort()
Adds a sort criteria- See Also:
for an alternate way of speciyfing sorts
-
sort
IQuery<Y> sort(SortSpec theSortSpec)
Adds a sort using aSortSpecobject- See Also:
for an alternate way of speciyfing sorts
-
usingStyle
IQuery<Y> usingStyle(SearchStyleEnum theStyle)
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:
SearchStyleEnum
-
where
IQuery<Y> where(ICriterion<?> theCriterion)
Add a search parameter to the query.- Specified by:
wherein interfaceIBaseQuery<Y>
-
withAnyProfile
IQuery<Y> withAnyProfile(Collection<String> theProfileUris)
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
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_profileURL 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_securityURL parameter.- Parameters:
theSystem- The tag code system, ornullto match any code system (this may not be supported on all servers)theCode- The tag code. Must not benullor empty.
-
withTag
IQuery<Y> withTag(String theSystem, String theCode)
Match only resources where the resource has the given tag. This parameter corresponds to the_tagURL parameter.- Parameters:
theSystem- The tag code system, ornullto match any code system (this may not be supported on all servers)theCode- The tag code. Must not benullor empty.
-
-