com.sybase.uep.bobclient.data
Class SPDataHandler

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

public class SPDataHandler
extends java.lang.Object
implements IMobileApplicationDataHandler

Other control uses SPDataHandler instance to access the data of a given SPMBOModel instance.

Author:
haowang

Constructor Summary
SPDataHandler()
           
 
Method Summary
 void clearCachedRows()
          Clears the cached rows in the handler
 MBOModel getApplicationData()
           
 java.lang.String getDynamicNamedQuery()
          Get the dynamic named query name
 java.util.Hashtable getDynamicNamedQueryParameters()
          Get the dynamic named query parameters hash table
 java.lang.String getNamedQuery()
          Get the named query name
 java.util.Hashtable getNamedQueryParameters()
          Get the named query parameters hash table
 java.util.Vector getNamedQuerySubmitElements()
          Get the named query submit elements
 Query getQuery()
          Returns the query object
 java.lang.Object getRow(int rowIndex)
           
 java.util.Vector getRows()
           
 int getSize()
           
 void setDynamicNamedQuery(java.lang.String namedQuery)
          Set the dynamic named query name
 void setDynamicNamedQueryParameters(java.util.Hashtable parameters)
          Set the dynamic named query parameters hash table
 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 setNamedQueryParameters(java.util.Hashtable parameters)
          Set the named query parameters hash table
 void setNamedQuerySubmitElements(java.util.Vector parameters)
          Set the named query submit elements
 void setQuery(Query query)
          Sets the query object to the data handler
 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
 void setSearch(boolean isSearch)
          Sets if the query is for a search
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPDataHandler

public SPDataHandler()
Method Detail

clearCachedRows

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

Specified by:
clearCachedRows in interface IMobileApplicationDataHandler

getApplicationData

public MBOModel getApplicationData()
Specified by:
getApplicationData in interface IMobileApplicationDataHandler
Returns:
the application data maintained in the data handler

getRow

public java.lang.Object getRow(int rowIndex)
Specified by:
getRow in interface IMobileApplicationDataHandler
Returns:
the value object fetched at the given index

getRows

public java.util.Vector getRows()
Specified by:
getRows in interface IMobileApplicationDataHandler
Returns:
the cached rows in the handler instance

getSize

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

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

getQuery

public Query getQuery()
Description copied from interface: IMobileApplicationDataHandler
Returns the query object

Specified by:
getQuery in interface IMobileApplicationDataHandler
Returns:
Query

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
Parameters:
namedQuery - String value for the dynamic named query

getDynamicNamedQuery

public java.lang.String getDynamicNamedQuery()
Description copied from interface: IMobileApplicationDataHandler
Get the dynamic named query name

Specified by:
getDynamicNamedQuery in interface IMobileApplicationDataHandler
Returns:
the dynamic named query name

setNamedQuery

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

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

setNamedQueryParameters

public void setNamedQueryParameters(java.util.Hashtable parameters)
Description copied from interface: IMobileApplicationDataHandler
Set the named query parameters hash table

Specified by:
setNamedQueryParameters in interface IMobileApplicationDataHandler
Parameters:
parameters - Hashtable map of name value pair

setNamedQuerySubmitElements

public void setNamedQuerySubmitElements(java.util.Vector parameters)
Description copied from interface: IMobileApplicationDataHandler
Set the named query submit elements

Specified by:
setNamedQuerySubmitElements in interface IMobileApplicationDataHandler
Parameters:
parameters - Vector list of SubmitElement objects

setQuery

public void setQuery(Query query)
Description copied from interface: IMobileApplicationDataHandler
Sets the query object to the data handler

Specified by:
setQuery in interface IMobileApplicationDataHandler

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

setSearch

public void setSearch(boolean isSearch)
Description copied from interface: IMobileApplicationDataHandler
Sets if the query is for a search

Specified by:
setSearch in interface IMobileApplicationDataHandler
Parameters:
isSearch - - true if the query is for a search

setDynamicNamedQueryParameters

public void setDynamicNamedQueryParameters(java.util.Hashtable parameters)
Description copied from interface: IMobileApplicationDataHandler
Set the dynamic named query parameters hash table

Specified by:
setDynamicNamedQueryParameters in interface IMobileApplicationDataHandler
Parameters:
parameters - Vector list of name value pair

getDynamicNamedQueryParameters

public java.util.Hashtable getDynamicNamedQueryParameters()
Description copied from interface: IMobileApplicationDataHandler
Get the dynamic named query parameters hash table

Specified by:
getDynamicNamedQueryParameters in interface IMobileApplicationDataHandler
Returns:
the dynamic named query parameters hash table

getNamedQuery

public java.lang.String getNamedQuery()
Description copied from interface: IMobileApplicationDataHandler
Get the named query name

Specified by:
getNamedQuery in interface IMobileApplicationDataHandler
Returns:

getNamedQueryParameters

public java.util.Hashtable getNamedQueryParameters()
Description copied from interface: IMobileApplicationDataHandler
Get the named query parameters hash table

Specified by:
getNamedQueryParameters in interface IMobileApplicationDataHandler
Returns:

getNamedQuerySubmitElements

public java.util.Vector getNamedQuerySubmitElements()
Description copied from interface: IMobileApplicationDataHandler
Get the named query submit elements

Specified by:
getNamedQuerySubmitElements in interface IMobileApplicationDataHandler
Returns: