Mobile Business Object States

A mobile business object can be in one of three states.

The mobile business object class provides properties for querying the original state and the downloaded state:

public Customer getOriginalState();
public Customer getDownloadState();
Customer cust = Customer.findById(101);        // state 1
cust.setFname("firstName");
cust.setCompany_name("Sybase");
cust.setPhone("777-8888");
cust.save();                                   // state 2 
Customer org = cust.getOriginalState();        // state 1
//suppose there is new download for Customer 101 here
Customer download = cust.getDownloadState();   // state 3
cust.cancelPending();                          // state 3

Using all three states, the application can resolve most conflicts that may occur.