Package org.refcodes.hal
Interface HalDataPage
-
- All Superinterfaces:
java.util.Collection<HalData>
,java.lang.Iterable<HalData>
,java.util.List<HalData>
- All Known Implementing Classes:
HalDataPageImpl
public interface HalDataPage extends java.util.List<HalData>
In case the a paginated result set is expected when querying theHalClient
, then aHalDataPage
will be returned containing the theHalData
instances correlating to the requested page as well as additional information about the number of total pages available. Pagainated result sets may be expected when calling methods such asHalClient.readPage(String, int, int)
orHalClient.readAll(String, org.refcodes.net.FormFields)
(or similar) with HTTP-Query-Fields querying a paginated result.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PAGE_COUNT
The path to the total page count value (e.g. in anHttpBodyMap
).static java.lang.String
PAGE_NUMBER
The path to the page's number value (e.g. in anHttpBodyMap
).static java.lang.String
PAGE_SIZE
The path to the page's size value (e.g. in anHttpBodyMap
).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getPageCount()
Returns the total number of the pages which are available for retrieval.int
getPageNumber()
Returns the number of the page which thisHalDataPage
instances represents.int
getPageSize()
Returns the maximum size of the page being requested for theHalDataPage
result set.-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Field Detail
-
PAGE_NUMBER
static final java.lang.String PAGE_NUMBER
The path to the page's number value (e.g. in anHttpBodyMap
).- See Also:
- Constant Field Values
-
PAGE_SIZE
static final java.lang.String PAGE_SIZE
The path to the page's size value (e.g. in anHttpBodyMap
).- See Also:
- Constant Field Values
-
PAGE_COUNT
static final java.lang.String PAGE_COUNT
The path to the total page count value (e.g. in anHttpBodyMap
).- See Also:
- Constant Field Values
-
-
Method Detail
-
getPageNumber
int getPageNumber()
Returns the number of the page which thisHalDataPage
instances represents.- Returns:
- The
HalDataPage
result set's page number as of pagination.
-
getPageSize
int getPageSize()
Returns the maximum size of the page being requested for theHalDataPage
result set. Returns -1 in case no page size has been specified.- Returns:
- The
HalDataPage
result set's page size as of pagination.
-
getPageCount
int getPageCount()
Returns the total number of the pages which are available for retrieval.- Returns:
- The total number of the pages repesenting the overall result set..
-
-