Defining Alternate Read Operations

Define alternate read operations that augment mobile business object (MBO) operations when used with a chained read policy.

A primary read operation is the enterprise information system (EIS) operation for an MBO that defines how the MBO is populated. In Sybase Unwired Platform 1.2.1, a new operation of type "read" has been introduced. A read operation, also called an alternate read operation, always uses the apply operation result cache policy when it returns a record set that is applied to the consolidated database (CDB, or cache). You can define any number of alternate read operations for an MBO. In general alternate read operations return data corresponding to a finer granularity than a primary read of the MBO, enabling the cache to be updated at a finer granularity. Alternate read operations can be chained to any create, update, or delete (CUD) operation of an MBO. The Device API does not directly support calling the alternate read operations, but you can invoked them independently using data change notification (DCN) requests.
  1. Define an alternate read operation using one of these methods :
    • Select the Operation icon from the Mobile Application Diagram palette and click the Operations portion of the MBO.
    • Select Add from the Operations tab of the Properties view.
    • You can also create alternate read operations when you assign a chained read cache policy to an MBO operation.
  2. From the New Operation wizard, name the operation, and specify the Alternate Read as the Operation type.
  3. Specify the data source type and connection profile from which you are creating the operation, and click Next.
  4. Complete the operation definition according to the data source type to which you are binding the operation. For example:
    • Database datasource – select any of the operations.
    • Web service datasource – from the XSLT Definition screen, select Configure XSLT to access the XSLT.
  5. Modify the operation to meet the intended need. For example, you may have an MBO operation that inserts a record into the database, then the alternate read operation retrieves the record only if it affects a particular user.