com.sage.orion.sdata.servlet
Class KeyedPagingControl

java.lang.Object
  extended by com.sage.orion.sdata.servlet.DefaultPagingControl
      extended by com.sage.orion.sdata.servlet.KeyedPagingControl
All Implemented Interfaces:
PagingControl

public class KeyedPagingControl
extends DefaultPagingControl

A structure to hold the elements of any keyed paging control request.

This holds the paging information as Objects rather than primitives, with null references used if they were not specified.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sage.orion.sdata.servlet.PagingControl
PagingControl.PagingMethod
 
Constructor Summary
KeyedPagingControl(java.lang.Integer count, java.lang.String startKey, SDataConstants.KeyDirection keyDirection)
          Constructs an instance of the KeyedPagingControl class based upon the given arguments.
 
Method Summary
 SDataConstants.KeyDirection getKeyDirection()
          Gets the SDataConstants.KeyDirection for the paging request.
 PagingControl.PagingMethod getMethod()
          Gets the paging method used.
 java.lang.String getStartKey()
          Gets the startKey value for paging.
 
Methods inherited from class com.sage.orion.sdata.servlet.DefaultPagingControl
getCount, getStartIndex, isLastPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyedPagingControl

public KeyedPagingControl(java.lang.Integer count,
                          java.lang.String startKey,
                          SDataConstants.KeyDirection keyDirection)
Constructs an instance of the KeyedPagingControl class based upon the given arguments.

The startKey and keyDirection parameters cannot both be missing, currently.

Parameters:
count - either a null reference if the count is not specified, or an Integer containing the number of records being requested.
startKey - either a null reference if no key is provided or else the key value provided, in the SData form. The caller is responsible for removing any quotation marks required and performing any decoding associated with the transport mechanism. However the application-specific decoding of a possibly multi-part key must not have been done.
keyDirection - either a null reference if no direction is specified or else the appropriate direction enumeration value if a direction was specified or defaulted (e.g. on error)
Method Detail

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
Overrides:
getStartKey in class DefaultPagingControl
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
Overrides:
getKeyDirection in class DefaultPagingControl
Returns:
the SDataConstants.KeyDirection or null if no keyDirection exists

getMethod

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

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


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