Paginator
Objects of this class can be used to retrieve the nodes of the related result set
Methods
first
-
onResponse
-
[execute]
Tests if the current page is not the first of the Paginator/resultSet:method. If execute
is true
and the
test is positive, retrieves the first page from the
Paginator/resultSet:method. An Exception is thrown if the last call to one of the methods next,
prev,skip or last
is still running
Parameters:
Returns:
true
if the current page is not the first of the Paginator/resultSet:method, false
otherwise
last
-
onResponse
-
[execute]
Tests if the current page is not the last of the Paginator/resultSet:method. If execute
is true
and the
test is positive, retrieves the last page from the Paginator/resultSet:method.
An Exception is thrown if the last call to one of the methods next,
prev,skip or first is still running
Parameters:
Returns:
true
if the current page is not the last of the Paginator/resultSet:method, false
otherwise
next
-
onResponse
-
[execute]
Tests if subsequent pages in the Paginator/resultSet:method are available. If execute
is true
and the test is positive, retrieves the next page from the Paginator/resultSet:method.
An Exception is thrown if the last call to one of the methods
prev, first,
skip or last
is still running
Parameters:
Returns:
true
if subsequent pages are available, false
otherwise
prev
-
onResponse
-
[execute]
Tests if previous pages in the Paginator/resultSet:method are available. If execute
is true
and the test is positive,
retrieves the previous page from the Paginator/resultSet:method.
An Exception is thrown if the last call to one of the methods next,skip
first,skip or last
is still running
Parameters:
Returns:
true
if previous pages are available, false
otherwise
skip
-
onResponse
-
newPageIndex
-
[execute]
Tests if newPageIndex
satisfies the following statement:
newPageIndex != currentPageIndex && newPageIndex >= 1 && newPageIndex <= pageCount
.
If execute
is true
and the
test is positive, retrieves the newPageIndex-th
page from
the Paginator/resultSet:method.
An Exception is thrown if the last call to one of the methods next,
prev, last or
first is still running
Parameters:
-
onResponse
FunctionCallback function for receiving asynchronous query response
-
result
Array
-
-
newPageIndex
IntegerThe index in the Paginator/resultSet:method of the page to retrieve
-
[execute]
Boolean optionalIf omitted or
false
, the method only executes the test. Iftrue
and the test is positive, retrieves thenewPageIndex-th
page from the Paginator/resultSet:method
Returns:
true
if newPageIndex
satisfies the following statement:
newPageIndex != currentPageIndex && newPageIndex >= 1 && newPageIndex <= pageCount
,
false
otherwise