org.alfresco.repo.web.util.paging
Class WindowedCursor

java.lang.Object
  extended by org.alfresco.repo.web.util.paging.WindowedCursor
All Implemented Interfaces:
java.io.Serializable, Cursor

public class WindowedCursor
extends java.lang.Object
implements Cursor, java.io.Serializable

Cursor implementation based on notion of a Window.

See Also:
Serialized Form

Method Summary
 int getCurrentPage()
          Gets the current page number
 int getEndRow()
          Gets the end row within result set for this page
 int getFirstPage()
          Gets the first page number
 boolean getHasFirstPage()
          Is there a known first page?
 boolean getHasLastPage()
          Is there a known last page?
 boolean getHasNextPage()
          Is there a known next page?
 boolean getHasPrevPage()
          Is there a known prev page?
 int getLastPage()
          Gets the last page number
 int getNextPage()
          Gets the next page number
 int getPageSize()
          Gets the page size
 java.lang.String getPageType()
          Gets the page type
 int getPrevPage()
          Gets the previous page number
 int getRowCount()
          Gets the count of rows within result set for this page
 int getStartRow()
          Gets the start row within result set for this page
 int getTotalPages()
          Gets total number of pages
 int getTotalRows()
          Gets total rows
 boolean isInRange()
          Is the page within range of the result set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPageType

public java.lang.String getPageType()
Description copied from interface: Cursor
Gets the page type

Specified by:
getPageType in interface Cursor
Returns:
page type

getPageSize

public int getPageSize()
Description copied from interface: Cursor
Gets the page size

Specified by:
getPageSize in interface Cursor
Returns:
page size

getTotalPages

public int getTotalPages()
Description copied from interface: Cursor
Gets total number of pages

Specified by:
getTotalPages in interface Cursor
Returns:
total number of pages

getTotalRows

public int getTotalRows()
Description copied from interface: Cursor
Gets total rows

Specified by:
getTotalRows in interface Cursor
Returns:
total rows

getCurrentPage

public int getCurrentPage()
Description copied from interface: Cursor
Gets the current page number

Specified by:
getCurrentPage in interface Cursor
Returns:
current page number

getFirstPage

public int getFirstPage()
Description copied from interface: Cursor
Gets the first page number

Specified by:
getFirstPage in interface Cursor
Returns:
first page number

getLastPage

public int getLastPage()
Description copied from interface: Cursor
Gets the last page number

Specified by:
getLastPage in interface Cursor
Returns:
last page number

getNextPage

public int getNextPage()
Description copied from interface: Cursor
Gets the next page number

Specified by:
getNextPage in interface Cursor
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 interface Cursor
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

Specified by:
isInRange in interface Cursor
Returns:
true => page is within range

getHasFirstPage

public boolean getHasFirstPage()
Description copied from interface: Cursor
Is there a known first page?

Specified by:
getHasFirstPage in interface Cursor
Returns:
true => getFirstPage() will succeed

getHasLastPage

public boolean getHasLastPage()
Description copied from interface: Cursor
Is there a known last page?

Specified by:
getHasLastPage in interface Cursor
Returns:
true => getLastPage() will succeed

getHasNextPage

public boolean getHasNextPage()
Description copied from interface: Cursor
Is there a known next page?

Specified by:
getHasNextPage in interface Cursor
Returns:
true => getNextPage() will succeed

getHasPrevPage

public boolean getHasPrevPage()
Description copied from interface: Cursor
Is there a known prev page?

Specified by:
getHasPrevPage in interface Cursor
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 interface Cursor
Returns:
start row index

getEndRow

public int getEndRow()
Description copied from interface: Cursor
Gets the end row within result set for this page

Specified by:
getEndRow in interface Cursor
Returns:
end row index

getRowCount

public int getRowCount()
Description copied from interface: Cursor
Gets the count of rows within result set for this page

Specified by:
getRowCount in interface Cursor
Returns:
row count


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.