Use Sybase Unwired WorkSpace to generate object API code containing mobile business object (MBO) references.
Develop the MBOs that will be referenced in the device applications you are developing. A mobile application project must contain at least one non-online MBO. You must have an active connection to the datasources to which the MBOs are bound.
From | Action |
---|---|
Mobile Application Diagram | Right-click within the Mobile Application Diagram and select Generate Code. |
WorkSpace Navigator | Right-click the Mobile Application project folder that contains the mobile objects for which you are generating API code, and select Generate Code. |
Option | Description |
---|---|
Language | Select Java. |
Platform | Select the platform ( target device) for which the device client code is intended.
Note: When generating code into a plain Java project with language 'Java' and platform 'Java Me for BlackBerry', compilation errors are generated because of code references to RIM API's.
To avoid errors, generate code into a BlackBerry project.
|
Unwired Server | Specify a default Unwired Server connection profile to which the generated code connects at runtime. |
Server domain | Choose the domain to which the generated code connects. By default, if you specified an Unwired Server to which you previously connected successfully, the first domain in the list is chosen. Accept this domain, or enter a different one. Note: This field is enabled only when an Unwired Server is selected.
|
Page size | (Optional) Select the page size for the generated client code. To optimize performance, set the page size to 4K and the cache size to 128K. If you do not set the page size, the default is 20KB at runtime, which is proposed based on the selected MBO's attributes. The page size should be larger than the sum of all attribute lengths (a binary length greater than 32767 is converted to a binary large object (BLOB), and is not included in the sum; a string greater than 8191 is converted to a character large object (CLOB), and is also not included) for any MBO that is included. If an MBO attribute's length sum is greater than the page size, some attributes automatically convert to BLOB or CLOB, and therefore cannot be put into a where clause. Note: This field is only enabled when an Unwired Server is selected.
|
Package |
Enter a unique name for the Java package.
The default package is the project name. Note: Do not use "java" in package names.
The Java package name along with the class name makes the fully qualified class name that must be unique into one RIM JVM. If there is a class with the same fully qualified name, the application may fail on real device.
|
Destination | Specify the destination of the generated device client files. Enter (or Browse) to a Project path or File system path (Mobile Application project) location, and select Generated Code as the destination. JAR files are automatically added to the destination project. Select Clean up destination before code generation to clean up the destination folder before generating the device client files. |
Third-party jar file | If you select Java as the language, enter, or browse to the net_rim_api.jar file (for BlackBerry), which adds it to the project build path, and prevents errors after code generation. |