flex.messaging.io
Class PagedRowSet

java.lang.Object
  extended by flex.messaging.io.PagedRowSet
All Implemented Interfaces:
PageableRowSet

public class PagedRowSet
extends Object
implements PageableRowSet

A wrapper for a RowSet to make it pageable. This technique is recommended if the RowSet is 'too big' to download all at once, AND the developer's client-side code is capable of dealing with non-fully-populated recordsets, that is, ActionScript RecordSets which are missing some of their data.


Field Summary
static String DEFAULT_PAGING_SERVICE_NAME
          Pageable Rowset Service Name.
 
Fields inherited from interface flex.messaging.io.PageableRowSet
CURSOR, PAGE
 
Constructor Summary
PagedRowSet(RowSet r, int p)
          Constructor
PagedRowSet(RowSet r, int p, boolean createID)
          Allows the unique id generation of the RowSet to be toggled.
 
Method Summary
 String[] getColumnNames()
          List the column names of the result set.
 String getID()
           
 int getInitialDownloadCount()
          If this function returns a number >= the total number of rows in the result set, then the result set should be simply returned to the client in full.
 Map getRecords(int startIndex, int count)
          Use this method to get a map of the index used to start the data page, and an array of arrays of the actual data page itself.
 int getRowCount()
           
 String getServiceName()
           
 void setServicename(String serviceName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAGING_SERVICE_NAME

public static final String DEFAULT_PAGING_SERVICE_NAME
Pageable Rowset Service Name.

See Also:
Constant Field Values
Constructor Detail

PagedRowSet

public PagedRowSet(RowSet r,
                   int p)
Constructor

Creates a UUID for this object. Format: `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'

Parameters:
r - The RowSet to be paged.
p - The initial page size.

PagedRowSet

public PagedRowSet(RowSet r,
                   int p,
                   boolean createID)
Allows the unique id generation of the RowSet to be toggled.

See Also:
PagedRowSet.PagedRowSet(RowSet, int)
Method Detail

getColumnNames

public String[] getColumnNames()
                        throws SQLException
List the column names of the result set.

Specified by:
getColumnNames in interface PageableRowSet
Returns:
String[] An array of the column names as strings, as ordered by the result set provider's column number assignment.
Throws:
SQLException

getRecords

public Map getRecords(int startIndex,
                      int count)
               throws SQLException
Use this method to get a map of the index used to start the data page, and an array of arrays of the actual data page itself.

Specified by:
getRecords in interface PageableRowSet
Returns:
Map A map with two fields, the index of the row to start the page, and an array of arrays for the actual data page.
Throws:
SQLException

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface PageableRowSet
Returns:
int The total number of rows in the result set.

getInitialDownloadCount

public int getInitialDownloadCount()
If this function returns a number >= the total number of rows in the result set, then the result set should be simply returned to the client in full. However, if it is < the total size, then this object itself is saved in Session data, and tagged with a unique ID.

Specified by:
getInitialDownloadCount in interface PageableRowSet

getID

public String getID()
Specified by:
getID in interface PageableRowSet
Returns:
String This paged result's (universally unique) id.

getServiceName

public String getServiceName()
Specified by:
getServiceName in interface PageableRowSet
Returns:
String The name of the service that will manage this paged result.

setServicename

public void setServicename(String serviceName)
Specified by:
setServicename in interface PageableRowSet
Parameters:
serviceName - Update the name of the service that manages the pages for this query.


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/io/PagedRowSet.html