O'Reilly logo

Java™ Data Objects by Robin M. Roos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required