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