We don't want every business class writing its own persistence; we use many developers for business classes, and want them to be able to concentrate on business issues, not having to worry about persistence. So we (and many others in similar situations), made a superclass called PersistentObject, which contained the protocol, caught the "save this object" message, etc.
Good trick, and reasonably obvious application of encapsulation, inheritance, etc. Downside is you have to have source code and recompile to change the PersistenceMechanism, unlike ContainerManagedPersistence (as I understand it). -- AlistairCockburn
If you want to use different a QueryLanguage / QueryApi? you still need to recompile, even with ContainerManagedPersistence, there is no way around that
In ComponentBasedDevelopment, sometimes inheritance isn't possible, so you can't directly reuse a superclass like PersistentObject. For instance, COM doesn't have inheritance. This causes you to do component reuse ways like these:
Understanding Object Persistence
This is useful in languages that have little or no support for reflection. In reflective languages, object persistence is implemented by PersistenceMapping?.