com.sybase.uep.bobclient.data
Class MobileApplicationDataPagingHandler

java.lang.Object
  extended by com.sybase.uep.bobclient.data.MobileApplicationDataHandler
      extended by com.sybase.uep.bobclient.data.MobileApplicationDataPagingHandler
All Implemented Interfaces:
IMobileApplicationDataHandler

public class MobileApplicationDataPagingHandler
extends MobileApplicationDataHandler

The MobileApplicationDataPagingHandler extends the base MobileApplicationDataHandler in a way that it offers extra handling over the result collections.

The paging handler is instantiated and set to the MobileDataControl from the generated client. It should have the necessary paging parameters defined by user. The handler caches the pages of records according to the paging buffer limit attribute and execute the query upon request.

Author:
tqiu
See Also:
PagingObject

Field Summary
 
Fields inherited from class com.sybase.uep.bobclient.data.MobileApplicationDataHandler
_application, _appLogger, _dynamicNamedQuery, _isSearch, _namedQuery, _namedQueryParameters, _namedQuerySubmitElements, _parentApplication, _parentAssociationName, _parentSelectedRow, _query, _rows, _size, FIND_ALL
 
Constructor Summary
MobileApplicationDataPagingHandler(PagingObject pagingObj)
           
 
Method Summary
 void clearAllPagingRows()
          Clear out all buffered paging row collections
 void clearCachedRows()
          Clears the cached rows in the handler
 java.lang.Object getRow(int rowIndex)
          When this method gets called, the paging handler would automatically scrolls the page if the given index exceeds the maximum counts of the cached rows or can not be fetched in the cached pages.
 int getSize()
           
 void setDynamicNamedQuery(java.lang.String namedQuery)
          Set the dynamic named query name
 void setMobileApplication(MBOModel application)
          Sets the motile application to the data handler, calling this method would clear the cached rows if necessary
 void setNamedQuery(java.lang.String namedQuery)
          Set the named query name
 void setRelationshipData(MBOModel parentApplication, java.lang.Object parentSelectedRow, java.lang.String associationName)
          Sets the relationship data to the handler, including parent MBO,parent selected row and association name
 
Methods inherited from class com.sybase.uep.bobclient.data.MobileApplicationDataHandler
getApplicationData, getDynamicNamedQuery, getDynamicNamedQueryParameters, getNamedQuery, getNamedQueryParameters, getNamedQuerySubmitElements, getQuery, getRows, isFetchingThroughRelationship, setDynamicNamedQueryParameters, setNamedQueryParameters, setNamedQuerySubmitElements, setQuery, setSearch
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobileApplicationDataPagingHandler

public MobileApplicationDataPagingHandler(PagingObject pagingObj)
Method Detail

getRow

public java.lang.Object getRow(int rowIndex)
When this method gets called, the paging handler would automatically scrolls the page if the given index exceeds the maximum counts of the cached rows or can not be fetched in the cached pages.

Specified by:
getRow in interface IMobileApplicationDataHandler
Overrides:
getRow in class MobileApplicationDataHandler
Parameters:
rowIndex -
Returns:
the value object fetched at the given index

getSize

public int getSize()
Specified by:
getSize in interface IMobileApplicationDataHandler
Overrides:
getSize in class MobileApplicationDataHandler
Returns:
the total size of the returned results

clearAllPagingRows

public void clearAllPagingRows()
Clear out all buffered paging row collections


setDynamicNamedQuery

public void setDynamicNamedQuery(java.lang.String namedQuery)
Description copied from interface: IMobileApplicationDataHandler
Set the dynamic named query name

Specified by:
setDynamicNamedQuery in interface IMobileApplicationDataHandler
Overrides:
setDynamicNamedQuery in class MobileApplicationDataHandler
Parameters:
namedQuery - String value for the dynamic named query

setNamedQuery

public void setNamedQuery(java.lang.String namedQuery)
Description copied from interface: IMobileApplicationDataHandler
Set the named query name

Specified by:
setNamedQuery in interface IMobileApplicationDataHandler
Overrides:
setNamedQuery in class MobileApplicationDataHandler
Parameters:
namedQuery - String value for the named query

setMobileApplication

public void setMobileApplication(MBOModel application)
Description copied from interface: IMobileApplicationDataHandler
Sets the motile application to the data handler, calling this method would clear the cached rows if necessary

Specified by:
setMobileApplication in interface IMobileApplicationDataHandler
Overrides:
setMobileApplication in class MobileApplicationDataHandler

setRelationshipData

public void setRelationshipData(MBOModel parentApplication,
                                java.lang.Object parentSelectedRow,
                                java.lang.String associationName)
Description copied from interface: IMobileApplicationDataHandler
Sets the relationship data to the handler, including parent MBO,parent selected row and association name

Specified by:
setRelationshipData in interface IMobileApplicationDataHandler
Overrides:
setRelationshipData in class MobileApplicationDataHandler

clearCachedRows

public void clearCachedRows()
Description copied from interface: IMobileApplicationDataHandler
Clears the cached rows in the handler

Specified by:
clearCachedRows in interface IMobileApplicationDataHandler
Overrides:
clearCachedRows in class MobileApplicationDataHandler