Class PagedCursor
java.lang.Object
org.alfresco.repo.web.util.paging.PagedCursor
- All Implemented Interfaces:
Serializable
,Cursor
Implementation of cursor based on notion of a Page.
- Author:
- davidc
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the current page numberint
Gets the end row within result set for this pageint
Gets the first page numberboolean
Is there a known first page?boolean
Is there a known last page?boolean
Is there a known next page?boolean
Is there a known prev page?int
Gets the last page numberint
Gets the next page numberint
Gets the page sizeGets the page typeint
Gets the previous page numberint
Gets the count of rows within result set for this pageint
Gets the start row within result set for this pageint
Gets total number of pagesint
Gets total rowsboolean
Is the page within range of the result set
-
Method Details
-
getPageType
Description copied from interface:Cursor
Gets the page type- Specified by:
getPageType
in interfaceCursor
- Returns:
- page type
-
getPageSize
public int getPageSize()Description copied from interface:Cursor
Gets the page size- Specified by:
getPageSize
in interfaceCursor
- Returns:
- page size
-
getTotalPages
public int getTotalPages()Description copied from interface:Cursor
Gets total number of pages- Specified by:
getTotalPages
in interfaceCursor
- Returns:
- total number of pages
-
getTotalRows
public int getTotalRows()Description copied from interface:Cursor
Gets total rows- Specified by:
getTotalRows
in interfaceCursor
- Returns:
- total rows
-
getCurrentPage
public int getCurrentPage()Description copied from interface:Cursor
Gets the current page number- Specified by:
getCurrentPage
in interfaceCursor
- Returns:
- current page number
-
getFirstPage
public int getFirstPage()Description copied from interface:Cursor
Gets the first page number- Specified by:
getFirstPage
in interfaceCursor
- Returns:
- first page number
-
getLastPage
public int getLastPage()Description copied from interface:Cursor
Gets the last page number- Specified by:
getLastPage
in interfaceCursor
- Returns:
- last page number
-
getNextPage
public int getNextPage()Description copied from interface:Cursor
Gets the next page number- Specified by:
getNextPage
in interfaceCursor
- Returns:
- next page number (-1 if no more pages)
-
getPrevPage
public int getPrevPage()Description copied from interface:Cursor
Gets the previous page number- Specified by:
getPrevPage
in interfaceCursor
- Returns:
- previous page number (-1 if no previous pages)
-
isInRange
public boolean isInRange()Description copied from interface:Cursor
Is the page within range of the result set -
getHasFirstPage
public boolean getHasFirstPage()Description copied from interface:Cursor
Is there a known first page?- Specified by:
getHasFirstPage
in interfaceCursor
- Returns:
- true => getFirstPage() will succeed
-
getHasLastPage
public boolean getHasLastPage()Description copied from interface:Cursor
Is there a known last page?- Specified by:
getHasLastPage
in interfaceCursor
- Returns:
- true => getLastPage() will succeed
-
getHasNextPage
public boolean getHasNextPage()Description copied from interface:Cursor
Is there a known next page?- Specified by:
getHasNextPage
in interfaceCursor
- Returns:
- true => getNextPage() will succeed
-
getHasPrevPage
public boolean getHasPrevPage()Description copied from interface:Cursor
Is there a known prev page?- Specified by:
getHasPrevPage
in interfaceCursor
- Returns:
- true => getPrevPage() will succeed
-
getStartRow
public int getStartRow()Description copied from interface:Cursor
Gets the start row within result set for this page- Specified by:
getStartRow
in interfaceCursor
- Returns:
- start row index
-
getEndRow
public int getEndRow()Description copied from interface:Cursor
Gets the end row within result set for this page -
getRowCount
public int getRowCount()Description copied from interface:Cursor
Gets the count of rows within result set for this page- Specified by:
getRowCount
in interfaceCursor
- Returns:
- row count
-