com.sage.orion.sdata.servlet
Class DefaultPagingControl

java.lang.Object
  extended by com.sage.orion.sdata.servlet.DefaultPagingControl
All Implemented Interfaces:
PagingControl
Direct Known Subclasses:
IndexedPagingControl, KeyedPagingControl

public class DefaultPagingControl
extends java.lang.Object
implements PagingControl


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sage.orion.sdata.servlet.PagingControl
PagingControl.PagingMethod
 
Constructor Summary
DefaultPagingControl(java.lang.Integer count)
          Constructor
 
Method Summary
 java.lang.Integer getCount()
          Gets the number of records to be returned.
 SDataConstants.KeyDirection getKeyDirection()
          Gets the SDataConstants.KeyDirection for the paging request.
 PagingControl.PagingMethod getMethod()
          Gets the paging method used.
 java.lang.Integer getStartIndex()
          Gets the starting index of the first record to be returned.
 java.lang.String getStartKey()
          Gets the startKey value for paging.
 boolean isLastPage()
          returns whether this request is for the last page or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPagingControl

public DefaultPagingControl(java.lang.Integer count)
Constructor

Parameters:
count -
Method Detail

getCount

public java.lang.Integer getCount()
Description copied from interface: PagingControl
Gets the number of records to be returned.

Specified by:
getCount in interface PagingControl
Returns:
the requested number of records to be returned or null if not found.

getStartKey

public java.lang.String getStartKey()
Description copied from interface: PagingControl
Gets the startKey value for paging.

The value returned, if any, is in the SData form, without any surrounding quotes etc. and without any transport-related encoding. However it is still encoded according to the application's method for encoding keys.

Specified by:
getStartKey in interface PagingControl
Returns:
the startKey value or null if there is no startKey value.

getKeyDirection

public SDataConstants.KeyDirection getKeyDirection()
Description copied from interface: PagingControl
Gets the SDataConstants.KeyDirection for the paging request.

Specified by:
getKeyDirection in interface PagingControl
Returns:
the SDataConstants.KeyDirection or null if no keyDirection exists

getStartIndex

public java.lang.Integer getStartIndex()
Description copied from interface: PagingControl
Gets the starting index of the first record to be returned.

Note: This index is 1-based.

Specified by:
getStartIndex in interface PagingControl
Returns:
the starting index (1-based) of the first record to be returned or null if not found.

isLastPage

public boolean isLastPage()
Description copied from interface: PagingControl
returns whether this request is for the last page or not.

Specified by:
isLastPage in interface PagingControl
Returns:
true if the lastPage request has been set

getMethod

public PagingControl.PagingMethod getMethod()
Description copied from interface: PagingControl
Gets the paging method used.

Specified by:
getMethod in interface PagingControl
Returns:
the PagingControl.PagingMethod used.


Copyright © 2011 Sage Software, Inc. All rights reserved.