Objects that inherit from
RWCollectable have the ability to save not only their contents, but also their
relationships with other objects that inherit from
RWCollectable. We call this feature
isomorphic persistence. Class
RWCollectable has
isomorphic persistence, but more than that, it can determine at run time the type of the object to be saved or restored. We call the type of persistence provided by
RWCollectable polymorphic persistence, and recognize it as a superset of isomorphic persistence.
Polymorphic persistence is the storage and retrieval of objects to and from a stream or file in such a way that pointer relationships are preserved among persisted objects, which can be restored without the restoring process knowing the object’s type. Polymorphic, isomorphic, and simple persistence are all covered in detail in
Chapter 8, Persistence.