5.6. Inheritance
JDO’s support for implementation and inheritance hierarchies is a major benefit of the technology. It enables the design of domain object models that closely represent the business domain.
The support for inheritance is particularly flexible. A class might be persistence-capable even if its superclass is not. Equally, that class’s subclasses may be persistence-capable or not as required by the developer. Thus, in an inheritance hierarchy, classes may be independently persistence-capable and non-persistence-capable.
When one class in an inheritance hierarchy is defined as persistence-capable in a persistence descriptor, the persistence modifiers ascribed to its fields (per sistent, transactional or none) are inherited by subclasses. ...
Get Java™ Data Objects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.