Package org.pipservices3.commons.data
Class TokenizedDataPage<T>
java.lang.Object
org.pipservices3.commons.data.TokenizedDataPage<T>
Data transfer object that is used to pass results of paginated queries.
It contains items of retrieved page and optional total number of items.
Most often this object type is used to send responses to paginated queries.
Pagination parameters are defined by TokenizedPagingParams
object.
The token
parameter in the TokenizedPagingParams
there means where to start the searxh.
The takes
parameter sets number of items to return in the page.
And the optional total
parameter tells to return total number of items in the query.
The data page returns a token that shall be passed to the next search as a starting point.
Remember: not all implementations support the total
parameter
because its generation may lead to severe performance implications.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTokenizedDataPage
(List<T> data, String token, int total) Creates a new instance of data page and assigns its values. -
Method Summary
-
Field Details
-
data
The items of the retrieved page. -
token
The starting point for the next search. -
total
The total amount of items in a request.
-
-
Constructor Details
-
TokenizedDataPage
Creates a new instance of data page and assigns its values.- Parameters:
data
- a list of items from the retrieved page.token
- (optional) a token to define astarting point for the next search.total
- (optional) a total number of objects in the result.
-
TokenizedDataPage
public TokenizedDataPage()
-