摘要 |
A method and apparatus for persistently storing information objects in a secondary store is provided. Each object to be stored persistently is made a subclass of a persistent object class. The persistent object declares metadata that defines parameters of a table in the secondary store in which instances of the object are stored, and external requirements of the object. When a persistent object inherits attributes from one or more parent object classes, instances of each parent class are represented in separate tables. When a persistent object is read or written by an application program, methods in the persistent object class automatically retrieve or store information for each field of the persistent object by recursively calling a read method or a write method for each class from which the persistent object inherits, and the object's own class. The read method and write methods automatically create and submit commands to the secondary store.
|