6.4. PersistenceManager

The PersistenceManager interface is the application developer’s primary means of affecting the state of persistence-capable instances. In Chapter 4, I presented examples illustrating the use of a persistence manager’s state management methods (makePersistent, deletePersistent, makeTransient, evict, refresh, etc.). We will now examine the PersistenceManager interface in more detail, but without unnecessarily reproducing Chapter 4’s examples.

The PersistenceManager interface presents overloaded variants of most cache management and instance lifecycle methods. One of these manipulates a single instance, whilst others perform the same manipulation to collections or arrays of instances, and potentially another applies the manipulation ...

Get Java™ Data Objects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.