Binding a Database Data Source to a Mobile Business Object

Bind the attributes and operations of a database object to a mobile business object.

  1. In the Bind Data Source wizard, enter the following information and click Next:
    Field Action
    Specify data source Select and bind to a data source now.
    Data source type Select Database from the drop-down list.
    Connection profile Select the database connection profile to which you are binding your mobile business object attributes. If the required data source is not in the list, click Create to define a new connection profile.
  2. Follow the wizard instructions to map and bind data source information the mobile business object attributes and operations.
    Field Action
    Data source specific information In the wizard, enter the SQL statement used to access the database information. Click:
    • SQL Statement Type – either a SQL query statement or a stored procedure.
    • Validate – to validate the syntax of the SQL statement.
    • Visual SQL – to launch a Visual SQL dialog, from where you can create the SQL statement.
    • Preview – to view the results of the SQL statement against the data source.
    Runtime Data Source Credential The User Name and Password required to gain access to the runtime data source.

    The user name and password can be entered directly, retrieved from a personalization key, or by selecting New key and creating a new personalization key.

    Result set Filter Optionally add a result set filter to the MBO.

    A result set filter is a custom java class that manipulates the rows or columns of data returned from a read operation for an MBO. To write a filter, developers must have previous experience with Java programming — particularly with the reference implementations for javax.sql.RowSet, which is used to implement the filter interface. See Result Set Filters.

    Parameters From the Parameters page you can configure parameters:
    1. Link (map) or unlink (unmap) from one parameter to the remote operation's argument.
    2. Use Add to add a new parameter, then map it to one of the arguments using the approach described in step one, or select an argument from the Argument drop-down list.
    3. Use Delete or Delete all to remove parameters.
      Note: (Properties view only) This is different from unmapping; after unmapping, the parameter still exists and displayed in the bottom table, but the original argument moves down.
    Attributes Mapping Attributes mapping is generated as follows:
    1. The tabular view columns are generated automatically.
    2. If an existing attribute matches the name and data type of one of the columns, they are mapped.
    3. Otherwise, you must manually link (map) from the attribute to the tabular view columns.
    (Properties view only) The methods that you use to map attributes include:
    1. In the visual portion of the diagram, drag from the square icon of an attribute to the square icon of a tabular view column.

    2. In the bottom table, select a column from the drop-down list of the map To cell.
    From the Attributes Mapping screen, you can modify the mappings by selecting:
    • Delete or Delete All – remove the selected attribute or all attributes.
    • Add – add a new attribute.
    • Up or Down – adjust attribute position.

    The data type of a data source column is read-only, and changes only if the Map to column changes, except for JDBC, in which case the column type is not read-only, and you can change the data type according to the back-end data source.

  3. The Role Assignments screen allows you to Create, Add, and Remove role assignments from the mobile business object.
  4. Click Finish when done.
    The Mobile Application Diagram is refreshed with the new mobile business object attributes.
Related concepts
Result Set Filters