Package ca.uhn.fhir.jpa.search.builder
Class QueryStack
java.lang.Object
ca.uhn.fhir.jpa.search.builder.QueryStack
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionQueryStack
(SearchParameterMap theSearchParameters, JpaStorageSettings theStorageSettings, ca.uhn.fhir.context.FhirContext theFhirContext, SearchQueryBuilder theSqlBuilder, ca.uhn.fhir.rest.server.util.ISearchParamRegistry theSearchParamRegistry, PartitionSettings thePartitionSettings) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
addPredicateCompositeNonUnique
(List<String> theIndexStrings, RequestPartitionId theRequestPartitionId) void
addPredicateCompositeUnique
(List<String> theIndexStrings, RequestPartitionId theRequestPartitionId) void
addPredicateEverythingOperation
(String theResourceName, List<String> theTypeSourceResourceNames, Long... theTargetPids) void
addSortOnCoordsNear
(String theParamName, boolean theAscending, SearchParameterMap theParams) void
addSortOnDate
(String theResourceName, String theParamName, boolean theAscending) void
addSortOnLastUpdated
(boolean theAscending) void
addSortOnNumber
(String theResourceName, String theParamName, boolean theAscending) void
addSortOnQuantity
(String theResourceName, String theParamName, boolean theAscending) void
addSortOnResourceId
(boolean theAscending) void
addSortOnResourceLink
(String theResourceName, String theReferenceTargetType, String theParamName, String theChain, boolean theAscending, SearchParameterMap theParams) void
addSortOnResourcePID
(boolean theAscending) Sort on RES_ID -- used to break ties for reliable sortvoid
addSortOnString
(String theResourceName, String theParamName, boolean theAscending) void
addSortOnToken
(String theResourceName, String theParamName, boolean theAscending) void
addSortOnUri
(String theResourceName, String theParamName, boolean theAscending) com.healthmarketscience.sqlbuilder.Condition
createPredicateCoords
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) com.healthmarketscience.sqlbuilder.Condition
createPredicateDate
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateDate
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) com.healthmarketscience.sqlbuilder.Condition
createPredicateNumber
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateNumber
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) com.healthmarketscience.sqlbuilder.Condition
createPredicateQuantity
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateQuantity
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) com.healthmarketscience.sqlbuilder.Condition
createPredicateReference
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theParamName, List<String> theQualifiers, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateReference
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theParamName, List<String> theQualifiers, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) com.healthmarketscience.sqlbuilder.Condition
createPredicateReferenceForEmbeddedChainedSearchResource
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId, ca.uhn.fhir.jpa.search.builder.QueryStack.EmbeddedChainedSearchModeEnum theEmbeddedChainedSearchModeEnum) com.healthmarketscience.sqlbuilder.Condition
createPredicateResourceId
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, List<List<ca.uhn.fhir.model.api.IQueryParameterType>> theValues, String theResourceName, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateString
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateString
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) com.healthmarketscience.sqlbuilder.Condition
createPredicateTag
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, List<List<ca.uhn.fhir.model.api.IQueryParameterType>> theList, String theParamName, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateToken
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateToken
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) com.healthmarketscience.sqlbuilder.Condition
createPredicateUri
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) com.healthmarketscience.sqlbuilder.Condition
createPredicateUri
(com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) ca.uhn.fhir.model.api.IQueryParameterType
newParameterInstance
(ca.uhn.fhir.context.RuntimeSearchParam theParam, String theQualifier, String theValueAsQueryToken) com.healthmarketscience.sqlbuilder.Condition
searchForIdsWithAndOr
(QueryStack.SearchForIdsParams theSearchForIdsParams) void
setUseAggregate
(boolean theUseAggregate)
-
Field Details
-
LOCATION_POSITION
- See Also:
-
-
Constructor Details
-
QueryStack
public QueryStack(SearchParameterMap theSearchParameters, JpaStorageSettings theStorageSettings, ca.uhn.fhir.context.FhirContext theFhirContext, SearchQueryBuilder theSqlBuilder, ca.uhn.fhir.rest.server.util.ISearchParamRegistry theSearchParamRegistry, PartitionSettings thePartitionSettings) Constructor
-
-
Method Details
-
addSortOnCoordsNear
public void addSortOnCoordsNear(String theParamName, boolean theAscending, SearchParameterMap theParams) -
addSortOnDate
-
addSortOnLastUpdated
-
addSortOnNumber
-
addSortOnQuantity
-
addSortOnResourceId
-
addSortOnResourcePID
Sort on RES_ID -- used to break ties for reliable sort -
addSortOnResourceLink
public void addSortOnResourceLink(String theResourceName, String theReferenceTargetType, String theParamName, String theChain, boolean theAscending, SearchParameterMap theParams) -
addSortOnString
-
addSortOnToken
-
addSortOnUri
-
setUseAggregate
-
createPredicateCoords
public com.healthmarketscience.sqlbuilder.Condition createPredicateCoords(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
createPredicateDate
public com.healthmarketscience.sqlbuilder.Condition createPredicateDate(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) -
createPredicateDate
public com.healthmarketscience.sqlbuilder.Condition createPredicateDate(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
createPredicateNumber
public com.healthmarketscience.sqlbuilder.Condition createPredicateNumber(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) -
createPredicateNumber
public com.healthmarketscience.sqlbuilder.Condition createPredicateNumber(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
createPredicateQuantity
public com.healthmarketscience.sqlbuilder.Condition createPredicateQuantity(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) -
createPredicateQuantity
public com.healthmarketscience.sqlbuilder.Condition createPredicateQuantity(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
createPredicateReference
public com.healthmarketscience.sqlbuilder.Condition createPredicateReference(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theParamName, List<String> theQualifiers, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId) -
createPredicateReference
public com.healthmarketscience.sqlbuilder.Condition createPredicateReference(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theParamName, List<String> theQualifiers, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
addGrouping
-
addOrdering
-
createPredicateReferenceForEmbeddedChainedSearchResource
public com.healthmarketscience.sqlbuilder.Condition createPredicateReferenceForEmbeddedChainedSearchResource(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId, ca.uhn.fhir.jpa.search.builder.QueryStack.EmbeddedChainedSearchModeEnum theEmbeddedChainedSearchModeEnum) -
createPredicateResourceId
@Nullable public com.healthmarketscience.sqlbuilder.Condition createPredicateResourceId(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, List<List<ca.uhn.fhir.model.api.IQueryParameterType>> theValues, String theResourceName, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) -
createPredicateString
public com.healthmarketscience.sqlbuilder.Condition createPredicateString(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) -
createPredicateString
public com.healthmarketscience.sqlbuilder.Condition createPredicateString(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
createPredicateTag
public com.healthmarketscience.sqlbuilder.Condition createPredicateTag(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, List<List<ca.uhn.fhir.model.api.IQueryParameterType>> theList, String theParamName, RequestPartitionId theRequestPartitionId) -
createPredicateToken
public com.healthmarketscience.sqlbuilder.Condition createPredicateToken(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) -
createPredicateToken
public com.healthmarketscience.sqlbuilder.Condition createPredicateToken(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
createPredicateUri
public com.healthmarketscience.sqlbuilder.Condition createPredicateUri(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) -
createPredicateUri
public com.healthmarketscience.sqlbuilder.Condition createPredicateUri(@Nullable com.healthmarketscience.sqlbuilder.dbspec.basic.DbColumn[] theSourceJoinColumn, String theResourceName, String theSpnamePrefix, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, List<? extends ca.uhn.fhir.model.api.IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId, SearchQueryBuilder theSqlBuilder) -
newChildQueryFactoryWithFullBuilderReuse
-
searchForIdsWithAndOr
@Nullable public com.healthmarketscience.sqlbuilder.Condition searchForIdsWithAndOr(QueryStack.SearchForIdsParams theSearchForIdsParams) -
addPredicateCompositeUnique
public void addPredicateCompositeUnique(List<String> theIndexStrings, RequestPartitionId theRequestPartitionId) -
addPredicateCompositeNonUnique
public void addPredicateCompositeNonUnique(List<String> theIndexStrings, RequestPartitionId theRequestPartitionId) -
addPredicateEverythingOperation
public void addPredicateEverythingOperation(String theResourceName, List<String> theTypeSourceResourceNames, Long... theTargetPids) -
newParameterInstance
public ca.uhn.fhir.model.api.IQueryParameterType newParameterInstance(ca.uhn.fhir.context.RuntimeSearchParam theParam, String theQualifier, String theValueAsQueryToken)
-