public class Paging extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Paging.PageType |
Constructor and Description |
---|
Paging() |
Modifier and Type | Method and Description |
---|---|
Cursor |
createCursor(int totalRows,
Page page)
Create a Cursor
|
Page |
createPage(int pageNumber,
int pageSize)
Create a Page
|
PagedResults |
createPagedResult(Object result,
Cursor cursor)
Create a Paged Result Set
|
PagedResults |
createPagedResults(Object[] results,
Cursor cursor)
Create a Paged Result Set
|
Page |
createPageOrWindow(Integer pageNumber,
Integer pageSize,
Integer skipCount,
Integer maxItems)
Create a Page or Window
|
Page |
createPageOrWindow(Map<String,String> args)
Create a Page or Window from standardised request arguments
For Paged based index (take precedence over window based index, if both are specified):
- request args
pageNo => page number index
pageSize => size of page
For Window based index (as defined by CMIS):
- request args (take precedence over header values if both are specified)
skipCount => row number start index
maxItems => size of page
|
Page |
createUnlimitedPage()
Create an unlimited Page
|
Page |
createWindow(int skipRows,
int maxRows)
Create a Window
|
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 Page createPageOrWindow(Map<String,String> args)
args
- request argspublic Page createPageOrWindow(Integer pageNumber, Integer pageSize, Integer skipCount, Integer maxItems)
pageNumber
- page number (optional and paired with pageSize)pageSize
- page size (optional and paired with pageNumber)skipCount
- skipCount (optional and paired with maxItems)maxItems
- maxItems (optional and paired with skipCount)public Page createPage(int pageNumber, int pageSize)
pageNumber
- page numberpageSize
- page sizepublic Page createUnlimitedPage()
public Page createWindow(int skipRows, int maxRows)
skipRows
- number of rows to skipmaxRows
- maximum number of rows in windowpublic Cursor createCursor(int totalRows, Page page)
totalRows
- total number of rows in cursor (< 0 for don't know)page
- the page / window within cursorpublic PagedResults createPagedResults(Object[] results, Cursor cursor)
results
- the results for the page within the cursorcursor
- the cursorpublic PagedResults createPagedResult(Object result, Cursor cursor)
result
- the results for the page within the cursorcursor
- the cursorCopyright © 2005–2017 Alfresco Software. All rights reserved.