Esri Geoportal Server
1.0

com.esri.gpt.framework.request
Class PageCursor

java.lang.Object
  extended by com.esri.gpt.framework.request.PageCursor
All Implemented Interfaces:
IPageCursor, Serializable
Direct Known Subclasses:
SearchFilterPagination

public class PageCursor
extends Object
implements Serializable, IPageCursor

Defines parameters associated with a UI page cursor.

See Also:
Serialized Form

Nested Class Summary
protected  class PageCursor.DefaultRecordsPerPageProvider
          Default records per page provider.
static interface PageCursor.IRecordsPerPageProvider
          Records per page provider.
 
Field Summary
protected  int _currentPage
           
protected  int _pagesPerCursor
           
protected  PageCursor.IRecordsPerPageProvider _recordsPerPageProvider
           
protected  int _totalRecordCount
           
 
Constructor Summary
PageCursor()
          Default constructor.
 
Method Summary
 void checkCurrentPage()
          Check current page.
 int getCurrentPage()
          Gets the current page for the cursor.
 int getEndPage()
          Gets the ending page for the cursor.
 int getEndRecord()
          Gets the ending record for the current page.
 boolean getHasNextPage()
          Determine if the cursor has a next page.
 boolean getHasPreviousPage()
          Determine if the cursor has a previous page.
 int getNextPage()
          Gets the next page.
 int getPagesPerCursor()
          Gets the maximum number of pages to be displayed per cursor.
 int getPreviousPage()
          Gets the previous page.
 int getRecordsPerPage()
          Gets the maximum number of records to be displayed per page.
 int getStartPage()
          Gets the starting page for the cursor.
 int getStartRecord()
          Gets the starting record for the current page.
 int getTotalPageCount()
          Gets the total page count.
 int getTotalRecordCount()
          Gets the total record count.
 void setCurrentPage(int currentPage)
          Sets the current page for the cursor.
 void setPagesPerCursor(int pagesPerCursor)
          Sets the maximum number of pages to be displayed per cursor.
 void setRecordsPerPage(int recordsPerPage)
          Sets the maximum number of records to be displayed per page.
 void setRecordsPerPageProvider(PageCursor.IRecordsPerPageProvider recordsPerPageProvider)
          Sets records per page provider.
 void setTotalRecordCount(int totalRecordCount)
          Sets the total record count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_currentPage

protected int _currentPage

_pagesPerCursor

protected int _pagesPerCursor

_totalRecordCount

protected int _totalRecordCount

_recordsPerPageProvider

protected PageCursor.IRecordsPerPageProvider _recordsPerPageProvider
Constructor Detail

PageCursor

public PageCursor()
Default constructor.

Method Detail

getCurrentPage

public int getCurrentPage()
Gets the current page for the cursor.

Specified by:
getCurrentPage in interface IPageCursor
Returns:
the current page

setCurrentPage

public void setCurrentPage(int currentPage)
Sets the current page for the cursor.

Specified by:
setCurrentPage in interface IPageCursor
Parameters:
currentPage - the current page

getEndPage

public int getEndPage()
Gets the ending page for the cursor.

Specified by:
getEndPage in interface IPageCursor
Returns:
the ending page

getEndRecord

public int getEndRecord()
Gets the ending record for the current page.

Specified by:
getEndRecord in interface IPageCursor
Returns:
the ending record

getHasNextPage

public boolean getHasNextPage()
Determine if the cursor has a next page.

Specified by:
getHasNextPage in interface IPageCursor
Returns:
true if the cursor has a next page

getHasPreviousPage

public boolean getHasPreviousPage()
Determine if the cursor has a previous page.

Specified by:
getHasPreviousPage in interface IPageCursor
Returns:
true if the cursor has a previous page

getNextPage

public int getNextPage()
Gets the next page.

Specified by:
getNextPage in interface IPageCursor
Returns:
the next page

getPagesPerCursor

public int getPagesPerCursor()
Gets the maximum number of pages to be displayed per cursor.

Specified by:
getPagesPerCursor in interface IPageCursor
Returns:
the maximum number of pages per cursor

setPagesPerCursor

public void setPagesPerCursor(int pagesPerCursor)
Sets the maximum number of pages to be displayed per cursor.

Specified by:
setPagesPerCursor in interface IPageCursor
Parameters:
pagesPerCursor - the maximum number of pages per cursor

getPreviousPage

public int getPreviousPage()
Gets the previous page.

Specified by:
getPreviousPage in interface IPageCursor
Returns:
the previous page

getRecordsPerPage

public int getRecordsPerPage()
Gets the maximum number of records to be displayed per page.

Specified by:
getRecordsPerPage in interface IPageCursor
Returns:
the maximum number of records per page

setRecordsPerPage

public void setRecordsPerPage(int recordsPerPage)
Sets the maximum number of records to be displayed per page.

Specified by:
setRecordsPerPage in interface IPageCursor
Parameters:
recordsPerPage - the maximum number of records per page

setRecordsPerPageProvider

public void setRecordsPerPageProvider(PageCursor.IRecordsPerPageProvider recordsPerPageProvider)
Sets records per page provider.

Specified by:
setRecordsPerPageProvider in interface IPageCursor
Parameters:
recordsPerPageProvider - records per page provider

getStartPage

public int getStartPage()
Gets the starting page for the cursor.

Specified by:
getStartPage in interface IPageCursor
Returns:
the starting page

getStartRecord

public int getStartRecord()
Gets the starting record for the current page.

Specified by:
getStartRecord in interface IPageCursor
Returns:
the starting record

getTotalPageCount

public int getTotalPageCount()
Gets the total page count.

The total page count is based upon the total record count and the number of records per page.

Specified by:
getTotalPageCount in interface IPageCursor
Returns:
the total page count

getTotalRecordCount

public int getTotalRecordCount()
Gets the total record count.

This is the total record count associated with a query. It is used in conjunction with recordsPerPage to determine the number of pages available to the cursor.

Specified by:
getTotalRecordCount in interface IPageCursor
Returns:
the total record count

setTotalRecordCount

public void setTotalRecordCount(int totalRecordCount)
Sets the total record count.

This is the total record count associated with a query. It is used in conjunction with recordsPerPage to determine the number of pages available to the cursor.

Specified by:
setTotalRecordCount in interface IPageCursor
Parameters:
totalRecordCount - the total record count

checkCurrentPage

public void checkCurrentPage()
Check current page.

Specified by:
checkCurrentPage in interface IPageCursor

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.