Showing posts with label persistence. Show all posts
Showing posts with label persistence. Show all posts

Monday, June 30, 2008

Save me !

Lets explore the RMS management available in Diamond Powder.
The MIDlet project save-me-diamond-powder deals with new records and enable old record edition through StorageManager.


The numbered arrows are related to the following relevant code fragments:

(1) The collector gains focus to receive a new record. There is no difference from previous sample (hello world)
(2) The collector finishes his job and a StorageManager saves collected data into a RMS record. We can store a new record or update an old one.


(3) The StorageManager is asked about all record numbers from a given schema. Afterwards, the StorageManager is manipulated to retrieve values from specific fields for each identified record. This gives us enough information to build a menu of old records.


(4) The StorageManager is manipulated to load a whole record into our collector. At this point we use the collector to edit a previously stored record.