public class PagingCursor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PagingCursor.Page
Page based Cursor
|
static class |
PagingCursor.Rows
Rows based Cursor
|
Constructor and Description |
---|
PagingCursor() |
Modifier and Type | Method and Description |
---|---|
PagingCursor.Page |
createPageCursor(long totalRows,
int rowsPerPage,
int page)
Create a Page based Cursor
|
PagingCursor.Page |
createPageCursor(long totalRows,
int rowsPerPage,
int page,
boolean zeroBasedPage,
boolean zeroBasedRow)
Create a Page based Cursor
|
PagingCursor.Rows |
createRowsCursor(long totalRows,
long maxRows,
long skipRows)
Create a Rows based Cursor
|
PagingCursor.Rows |
createRowsCursor(long totalRows,
long maxRows,
long skipRows,
boolean zeroBasedRow)
Create a Rows based Cursor
|
boolean |
isZeroBasedPage()
Is zero based page index?
Note: scoped to this paging cursor instance
|
boolean |
isZeroBasedRow()
Is zero based row index?
Note: scoped to this paging cursor instance
|
void |
setZeroBasedPage(boolean zeroBasedPage)
Sets zero based page index
Note: scoped to this paging cursor instance
|
void |
setZeroBasedRow(boolean zeroBasedRow)
Sets zero based row index
Note: scoped to this paging cursor instance
|
public void setZeroBasedPage(boolean zeroBasedPage)
zeroBasedPage
- true => 0 based, false => 1 basedpublic boolean isZeroBasedPage()
public void setZeroBasedRow(boolean zeroBasedRow)
zeroBasedRow
- true => 0 based, false => 1 basedpublic boolean isZeroBasedRow()
public PagingCursor.Page createPageCursor(long totalRows, int rowsPerPage, int page)
totalRows
- total rows in collectionrowsPerPage
- page sizepage
- page number (0 or 1 based)public PagingCursor.Page createPageCursor(long totalRows, int rowsPerPage, int page, boolean zeroBasedPage, boolean zeroBasedRow)
totalRows
- total rows in collectionrowsPerPage
- page sizepage
- page number (0 or 1 based)zeroBasedPage
- true => 0 based, false => 1 basedzeroBasedRow
- true => 0 based, false => 1 basedpublic PagingCursor.Rows createRowsCursor(long totalRows, long maxRows, long skipRows)
totalRows
- total rows in collectionmaxRows
- maximum number of rows in pageskipRows
- number of rows to skip (0 - none)public PagingCursor.Rows createRowsCursor(long totalRows, long maxRows, long skipRows, boolean zeroBasedRow)
totalRows
- total rows in collectionmaxRows
- maximum number of rows in pageskipRows
- number of rows to skip (0 - none)zeroBasedRow
- true => 0 based, false => 1 basedCopyright © 2005–2017 Alfresco Software. All rights reserved.