Detailed discussion

com.syncbuilder.storage.Database

A com.syncbuilder.storage.Database object contains the complete state of an opened database and it offers all the methods you need to manipulate that database. You can obtain a Database object by calling the openDB() family of methods of the com.syncbuilder.sync.Dlp object. Read the section called Overview in Chapter 2 to find out how to obtain a Dlp object.

The methods of the Database object shield you from the details of the DLP protocol. The Database object contains a reference to the Dlp object from which it was created and employs that object in order to manipulate the data on the Palm device.

Figure 3-2. com.syncbuilder.storage.Database and related classes

com.syncbuilder.storage.Record

The Record class operates on the single records of a database. It can convert between the internal data format of an application and a more convenient abstraction that offers easy access to a record's attributes. Record is an abstract class and you will always use one of its specializations. There is one specialization of Record for each application that requires special treatment. Specializations of Record are readily available for the built-in applications of the Palm device. There is also com.syncbuilder.storage.generic.Record which can be used with arbitrary applications, but offers no special support for interpreting the data of the application.

The proper specialization of the Record class is selected for you by the Database class. Use the createRecord() family of methods if you wish to create new records, or use the getRecord() family of methods if you wish to retrieve existing records from the database.

NOTE: You shall never create an instance of the Record class with the new operator! This may allow you to create records which cannot be inserted into the database. Use the createRecord() methods instead!

Figure 3-3. com.syncbuilder.storage.Record and related classes

com.syncbuilder.storage.AppBlock

TBD

Figure 3-4. com.syncbuilder.storage.AppBlock and related classes