public class PagingFilter extends Object implements ResultFilter
PagingFilter
that limits the returned result set by only returning a "page" from
the list of queried results (starting at a firstResult index and having a maximum number of returned results).
If the maximum number of results is set to be < 0, than we have no maximum number of returned results
(i.e. we will select all results starting from a certain first result index).
Examples:
PagingFilter filter = new PagingFilter(5, 3)
will create a filter to retrieve only
6th, 7th and 8th elements from the result set. PagingFilter filter = new PagingFilter(5, -1)
will create a filter to retrieve all
elements from the result set starting with the 6th one.Constructor and Description |
---|
PagingFilter(int firstResult,
int maximumResults)
Constructs a
PagingFilter starting from a certain result index and lasting
for a certain maximum number of results. |
Modifier and Type | Method and Description |
---|---|
int |
getFirstResult()
Gets the index of the first result in the list specified by this filter, numbered from 0.
|
int |
getMaximumResults()
Gets the maximum number of results specified by this filter.
|
String |
toString() |
public PagingFilter(int firstResult, int maximumResults)
PagingFilter
starting from a certain result index and lasting
for a certain maximum number of results.firstResult
- The startPosition the start position of the first result, numbered from 0.maximumResults
- The maximum number of results to query for. If this is < 0, than we have no
maximum number of returned results (i.e. we select all results starting from
startPosition index).public int getFirstResult()
public int getMaximumResults()
Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries