A mobile business object can be in one of three states:
The mobile business object class provides properties or methods for querying the original state and the downloaded state:
public sample.Customer GetOriginalState() public Customer DownloadState;
The original state is valid only before the application synchronizes with the Unwired Server. After synchronization has completed successfully, the original state is cleared and set to null.
Customer cust = Customer.FindByPrimaryKey(101); // state 1 cust.Fname = "supAdmin"; cust.Company_name = "Sybase"; cust.Phone = "777-8888"; cust.Save(); // state 2 Customer org = cust.GetOriginalState(); // state 1 //suppose there is new download for Customer 101 here Customer download = cust.DownloadState; // state 3 cust.CancelPending(); // state 3
Using all three states, the application can resolve most conflicts that may occur.