Optional Features
JDO defines some features that are optional; JDO-compliant
implementations are not required to implement them. Each optional
feature is identified by a unique name, which includes a javax.jdo.option prefix. You can call the supportedOptions( ) method, defined in
PersistenceManagerFactory, to
determine which options an implementation supports; it returns a
Collection of Strings that contain an option string. Chapter 7 presents an example using
this method. Here we enumerate all the optional features and their
names.
The optional features can be grouped into the following categories:
Identity options
Optional collections
Transaction-related optional features
Identity Options
Each instance managed in a JDO environment must have a unique identifier. The following options are associated with identity:
javax.jdo.option.ApplicationIdentityjavax.jdo.option.DatastoreIdentityjavax.jdo.option.NonDurableIdentityjavax.jdo.option.ChangeApplicationIdentity
The first three options represent different kinds of identity. The fourth option indicates whether you can change the value of the fields that represent the application identity of an instance.
Support for each form of identity is optional. However, an implementation must support either datastore or application identity, and may support both. In Chapter 1 we used datastore identity, which is supported by all of the current JDO implementations. Until we cover identity in depth in Chapter 10, all of our examples will use datastore ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access