This page describes the Java classes that comprise the application server used by the Linguist data package.
LDBObject
The parent class for each of the main classes is LDBObject. This provides a convenient place to put common functionality such as print() and println() methods, but otherwise provides no functionality.
LDBClient
The only route into the database system is through LDBClient. An instance of this class is created when the script starts up, and provides the system with:
A central point that handles access to the transaction object, with the ability to create a new transaction when asked.
A means by which changes to a record cause a notification to be sent to every other client currently interested in the record, by means of the LDBNotifyListener interface.
LDBField
This class represents a single field in a record, and holds the current value of the field. It also holds a field specification, allowing the system to know how the field contents should be interpreted.
LDBFieldSpec
This class holds the name of a field, its type and its size, but not its current value. Each LDBField object contains a LDBFieldSpec in addition to the current value of the field.
LDBPersistent
This abstract class is the base class for any database driver. It specifies the methods that must be implemented by a database driver in order to save and restore records and perform other related tasks. It contains no functionality of its own other than an initializer that takes the name of the database.
LDBRecord
This class is where most of the work is done, in conjunction with the transaction object. It contains a table of fields and another of all the clients currently interested in the record. Methods are provided to create the record, to populate it with fields and to set the values of thes fields or to retrieve them from the backing store.
LDBTransaction
This class manages individual transactions and maintains a cache of objects to avoid excessive database traffic. Its most important property is a LDBPersistent object, which provides the access to and from the database in a non-specific manner.