Package com.ibm.fhir.core.context.impl
Class FHIRPagingContextImpl
- java.lang.Object
-
- com.ibm.fhir.core.context.impl.FHIRPagingContextImpl
-
- All Implemented Interfaces:
FHIRPagingContext
- Direct Known Subclasses:
FHIRHistoryContextImpl,FHIRSearchContextImpl
public class FHIRPagingContextImpl extends java.lang.Object implements FHIRPagingContext
-
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_LAST_PAGE_NUMBERprotected intlastPageNumberprotected booleanlenientprotected intmatchCountprotected intmaxPageIncludeCountprotected intmaxPageSizeprotected intpageNumberprotected intpageSizeprotected java.lang.IntegertotalCount
-
Constructor Summary
Constructors Constructor Description FHIRPagingContextImpl()Create a FHIRPagingContextImpl with the default values:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLastPageNumber()intgetMatchCount()intgetMaxPageIncludeCount()intgetMaxPageSize()intgetPageNumber()intgetPageSize()java.lang.IntegergetTotalCount()booleanisLenient()voidsetLastPageNumber(int lastPageNumber)voidsetLenient(boolean lenient)voidsetMatchCount(int matchCount)voidsetMaxPageIncludeCount(int maxPageIncludeCount)voidsetMaxPageSize(int maxPageSize)voidsetPageNumber(int pageNumber)voidsetPageSize(int pageSize)voidsetTotalCount(int totalCount)
-
-
-
Field Detail
-
DEFAULT_LAST_PAGE_NUMBER
protected static final int DEFAULT_LAST_PAGE_NUMBER
- See Also:
- Constant Field Values
-
lastPageNumber
protected int lastPageNumber
-
pageNumber
protected int pageNumber
-
pageSize
protected int pageSize
-
maxPageSize
protected int maxPageSize
-
maxPageIncludeCount
protected int maxPageIncludeCount
-
totalCount
protected java.lang.Integer totalCount
-
matchCount
protected int matchCount
-
lenient
protected boolean lenient
-
-
Method Detail
-
getLastPageNumber
public int getLastPageNumber()
- Specified by:
getLastPageNumberin interfaceFHIRPagingContext- Returns:
- the last page number
-
getPageNumber
public int getPageNumber()
- Specified by:
getPageNumberin interfaceFHIRPagingContext- Returns:
- the current page number
-
getPageSize
public int getPageSize()
- Specified by:
getPageSizein interfaceFHIRPagingContext- Returns:
- the number of matching resources in a single page
- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
getMaxPageSize
public int getMaxPageSize()
- Specified by:
getMaxPageSizein interfaceFHIRPagingContext- Returns:
- the maximum number of matching resources allowed in a single page
- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
getMaxPageIncludeCount
public int getMaxPageIncludeCount()
- Specified by:
getMaxPageIncludeCountin interfaceFHIRPagingContext- Returns:
- the maximum number of included resources allowed in a single page
- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
getTotalCount
public java.lang.Integer getTotalCount()
- Specified by:
getTotalCountin interfaceFHIRPagingContext- Returns:
- the total number of matching resources for the corresponding query, or null if total count is not available
- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
getMatchCount
public int getMatchCount()
- Specified by:
getMatchCountin interfaceFHIRPagingContext- Returns:
- the number of matching resources returned for the corresponding query
- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
setLastPageNumber
public void setLastPageNumber(int lastPageNumber)
- Specified by:
setLastPageNumberin interfaceFHIRPagingContext- Parameters:
lastPageNumber- the last page of results that can be requested for the corresponding query
-
setPageNumber
public void setPageNumber(int pageNumber)
- Specified by:
setPageNumberin interfaceFHIRPagingContext- Parameters:
pageNumber- the current page number
-
setPageSize
public void setPageSize(int pageSize)
- Specified by:
setPageSizein interfaceFHIRPagingContext- Parameters:
pageSize- the number of matching resources to include in a single page- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
setMaxPageSize
public void setMaxPageSize(int maxPageSize)
- Specified by:
setMaxPageSizein interfaceFHIRPagingContext- Parameters:
maxPageSize- the maximum number of matching resources allowed in a single page- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
setMaxPageIncludeCount
public void setMaxPageIncludeCount(int maxPageIncludeCount)
- Specified by:
setMaxPageIncludeCountin interfaceFHIRPagingContext- Parameters:
maxPageIncludeCount- the maximum number of included resources allowed in a single page
-
setTotalCount
public void setTotalCount(int totalCount)
- Specified by:
setTotalCountin interfaceFHIRPagingContext- Parameters:
totalCount- the total number of matching resources for the corresponding query- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
setMatchCount
public void setMatchCount(int matchCount)
- Specified by:
setMatchCountin interfaceFHIRPagingContext- Parameters:
matchCount- the number of matching resources returned for the corresponding query- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
isLenient
public boolean isLenient()
- Specified by:
isLenientin interfaceFHIRPagingContext- Returns:
- whether the request should be handled with leniency
-
setLenient
public void setLenient(boolean lenient)
- Specified by:
setLenientin interfaceFHIRPagingContext- Parameters:
lenient- whether the request should be handled with leniency
-
-