5.3. First- and second-class objects

JDO divides instances into first-class and second-class objects. There are specific differences between the operation of shared instances when those instances are first or second class, and the developer must appreciate these differences.

First-class objects are instances of PersistenceCapable classes, which have a JDO identity and therefore support uniquing in the PersistenceManager ’s cache. Recall that uniquing is the process by which the PersistenceManager ensures that only one cached persistent instance of a particular PersistenceCapable class exists with a given identity.

When field values of a first-class object are altered, that object is transitioned to an appropriate dirty state (e.g. from Hollow ...

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.