You design table schemata with tradition relational databases, but you focus on persistent class schemata when work with TheObjectBase. Refer to the Object-Relation-Kin Model to see why and how the relational model can be natively implemented in a general purpose object oriented programming language, like Java. But you don't have to be a database theorist to start working with TOB. You'll find things rather intuitive in pratices.
All non-transient instance fields of a persistent class are persistent fields.
Like all Java objects derive from
java.lang.Object
, all persistent objects in TOB derive from
av.tob.TheObject
.
Imagine you have a rope with a knot at one end, another object can be tied by this knot, and you just poll the rope to get that object, as you hold the rope. You must be a relation object to be able to hold ties.
When more than one related objects prone, it probably falls to define a Kin or KinSet field, regarding relevant Tie fields.
Ties and Kins produce physical object graphs loaded as wholes, so seldom used objects should be loosely associated not to hold up memory unnecessarily.
Persistence notifications function like triggers in traditional relational databases. They are triggered behaviors at certain persistence points, and implemented as overridable instance methods of persistent objects. This chapter covers common notifications persistence applications are normally interested to override.
Persistent classes have an inheritance hierarchy, all things are inherited by subclasses from their super class.