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 Object implements FHIRPagingContext
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
DEFAULT_LAST_PAGE_NUMBER
protected int
lastPageNumber
protected boolean
lenient
protected int
matchCount
protected int
maxPageIncludeCount
protected int
maxPageSize
protected int
pageNumber
protected int
pageSize
protected Integer
totalCount
-
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 int
getLastPageNumber()
int
getMatchCount()
int
getMaxPageIncludeCount()
int
getMaxPageSize()
int
getPageNumber()
int
getPageSize()
Integer
getTotalCount()
boolean
isLenient()
void
setLastPageNumber(int lastPageNumber)
void
setLenient(boolean lenient)
void
setMatchCount(int matchCount)
void
setMaxPageIncludeCount(int maxPageIncludeCount)
void
setMaxPageSize(int maxPageSize)
void
setPageNumber(int pageNumber)
void
setPageSize(int pageSize)
void
setTotalCount(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 Integer totalCount
-
matchCount
protected int matchCount
-
lenient
protected boolean lenient
-
-
Method Detail
-
getLastPageNumber
public int getLastPageNumber()
- Specified by:
getLastPageNumber
in interfaceFHIRPagingContext
- Returns:
- the last page number
-
getPageNumber
public int getPageNumber()
- Specified by:
getPageNumber
in interfaceFHIRPagingContext
- Returns:
- the current page number
-
getPageSize
public int getPageSize()
- Specified by:
getPageSize
in 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:
getMaxPageSize
in 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:
getMaxPageIncludeCount
in 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 Integer getTotalCount()
- Specified by:
getTotalCount
in 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:
getMatchCount
in 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:
setLastPageNumber
in interfaceFHIRPagingContext
- Parameters:
lastPageNumber
- the last page of results that can be requested for the corresponding query
-
setPageNumber
public void setPageNumber(int pageNumber)
- Specified by:
setPageNumber
in interfaceFHIRPagingContext
- Parameters:
pageNumber
- the current page number
-
setPageSize
public void setPageSize(int pageSize)
- Specified by:
setPageSize
in 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:
setMaxPageSize
in 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:
setMaxPageIncludeCount
in interfaceFHIRPagingContext
- Parameters:
maxPageIncludeCount
- the maximum number of included resources allowed in a single page
-
setTotalCount
public void setTotalCount(int totalCount)
- Specified by:
setTotalCount
in 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:
setMatchCount
in 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:
isLenient
in interfaceFHIRPagingContext
- Returns:
- whether the request should be handled with leniency
-
setLenient
public void setLenient(boolean lenient)
- Specified by:
setLenient
in interfaceFHIRPagingContext
- Parameters:
lenient
- whether the request should be handled with leniency
-
-