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 static int
DEFAULT_PAGE_NUMBER
protected static int
DEFAULT_PAGE_SIZE
protected int
lastPageNumber
protected boolean
lenient
protected int
pageNumber
protected int
pageSize
protected int
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
getPageNumber()
int
getPageSize()
int
getTotalCount()
boolean
isLenient()
void
setLastPageNumber(int lastPageNumber)
void
setLenient(boolean lenient)
void
setPageNumber(int pageNumber)
void
setPageSize(int pageSize)
void
setTotalCount(int totalCount)
-
-
-
Field Detail
-
DEFAULT_PAGE_SIZE
protected static final int DEFAULT_PAGE_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_PAGE_NUMBER
protected static final int DEFAULT_PAGE_NUMBER
- See Also:
- Constant Field Values
-
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
-
totalCount
protected int totalCount
-
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 resources in a single page
- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
getTotalCount
public int getTotalCount()
- Specified by:
getTotalCount
in interfaceFHIRPagingContext
- Returns:
- the total number of matching resources 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 resources to include in a single page- See Also:
- https://www.hl7.org/fhir/r4/search.html#count
-
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
-
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
-
-