Mobile business objects are mapped to classes containing data and
methods that support synchronization and data manipulation. You can develop complex types that
support interactions with backend data sources such as SAP® and Web services. When you define
an MBO with complex types, Sybase Unwired Platform generates one class for each
complex type.
Using a complex type to create an MBO instance.
- Suppose you have an MBO named SimpleCaseList and want to use a complex data type called AuthenticationInfo to its Create method's parameter. Begin by creating the complex datatype:
AuthenticationInfo authen = new AuthenticationInfo(); // Complex structure
authen.UserName = "Demo";
- Instantiate the MBO object:
SimpleCaseList newCase = new SimpleCaseList();
newCase.Case_Type = "Incident";
newCase.Category = "Networking";
newCase.Create_Time = System.DateTime.Now;
- Call the create method of the SimpleCaseList
MBO with the complex type parameter as well as other parameters, and call submitPending() to submit the create operation to the operation replay record. Subsequent
synchronizations upload the operation replay record to the
Unwired Server and get replayed.
newCase.Create (authen, "Other", "Other", "false", "work log");
newCase.SubmitPending();