Class FHIRSearchContextImpl
- java.lang.Object
-
- org.linuxforhealth.fhir.core.context.impl.FHIRPagingContextImpl
-
- org.linuxforhealth.fhir.search.context.impl.FHIRSearchContextImpl
-
- All Implemented Interfaces:
FHIRPagingContext
,FHIRSearchContext
public class FHIRSearchContextImpl extends FHIRPagingContextImpl implements FHIRSearchContext
Implementation ofFHIRSearchContext
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.core.context.impl.FHIRPagingContextImpl
DEFAULT_LAST_PAGE_NUMBER, lastPageNumber, lenient, matchCount, maxPageIncludeCount, maxPageSize, pageNumber, pageSize, totalCount
-
-
Constructor Summary
Constructors Constructor Description FHIRSearchContextImpl()
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElementsParameter(java.lang.String elementToInclude)
void
addOutcomeIssue(OperationOutcome.Issue outcomeIssue)
Adds an issue the list of issues to be returned in the search outcome.java.util.List<java.lang.String>
getElementsParameters()
Get the list of element names requested to be included in the returned resources.java.util.List<InclusionParameter>
getIncludeParameters()
java.util.List<OperationOutcome.Issue>
getOutcomeIssues()
Get the list of issues to be returned in the search outcome.java.util.List<InclusionParameter>
getRevIncludeParameters()
java.util.List<QueryParameter>
getSearchParameters()
java.util.List<java.lang.String>
getSearchResourceTypes()
java.util.List<SortParameter>
getSortParameters()
SummaryValueSet
getSummaryParameter()
Get the summary parameter.TotalValueSet
getTotalParameter()
Get the total parameter.boolean
hasElementsParameters()
boolean
hasIncludeParameters()
boolean
hasRevIncludeParameters()
boolean
hasSortParameters()
boolean
hasSummaryParameter()
boolean
hasTotalParameter()
boolean
isIncludeResourceData()
Should the search result include the actual resource in the responsevoid
setElementsParameters(java.util.List<java.lang.String> elementsParameters)
Set the list of element names requested to be included in the returned resources.void
setIncludeResourceData(boolean flag)
Set the includeResourceData flagvoid
setSearchParameters(java.util.List<QueryParameter> searchParameters)
void
setSearchResourceTypes(java.util.List<java.lang.String> searchResourceTypes)
void
setSortParameters(java.util.List<SortParameter> sortParameters)
void
setSummaryParameter(SummaryValueSet summary)
Set the value of the summary parameter.void
setTotalParameter(TotalValueSet total)
Set the value of the total parameter.java.lang.String
toString()
-
Methods inherited from class org.linuxforhealth.fhir.core.context.impl.FHIRPagingContextImpl
getLastPageNumber, getMatchCount, getMaxPageIncludeCount, getMaxPageSize, getPageNumber, getPageSize, getTotalCount, isLenient, setLastPageNumber, setLenient, setMatchCount, setMaxPageIncludeCount, setMaxPageSize, setPageNumber, setPageSize, setTotalCount
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.linuxforhealth.fhir.core.context.FHIRPagingContext
getLastPageNumber, getMatchCount, getMaxPageIncludeCount, getMaxPageSize, getPageNumber, getPageSize, getTotalCount, isLenient, setLastPageNumber, setLenient, setMatchCount, setMaxPageIncludeCount, setMaxPageSize, setPageNumber, setPageSize, setTotalCount
-
-
-
-
Method Detail
-
getSearchParameters
public java.util.List<QueryParameter> getSearchParameters()
- Specified by:
getSearchParameters
in interfaceFHIRSearchContext
-
setSearchParameters
public void setSearchParameters(java.util.List<QueryParameter> searchParameters)
- Specified by:
setSearchParameters
in interfaceFHIRSearchContext
-
getSortParameters
public java.util.List<SortParameter> getSortParameters()
- Specified by:
getSortParameters
in interfaceFHIRSearchContext
-
setSortParameters
public void setSortParameters(java.util.List<SortParameter> sortParameters)
- Specified by:
setSortParameters
in interfaceFHIRSearchContext
-
hasSortParameters
public boolean hasSortParameters()
- Specified by:
hasSortParameters
in interfaceFHIRSearchContext
-
getIncludeParameters
public java.util.List<InclusionParameter> getIncludeParameters()
- Specified by:
getIncludeParameters
in interfaceFHIRSearchContext
-
hasIncludeParameters
public boolean hasIncludeParameters()
- Specified by:
hasIncludeParameters
in interfaceFHIRSearchContext
-
getRevIncludeParameters
public java.util.List<InclusionParameter> getRevIncludeParameters()
- Specified by:
getRevIncludeParameters
in interfaceFHIRSearchContext
-
hasRevIncludeParameters
public boolean hasRevIncludeParameters()
- Specified by:
hasRevIncludeParameters
in interfaceFHIRSearchContext
-
getElementsParameters
public java.util.List<java.lang.String> getElementsParameters()
Description copied from interface:FHIRSearchContext
Get the list of element names requested to be included in the returned resources.- Specified by:
getElementsParameters
in interfaceFHIRSearchContext
- Returns:
- a list of strings or null to indicate that there is currently no elements filter associated with the search
-
setElementsParameters
public void setElementsParameters(java.util.List<java.lang.String> elementsParameters)
Description copied from interface:FHIRSearchContext
Set the list of element names requested to be included in the returned resources. An empty list of strings will indicate that only mandatory elements should be included in the search result. Null is used to represent "no filter".- Specified by:
setElementsParameters
in interfaceFHIRSearchContext
-
addElementsParameter
public void addElementsParameter(java.lang.String elementToInclude)
- Specified by:
addElementsParameter
in interfaceFHIRSearchContext
-
hasElementsParameters
public boolean hasElementsParameters()
- Specified by:
hasElementsParameters
in interfaceFHIRSearchContext
- Returns:
- true when the elements parameter is not null
-
hasSummaryParameter
public boolean hasSummaryParameter()
- Specified by:
hasSummaryParameter
in interfaceFHIRSearchContext
- Returns:
- true when the summary parameter is not null
-
getSummaryParameter
public SummaryValueSet getSummaryParameter()
Description copied from interface:FHIRSearchContext
Get the summary parameter.- Specified by:
getSummaryParameter
in interfaceFHIRSearchContext
- Returns:
- the value of the summary parameter
-
setSummaryParameter
public void setSummaryParameter(SummaryValueSet summary)
Description copied from interface:FHIRSearchContext
Set the value of the summary parameter.- Specified by:
setSummaryParameter
in interfaceFHIRSearchContext
- Parameters:
summary
- the value
-
hasTotalParameter
public boolean hasTotalParameter()
- Specified by:
hasTotalParameter
in interfaceFHIRSearchContext
- Returns:
- true when the total parameter is not null
-
getTotalParameter
public TotalValueSet getTotalParameter()
Description copied from interface:FHIRSearchContext
Get the total parameter.- Specified by:
getTotalParameter
in interfaceFHIRSearchContext
- Returns:
- the value of the total parameter
-
setTotalParameter
public void setTotalParameter(TotalValueSet total)
Description copied from interface:FHIRSearchContext
Set the value of the total parameter.- Specified by:
setTotalParameter
in interfaceFHIRSearchContext
- Parameters:
total
- the value
-
getSearchResourceTypes
public java.util.List<java.lang.String> getSearchResourceTypes()
- Specified by:
getSearchResourceTypes
in interfaceFHIRSearchContext
-
setSearchResourceTypes
public void setSearchResourceTypes(java.util.List<java.lang.String> searchResourceTypes)
- Specified by:
setSearchResourceTypes
in interfaceFHIRSearchContext
-
getOutcomeIssues
public java.util.List<OperationOutcome.Issue> getOutcomeIssues()
Description copied from interface:FHIRSearchContext
Get the list of issues to be returned in the search outcome.- Specified by:
getOutcomeIssues
in interfaceFHIRSearchContext
- Returns:
- a list of issues to be returned in the search outcome
-
addOutcomeIssue
public void addOutcomeIssue(OperationOutcome.Issue outcomeIssue)
Description copied from interface:FHIRSearchContext
Adds an issue the list of issues to be returned in the search outcome.- Specified by:
addOutcomeIssue
in interfaceFHIRSearchContext
- Parameters:
outcomeIssue
- the issue
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isIncludeResourceData
public boolean isIncludeResourceData()
Description copied from interface:FHIRSearchContext
Should the search result include the actual resource in the response- Specified by:
isIncludeResourceData
in interfaceFHIRSearchContext
- Returns:
-
setIncludeResourceData
public void setIncludeResourceData(boolean flag)
Description copied from interface:FHIRSearchContext
Set the includeResourceData flag- Specified by:
setIncludeResourceData
in interfaceFHIRSearchContext
-
-