JavaTM Data Objects 3.1 Java Specification Request 243

20-March-2015

Java Data Objects Expert Group

Specification Lead: Craig Russell

Specification: JSR-000243 Java(tm) Data Objects ("Specification")

Version: 3.1

Copyright 2010 SUN MICROSYSTEMS, INC.

4150 Network Circle, Santa Clara, California 95054, U.S.A

All rights reserved.

LIMITED LICENSE GRANTS

1. License for Evaluation Purposes. Sun hereby grants you a fully-paid,

non-exclusive, non-transferable, worldwide, limited license (without the right

to sublicense), under Sun's applicable intellectual property rights to view,

download, use and reproduce the Specification only for the purpose of internal

evaluation. This includes (i) developing applications intended to run on an

implementation of the Specification, provided that such applications do not

themselves implement any portion(s) of the Specification, and (ii) discussing

the Specification with any third party; and (iii) excerpting brief portions of

the Specification in oral or written communications which discuss the

Specification provided that such excerpts do not in the aggregate constitute a

significant portion of the Specification.

2. License for the Distribution of Compliant Implementations. Sun also grants

you a perpetual, non-exclusive, non-transferable, worldwide, fully paid-up,

royalty free, limited license (without the right to sublicense) under any

applicable copyrights or, subject to the provisions of subsection 4 below,

patent rights it may have covering the Specification to create and/or distribute

an Independent Implementation of the Specification that: (a) fully implements

the Specification including all its required interfaces and functionality; (b)

does not modify, subset, superset or otherwise extend the Licensor Name Space,

or include any public or protected packages, classes, Java interfaces, fields or

methods within the Licensor Name Space other than those required/authorized by

the Specification or Specifications being implemented; and (c) passes the

Technology Compatibility Kit (including satisfying the requirements of the

applicable TCK Users Guide) for such Specification ("Compliant Implementation").

In addition, the foregoing license is expressly conditioned on your not acting

outside its scope. No license is granted hereunder for any other purpose

(including, for example, modifying the Specification, other than to the extent

of your fair use rights, or distributing the Specification to third parties).

Also, no right, title, or interest in or to any trademarks, service marks, or

trade names of Sun or Sun's licensors, Sun or the Sun's licensors is granted

hereunder. Java, and Java-related logos, marks and names are trademarks or

registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.

3. Pass-through Conditions. You need not include limitations (a)-(c) from the

previous paragraph or any other particular "pass through" requirements in any

license You grant concerning the use of your Independent Implementation or

products derived from it. However, except with respect to Independent

Implementations (and products derived from them) that satisfy limitations

(a)-(c) from the previous paragraph, You may neither: (a) grant or otherwise

pass through to your licensees any licenses under Sun's applicable intellectual

property rights; nor (b) authorize your licensees to make any claims concerning

their implementation's compliance with the Spec in question.

4. Reciprocity Concerning Patent Licenses.

a. With respect to any patent claims covered by the license granted under

subparagraph 2 above that would be infringed by all technically feasible

implementations of the Specification, such license is conditioned upon your

offering on fair, reasonable and non-discriminatory terms, to any party seeking

it from You, a perpetual, non-exclusive, non-transferable, worldwide license

under Your patent rights which are or would be infringed by all technically

feasible implementations of the Specification to develop, distribute and use a

Compliant Implementation.

b With respect to any patent claims owned by Sun and covered by the license

granted under subparagraph 2, whether or not their infringement can be avoided

in a technically feasible manner when implementing the Specification, such

license shall terminate with respect to such claims if You initiate a claim

against Sun that it has, in the course of performing its responsibilities as the

Sun, induced any other entity to infringe Your patent rights.

c Also with respect to any patent claims owned by Sun and covered by the license

granted under subparagraph, where the infringement of such claims can be avoided

in a technically feasible manner when implementing the Specification such

license, with respect to such claims, shall terminate if You initiate a claim

against Sun that its making, having made, using, offering to sell, selling or

importing a Compliant Implementation infringes Your patent rights.

5. Definitions. For the purposes of this Agreement: "Independent Implementation"

shall mean an implementation of the Specification that neither derives from any

of Sun's source code or binary code materials nor, except with an appropriate

and separate license from Sun, includes any of Sun's source code or binary code

materials; "Licensor Name Space" shall mean the public class or interface

declarations whose names begin with "java", "javax", "com.sun" or their

equivalents in any subsequent naming convention adopted by Sun through the Java

Community Process, or any recognized successors or replacements thereof; and

"Technology Compatibility Kit" or "TCK" shall mean the test suite and

accompanying TCK User's Guide provided by Sun which corresponds to the

Specification and that was available either (i) from Sun's 120 days before the

first release of Your Independent Implementation that allows its use for

commercial purposes, or (ii) more recently than 120 days from such release but

against which You elect to test Your implementation of the Specification.

This Agreement will terminate immediately without notice from Sun if you breach

the Agreement or act outside the scope of the licenses granted above.

DISCLAIMER OF WARRANTIES

THE SPECIFICATION IS PROVIDED "AS IS". SUN MAKES NO REPRESENTATIONS OR

WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES

OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT

(INCLUDING AS A CONSEQUENCE OF ANY PRACTICE OR IMPLEMENTATION OF THE

SPECIFICATION), OR THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY

PURPOSE. This document does not represent any commitment to release or implement

any portion of the Specification in any product. In addition, the Specification

could include technical inaccuracies or typographical errors.

LIMITATION OF LIABILITY

TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE

LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUE, PROFITS OR

DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,

HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR

RELATED IN ANY WAY TO YOUR HAVING, IMPELEMENTING OR OTHERWISE USING USING THE

SPECIFICATION, EVEN IF SUN AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE

POSSIBILITY OF SUCH DAMAGES.

You will indemnify, hold harmless, and defend Sun and its licensors from any

claims arising or resulting from: (i) your use of the Specification; (ii) the

use or distribution of your Java application, applet and/or implementation;

and/or (iii) any claims that later versions or releases of any Specification

furnished to you are incompatible with the Specification provided to you under

this license.

RESTRICTED RIGHTS LEGEND

U.S. Government: If this Specification is being acquired by or on behalf of the

U.S. Government or by a U.S. Government prime contractor or subcontractor (at

any tier), then the Government's rights in the Software and accompanying

documentation shall be only as set forth in this license; this is in accordance

with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD)

acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions).

REPORT

If you provide Sun with any comments or suggestions concerning the Specification

("Feedback"), you hereby: (i) agree that such Feedback is provided on a

non-proprietary and non-confidential basis, and (ii) grant Sun a perpetual,

non-exclusive, worldwide, fully paid-up, irrevocable license, with the right to

sublicense through multiple levels of sublicensees, to incorporate, disclose,

and use without limitation the Feedback for any purpose.

GENERAL TERMS

Any action related to this Agreement will be governed by California law and

controlling U.S. federal law. The U.N. Convention for the International Sale of

Goods and the choice of law rules of any jurisdiction will not apply.

The Specification is subject to U.S. export control laws and may be subject to

export or import regulations in other countries. Licensee agrees to comply

strictly with all such laws and regulations and acknowledges that it has the

responsibility to obtain such licenses to export, re-export or import as may be

required after delivery to Licensee.

This Agreement is the parties' entire agreement relating to its subject matter.

It supersedes all prior or contemporaneous oral or written communications,

proposals, conditions, representations and warranties and prevails over any

conflicting or additional terms of any quote, order, acknowledgment, or other

communication between the parties relating to its subject matter during the term

of this Agreement. No modification to this Agreement will be binding, unless in

writing and signed by an authorized representative of each party.

Rev. January, 2006

Acknowledgments

I have come to know Rick Cattell during many shared experiences in the Java database standards arena. Rick is a Distinguished Engineer at Sun Microsystems and has been the database guru and Enterprise Cardinal in the Java “Church” for many years. I am deeply in his debt for his many contributions to JDO, both technical and organizational.

I want to thank the experts on the JDO expert group who contributed ideas, APIs, feedback, and other valuable input to the standard, especially Heiko Bobzin, Constantine Plotnikov, Luca Garulli, Philip Conroy, Steve Johnson, Michael Birk, Michael Rowley, Gordan Vosicki, and Martin McClure.

I want to recognize Michael Bouschen, David Jordan, David Ezzio, Dave Bristor, and Jeff Norton for their careful review of JDO for consistency, readability, and usability. Without their contributions, JDO would not have been possible.

Since the publication of JDO 1.0, many people have contributed time, energy, and ideas to the JDO effort. I want to recognize these significant contributors: Robin Roos, Abe White, David Jordan, Michael Bouschen, Michael Watzek, Wes Biggs, Geoff Hendry, Christian Romberg, David Tinker, Patrick Linskey, Bernhard Sporkmann, David Ezzio, Dion Almaer, Dirk Bartels, Dirk Theune, Eric Samson, Gordan Vosicki, Keiron McCammon, Matthew Adams, Oliver Kamps, Rod Johnson, Erik Bengtson, Andy Jefferson, Michelle Caisse, and Joerg von Frantzius.

I want to recognize the major contributors to the maintenance release 2.1, Michael Bouschen, Michelle Caisse, Matthew Adams, Andy Jefferson, Erik Bengtson, and Martin Zaun.

Major contributors to the maintenance releases 3.0 and 3.1 include Michael Bouschen, Michelle Caisse, Matthew Adams, and Andy Jefferson.

Table of Contents

1 Introduction	2

1.1 Overview	2

1.2 Scope	3

1.3 Target Audience	3

1.4 Organization	3

1.5 Document Convention	4

1.6 Terminology Convention	4

2 Overview	5

2.1 Definitions	5

2.1.1 JDO common interfaces	5

2.1.2 JDO in a managed environment	6

2.2 Rationale	8

2.3 Goals	9

3 JDO Architecture	11

3.1 Overview	11

3.2 JDO Architecture	12

3.2.1 Two tier usage	12

3.2.2 Application server usage	12

4 Roles and Scenarios	17

4.1 Roles	17

4.1.1 Application Developer	17

4.1.2 Application Component Provider	17

4.1.3 Application Assembler	17

4.1.4 Deployer	18

4.1.5 System Administrator	18

4.1.6 JDO Vendor	18

4.1.7 Connector Provider	18

4.1.8 Application Server Vendor	18

4.1.9 Container Provider	19

4.2 Scenario: Embedded calendar management system	19

4.3 Scenario: Enterprise Calendar Manager	20

5 Life Cycle of JDO Instances	22

5.1 Overview	22

5.2 Goals	23

5.3 Architecture:	23

5.4 JDO Identity	24

5.4.1 Application (primary key) identity	27

5.4.2 Single Field Identity	28

5.4.3 Datastore identity	30

5.4.4 Nondurable JDO identity	31

5.5 Life Cycle States	32

5.5.1 Transient (Required)	32

5.5.2 Persistent-new (Required)	32

5.5.3 Persistent-dirty (Required)	33

5.5.4 Hollow (Required)	33

5.5.5 Persistent-clean (Required)	34

5.5.6 Persistent-deleted (Required)	35

5.5.7 Persistent-new-deleted (Required)	35

5.5.8 Detached-clean (Required)	35

5.5.9 Detached-dirty (Required)	36

5.6 Nontransactional (Optional)	36

5.6.1 Persistent-nontransactional (Optional)	37

5.6.2 Persistent-nontransactional-dirty (Optional)	38

5.7 Transient Transactional (Optional)	39

5.7.1 Transient-clean (Optional)	39

5.7.2 Transient-dirty (Optional)	40

5.8 Optimistic Transactions (Optional)	40

6 The Persistent Object Model	60

6.1 Overview	60

6.2 Goals	62

6.3 Architecture	62

6.4 Field types of persistence-capable classes	65

6.4.1 Nontransactional non-persistent fields	65

6.4.2 Transactional non-persistent fields	65

6.4.3 Persistent fields	65

6.4.4 Static and final fields	67

6.4.5 Complex enum types	67

6.5 Inheritance	68

7 PersistenceCapable	70

7.1 Persistence Manager	71

7.2 Make Dirty	71

7.3 JDO Identity	71

7.3.1 Version	72

7.4 Status interrogation	72

7.4.1 Dirty	72

7.4.2 Transactional	72

7.4.3 Persistent	72

7.4.4 New	72

7.4.5 Deleted	72

7.4.6 Detached	73

7.5 New instance	73

7.6 State Manager	74

7.7 Replace Flags	74

7.8 Replace Fields	74

7.9 Provide Fields	74

7.10 Copy Fields	75

7.11 Static Fields	75

7.12 JDO identity handling	75

7.13 Detachable	78

8 JDOHelper	79

8.1 Persistence Manager	79

8.2 Make Dirty	80

8.3 JDO Identity	80

8.4 JDO Version	80

8.5 Status interrogation	81

8.5.1 Dirty	81

8.5.2 Transactional	81

8.5.3 Persistent	81

8.5.4 New	81

8.5.5 Deleted	82

8.5.6 Detached	82

8.6 State Interrogation	82

8.6.1 enum ObjectState	82

8.7 PersistenceManagerFactory methods	82

9 JDOImplHelper	86

9.1 JDOImplHelper access	86

9.2 Metadata access	86

9.3 Persistence-capable instance factory	87

9.4 Registration of PersistenceCapable classes	87

9.4.1 Notification of PersistenceCapable class registrations	88

9.5 Security administration	89

9.6 Application identity handling	89

9.7 Persistence-capable class state interrogation	90

10 InstanceCallbacks	92

10.1 jdoPostLoad	92

10.2 jdoPreStore	93

10.3 jdoPreClear	93

10.4 jdoPreDelete	93

10.5 jdoPreDetach and jdoPostDetach	94

10.6 jdoPreAttach and jdoPostAttach	94

11 PersistenceManagerFactory	95

11.1 Interface PersistenceManagerFactory	95

11.1.1 Construction by Properties	100

11.1.2 Construction by jdoconfig.xml	102

11.1.3 Access via persistence.xml	102

11.1.4 jdoconfig.xml	102

11.2 ConnectionFactory	103

11.3 PersistenceManager access	104

11.3.1 Access via proxy	104

11.4 Close the PersistenceManagerFactory	105

11.5 Non-configurable Properties	106

11.6 Optional Feature Support	106

11.7 Properties constructors	109

11.8 Second-level cache management	110

11.9 Registering for life cycle events	111

11.10 Metadata Access	112

11.11 Managed Classes	112

11.12 Serialization	112

11.13 OSGi Service Discovery	113

12 PersistenceManager	116

12.1 Overview	116

12.2 Goals	116

12.3 Architecture: JDO PersistenceManager	116

12.4 Threading	117

12.5 Class Loaders	117

12.6 Interface PersistenceManager	118

12.6.1 Cache management	119

12.6.2 Transaction factory interface	122

12.6.3 Query factory interface	122

12.6.4 Extent Management	123

12.6.5 JDO Identity management	123

12.6.6 Persistent instance factory	126

12.6.7 JDO Instance life cycle management	127

12.6.8 Detaching and attaching instances	130

12.7 Fetch Plan	134

12.7.1 Fetch Groups	135

12.7.2 MaxFetchDepth	136

12.7.3 Root instances	136

12.7.4 Recursion-depth	136

12.7.5 The FetchPlan interface	137

12.7.6 Defining fetch groups	139

12.7.7 Defining Fetch Groups Dynamically	141

12.8 Flushing instances	144

12.9 Transaction completion	145

12.10 Multithreaded Synchronization	145

12.11 User associated objects	145

12.12 PersistenceManagerFactory	146

12.13 ObjectId class management	146

12.14 Sequence	147

12.15 Life-cycle callbacks	148

12.16 Access to internal datastore connection	152

12.17 Server Date	153

12.18 Serialization	153

12.19 Property Management	154

13 Transactions and Connections	155

13.1 Overview	155

13.2 Goals	155

13.3 Architecture: PersistenceManager, Transactions, and Connections	155

13.4 Interface Transaction	158

13.4.1 PersistenceManager	158

13.4.2 Transaction options	159

13.4.3 Synchronization	160

13.4.4 Transaction demarcation	162

13.4.5 RollbackOnly	163

13.5 Optimistic transaction management	163

14 Query	165

14.1 Overview	165

14.2 Goals	165

14.3 Architecture: Query	166

14.4 Namespaces in queries	168

14.5 Query Factory in PersistenceManager interface	169

14.6 Query Interface	171

14.6.1 Query execution	174

14.6.2 Filter specification	176

14.6.3 Parameter declaration	185

14.6.4 Import statements	185

14.6.5 Variable declaration	185

14.6.6 Ordering statement	186

14.6.7 Closing Query results	187

14.6.8 Limiting the Cardinality of the Query Result	187

14.6.9 Specifying the Result of a Query (Projections, Aggregates)	188

14.6.10 Grouping Aggregate Results	190

14.6.11 Specifying Uniqueness of the Query Result	190

14.6.12 Specifying the Class of the Query Result	191

14.6.13 Single-string Query element binding	192

14.7 SQL Queries	193

14.7.1 Mapping Columns of SQL Queries to User-specified Result Classes	195

14.8 Deletion by Query	196

14.9 Extensions	196

14.10 Examples:	197

14.10.1 Basic query.	197

14.10.2 Basic query with ordering.	197

14.10.3 Parameter passing.	198

14.10.4 Navigation through single-valued field.	198

14.10.5 Navigation through multi-valued field.	198

14.10.6 Membership in a collection	199

14.10.7 Projection of a Single Field	199

14.10.8 Projection of Multiple Fields and Expressions	199

14.10.9 Projection of Multiple Fields and Expressions into a Constructed instance	200

14.10.10 Aggregation of a single Field	200

14.10.11 Aggregation of Multiple Fields and Expressions	201

14.10.12 Aggregation of Multiple fields with Grouping	201

14.10.13 Selection of a Single Instance	201

14.10.14 Selection of a Single Field	202

14.10.15 Projection of “this” to User-defined Result Class with Matching Field	202

14.10.16 Projection of “this” to User-defined Result Class with Matching Method	202

14.10.17 Projection of variables	203

14.10.18 Non-correlated subquery	203

14.10.19 Correlated subquery	204

14.10.20 Deleting Multiple Instances	205

15 Object-Relational Mapping	206

15.1 Column Elements	207

15.1.1 Mapping single-valued fields to columns	207

15.2 Join Condition	208

15.2.1 Secondary Table mapping	209

15.2.2 Map using join table	210

15.3 Relationship Mapping	211

15.3.1 Many-to-One using foreign key	212

15.3.2 One-to-Many using foreign key	213

15.3.3 Many-to-One and One-to-Many using mapped-by	213

15.3.4 Many-to-One and One-to-Many using compound foreign key	214

15.3.5 Many-to-One and One-to-Many using Map<Department, String>	215

15.3.6 Many-to-One and One-to-Many using Map<String, Employee>	216

15.4 Embedding	217

15.4.1 Mapping relationships using embedded, referenced, and join table	217

15.5 Foreign Key Constraints	219

15.4.2 Many-to-One with foreign key constraint	220

15.5 Indexes	221

15.5.1 Single-field and Compound Indexes	222

15.6 Inheritance	222

15.7 Versioning	223

15.7.1 Inheritance with superclass-table and version	223

15.7.2 Inheritance with new-table and version	224

15.7.3 Inheritance with subclass-table	225

16 Enterprise Java Beans	226

16.1 Session Beans	226

16.1.1 Stateless Session Bean with Container Managed Transactions	227

16.1.2 Stateful Session Bean with Container Managed Transactions	227

16.1.3 Stateless Session Bean with Bean Managed Transactions	227

16.1.4 Stateful Session Bean with Bean Managed Transactions	228

16.2 Entity Beans	228

17 JDO Exceptions	229

17.1 JDOException	229

17.1.1 JDOFatalException	230

17.1.2 JDOCanRetryException	230

17.1.3 JDOUnsupportedOptionException	230

17.1.4 JDOUserException	230

17.1.5 JDOFatalUserException	231

17.1.6 JDOFatalInternalException	231

17.1.7 JDODataStoreException	231

17.1.8 JDOFatalDataStoreException	231

17.1.9 JDOObjectNotFoundException	231

17.1.10 JDOOptimisticVerificationException	232

17.1.11 JDODetachedFieldAccessException	232

17.1.12 JDOUserCallbackException	232

18 XML Metadata	233

18.1 ELEMENT jdo	235

18.2 ELEMENT package	235

18.3 ELEMENT interface	235

18.4 ELEMENT column	236

18.5 ELEMENT class	239

18.5.1 ELEMENT datastore-identity	240

18.5.2 ELEMENT version	241

18.6 ELEMENT primary-key	241

18.7 ELEMENT join	242

18.8 ELEMENT inheritance	243

18.9 ELEMENT discriminator	243

18.10 ELEMENT implements	243

18.11 ELEMENT foreign-key	243

18.11.1 ATTRIBUTE update-action	244

18.11.2 ATTRIBUTE delete-action	244

18.11.3 ATTRIBUTE deferred	244

18.11.4 ATTRIBUTE name	244

18.12 ELEMENT unique	244

18.13 ELEMENT index	244

18.14 ELEMENT property	245

18.15 ELEMENT field	245

18.15.1 ELEMENT collection	249

18.15.2 ELEMENT map	250

18.15.3 ELEMENT array	250

18.15.4 ELEMENT embedded	251

18.15.5 ELEMENT key	251

18.15.6 ELEMENT value	252

18.15.7 ELEMENT element	252

18.15.8 ELEMENT order	252

18.16 ELEMENT query	252

18.17 ELEMENT sequence	253

18.18 ELEMENT extension	254

18.19 ELEMENT orm	254

18.20 ELEMENT jdoquery	254

18.21 The jdo Schema Descriptor	254

18.22 The orm Schema Descriptor	259

18.23 The jdoquery Schema Descriptor	263

18.24 Example XML file	265

19 Annotations and Metadata API	266

19.1 Metadata Annotations	267

19.1.1 Cacheable Annotation	267

19.1.2 Column Annotation	267

19.1.3 Columns Annotation	269

19.1.4 DatastoreIdentity Annotation	269

19.1.5 Discriminator Annotation	270

19.1.6 DiscriminatorStrategy Enum	271

19.1.7 Element Annotation	271

19.1.8 Embedded Annotation	273

19.1.9 EmbeddedOnly Annotation	273

19.1.10 Extension Annotation	274

19.1.11 Extensions Annotation	274

19.1.12 FetchGroup Annotation	274

19.1.13 FetchGroups Annotation	275

19.1.14 FetchPlan Annotation	275

19.1.15 FetchPlans Annotation	276

19.1.16 ForeignKey Annotation	276

19.1.17 ForeignKeyAction Enum	277

19.1.18 ForeignKeys Annotation	277

19.1.19 IdGeneratorStrategy Enum	277

19.1.20 IdentityType Enum	277

19.1.21 Index Annotation	278

19.1.22 Indices Annotation	278

19.1.23 Inheritance Annotation	278

19.1.24 InheritanceStrategy Enum	279

19.1.25 Join Annotation	279

19.1.26 Joins Annotation	281

19.1.27 Key Annotation	281

19.1.28 NotPersistent Annotation	283

19.1.29 NullValue Enum	283

19.1.30 Order Annotation	283

19.1.31 PersistenceAware Annotation	284

19.1.32 PersistenceCapable Annotation	284

19.1.33 PersistenceModifier Enum	285

19.1.34 Persistent Annotation	285

19.1.35 PrimaryKey Annotation	289

19.1.36 Queries Annotation	289

19.1.37 Query Annotation	289

19.1.38 Sequence Annotation	290

19.1.39 SequenceStrategy Enum	291

19.1.40 Serialized Annotation	291

19.1.41 Transactional Annotation	291

19.1.42 Unique Annotation	291

19.1.43 Uniques Annotation	292

19.1.44 Value Annotation	292

19.1.45 Version Annotation	294

19.1.46 VersionStrategy Enum	295

19.2 Metadata API	299

19.2.1 Metadata	299

19.2.2 JDO Metadata	300

19.2.3 Package Metadata	303

19.2.4 Component Metadata	306

19.2.5 Class Metadata	316

19.2.6 Interface Metadata	317

19.2.7 Field Metadata	317

19.2.8 Property Metadata	317

19.2.9 Query Metadata	318

20 Java Persistence API (JSRs 220, 317) Alignment	321

20.1 JDOEntityManagerFactory	321

20.2 JDOEntityManager	321

21 Extent	323

21.1 Overview	323

21.2 Goals	323

21.3 Interface Extent	324

22 Portability Guidelines	326

22.1 Optional Features	326

22.1.1 22.1.1 Optimistic Transactions	326

22.1.2 22.1.2 Nontransactional Read	326

22.1.3 22.1.3 Nontransactional Write	326

22.1.4 22.1.4 Transient Transactional	326

22.1.5 RetainValues	326

22.1.6 IgnoreCache	326

22.2 Object Model	327

22.3 JDO Identity	327

22.4 PersistenceManager	328

22.5 Query	328

22.6 XML metadata	328

22.7 Life cycle	328

22.8 JDOHelper	328

22.9 Transaction	328

22.10 Binary Compatibility	329

23 JDO Reference Enhancer	330

23.1 Overview	330

23.2 Goals	331

23.3 Standard Enhancement	331

23.3.1 Enhancer Main	332

23.4 Enhancement: Architecture	334

23.5 Inheritance	337

23.6 Field Numbering	337

23.7 Serialization	338

23.8 Cloning	339

23.9 Introspection (Java core reflection)	339

23.10 Field Modifiers	340

23.10.1 Non-persistent	340

23.10.2 Transactional non-persistent	340

23.10.3 Persistent	340

23.10.4 PrimaryKey	341

23.10.5 Embedded	341

23.10.6 Null-value	341

23.10.7 Static	342

23.10.8 Final	342

23.10.9 Private	342

23.10.10 Public, Protected	342

23.11 Fetch Groups	342

23.12 jdoFlags Definition	343

23.13 Exceptions	343

23.14 Modified field access	343

23.15 Generated fields in least-derived PersistenceCapable class	344

23.16 Generated fields in all PersistenceCapable classes	345

23.17 Generated methods in least-derived PersistenceCapable class	345

23.18 Generated methods in PersistenceCapable root classes	347

23.19 Generated method in least-derived Detachable classes	348

23.20 Generated methods in all PersistenceCapable classes	349

23.21 Example class: Employee	352

23.21.1 Generated fields	352

23.21.2 Generated static initializer	352

23.21.3 Generated interrogatives	353

23.21.4 Generated jdoReplaceStateManager	353

23.21.5 Generated jdoReplaceFlags	354

23.21.6 Generated jdoNewInstance helpers	354

23.21.7 Generated jdoGetManagedFieldCount	354

23.21.8 Generated jdoGetXXX methods (one per persistent field)	355

23.21.9 Generated jdoSetXXX methods (one per persistent field)	355

23.21.10 Generated jdoReplaceField and jdoReplaceFields	356

23.21.11 Generated jdoProvideField and jdoProvideFields	357

23.21.12 Generated jdoCopyField and jdoCopyFields methods	358

23.21.13 Generated writeObject method	359

23.21.14 Generated jdoPreSerialize method	359

23.21.15 Generated jdoNewObjectIdInstance	359

23.21.16 Generated jdoCopyKeyFieldsToObjectId	359

23.21.17 Generated jdoCopyKeyFieldsFromObjectId	360

23.21.18 Generated Detachable methods	360

24 Interface StateManager	361

24.1 Overview	361

24.2 StateManager Management	362

24.3 PersistenceManager Management	362

24.4 Dirty management	362

24.5 State queries	363

24.6 JDO Identity	363

24.7 Serialization support	363

24.8 Field Management	363

24.8.1 User-requested value of a field	364

24.8.2 User-requested modification of a field	365

24.8.3 StateManager-requested value of a field	366

24.8.4 StateManager-requested modification of a field	366

24.9 Detached instance support	367

25 JDOPermission	368

A References	371

B JDOQL BNF	372

B.1 Grammar Notation	372

B.2 Single-String JDOQL	372

B.3 Filter Specification	373

B.4 Subqueries	375

B.5 Parameter Declaration	375

B.6 Variable Declaration	375

B.7 Import Declaration	376

B.8 Ordering Specification	376

B.9 Result Specification	377

B.10 Grouping Specification	377

B.11 Types	377

B.12 Literals	378

B.13 Names	379

B.14 Keywords	379

C Items Deferred to the Next Release	381

C.1 Nested Transactions	381

C.2 Savepoint, Undosavepoint	381

C.3 Inter-PersistenceManager References	381

C.4 Enhancer Invocation API	381

C.5 Prefetch API	382

C.6 BLOB/CLOB datatype support	382

C.7 Managed (inverse) relationship support	382

C.8 Case-Insensitive Query	382

C.9 String conversion in Query	382

C.10 Read-only fields	383

C.11 Enumeration pattern	383

C.12 Non-static inner classes	383

C.13 Projections in query	383

C.14 LogWriter support	384

C.15 New Exceptions	384

C.16 Distributed object support	384

C.17 Object-Relational Mapping	384

D JDO 1.0.1 Metadata	385

D.1 ELEMENT jdo	386

D.2 ELEMENT package	386

D.3 ELEMENT class	386

D.4 ELEMENT field	387

D.4.1 ELEMENT collection	389

D.4.2 ELEMENT map	389

D.4.3 ELEMENT array	389

D.5 ELEMENT extension	390

D.6 The Document Type Descriptor	390

D.7 Example XML file	391

E Design Decisions	392

E.1 Enhancer	392

F Revision History	393

F.1 Changes since Draft 0.1	393

F.2 Changes since Draft 0.2	393

F.3 Changes since Draft 0.3	393

F.4 Changes since Draft 0.4	393

F.4.1 PersistenceManager	393

F.4.2 Query	394

F.4.3 Object Model	394

F.4.4 Life Cycle	394

F.4.5 PersistenceCapable	394

F.4.6 Changes since Draft 0.5	395

F.5 Changes since Draft 0.6 (Participant Review Draft)	395

F.6 Changes since Draft 0.7	395

F.7 Changes since Draft 0.8	396

F.8 Changes since Draft 0.9	396

F.9 Changes since draft 0.91	397

F.10 Changes since draft 0.92	398

F.11 Changes since draft 0.93	399

F.12 Changes since draft 0.94	399

F.13 Changes since draft 0.95 (Proposed Final Draft)	400

F.14 Changes since draft 0.96	400

F.15 Changes since draft 0.97	401

F.16 Changes since Approved Draft	402

F.17 Changes since 1.0.1	405

F.18 Changes since Proposed Final Draft	407

F.19 Changes since 2.0	407

F.20 Changes since 2.2	412

G XML Schema for jdoconfig.xml	413

H XML Schema for jdo.xml	417

I XML Schema for jdoquery.xml	441

J XML Schema for orm.xml	443

K Standard Option and Property Names	459

Index	461

A	461

B	463

C	464

D	465

E	467

F	469

G	469

H	473

I	474

J	475

L	477

M	477

N	479

O	480

P	481

Q	483

R	483

S	485

T	488

U	488

V	489

Index

A

addCategory	144

addFetchGroups	142

addInstanceLifecycleListener	111, 112, 152

addMember	144

addMembers	144

addRegisterClassListener	88

addStateInterrogation	91

addSubquery	174, 184, 185, 186, 187

afterCompletion	32

Aggregate Types	191

allocate	148

allows-null	240, 259, 264

annotation

Cacheable	269, 287, 290, 298, 310

column	269, 270, 271, 272, 274, 275, 279, 280, 281, 282, 283, 284, 285, 286, 288, 290, 291, 294, 295, 296, 297, 298, 317

columns	271, 272, 274, 275, 279, 280, 282, 285, 286, 290, 291, 294, 296, 297, 298, 318

DatastoreIdentity	271, 298

discriminator	272, 298

DiscriminatorStrategy	272, 273, 298

element	268, 269, 273, 274, 284, 296, 297, 298, 299, 300, 301

embedded	273, 275, 283, 286, 287, 288, 290, 295, 298, 311

EmbeddedOnly	275, 286, 298

extension	270, 272, 275, 276, 282, 285, 286, 287, 290, 293, 296, 297, 298, 301

extensions	270, 272, 275, 276, 282, 285, 286, 287, 290, 293, 296, 297, 298, 302

FetchGroup	276, 277, 290, 298, 317

fetchGroups	277, 298, 317

FetchPlan	277, 278, 298, 322

FetchPlans	278, 298

ForeignKey	275, 278, 279, 282, 285, 296, 299

ForeignKeyAction	274, 278, 279, 282, 284, 295, 299

ForeignKeys	279, 299

IdentityType	279, 287, 299, 309

IdGeneratorStrategy	271, 279, 289, 299

index	268, 274, 280, 281, 284, 295, 296, 299, 314, 315

indices	268, 280, 299, 315

inheritance	280, 281, 299, 312

InheritanceStrategy	281, 299

join	273, 275, 281, 282, 283, 285, 295, 296, 299, 313, 314, 317, 318

joins	283, 299, 313

JoinTable	299

key	269, 274, 275, 276, 278, 279, 282, 283, 284, 285, 287, 289, 291, 295, 296, 299, 300, 301, 302, 313

NotPersistent	285, 287

NullValue	285, 288, 300

order	269, 285, 300

PersistenceAware	286, 300

PersistenceCapable	286, 300

PrimaryKey	268, 282, 289, 291, 300

queries	277, 291, 300, 304, 305, 316, 317, 320

query	291, 292, 300, 304, 305, 316, 320, 321, 322

sequence	271, 279, 289, 292, 293, 300, 308

serialized	273, 283, 288, 293, 295, 300

Transactional	287, 293, 300

unique	274, 278, 280, 281, 282, 284, 292, 293, 294, 296, 301, 315, 321

Uniques	294, 301

value	269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 283, 284, 288, 289, 290, 291, 294, 295, 296, 299, 300, 301, 302

version	296, 297, 301, 312, 313

annotations	268, 269, 286, 298

application	12

ApplicationIdentity	107

array	107

ArrayList	107

arrays	62, 64, 67

associated objects	146

AttachCallback	94

AttachLifecycleListener	151

ATTRIBUTE deferred	246

ATTRIBUTE delete-action	246

ATTRIBUTE name	237, 245, 246

ATTRIBUTE update-action	246

B

basic	135, 143

beforeCompletion	32, 33

begin	157, 159, 163

binary compatibility	6, 331, 333

BinaryCompatibility	108

ByteIdentity	28

C

cache management	119

cancel	177

cancelAll	177

candidateCollectionExpression	174, 184, 185

Cardinality of the Query Result	189

Change of identity	25

ChangeApplicationIdentity	108

charAt	182

CharIdentity	28

checkAuthorizedStateManager	89

checkAuthorizedStateManagerClass	89

checkConsistency	128, 145

Class of the Query Result	193

ClassMetadata	304, 306, 307, 308, 318

ClassPersistenceModifier	318

ClearCallback	92, 93

ClearLifecycleListener	149

cloning	341

close	118, 119, 122, 152, 153, 189, 327

closeAll	189

closePersistenceManagerFactory	371, 372

Closing Query results	189

Collection	63, 67

Column Mapping	250

commit	157, 158, 159, 160, 161, 162, 163, 164, 165

compile	169, 175

complete-table	245

ComponentMetadata	308, 309, 310, 311, 312, 318, 319

Compound identity	27

Conflicting changes	213

connection	3, 4, 6, 7, 10

Connection management	157, 158

ConnectionFactory	98, 99, 103

contains	170, 176, 178, 181, 185, 187, 188, 189, 194, 200, 201, 205

containsKey	182, 188

containsValue	182, 188

copyKeyFieldsFromObjectId	90

copyKeyFieldsToObjectId	90

CopyOnAttach	128, 131, 132

Correlated subquery	185, 205, 206

CreateLifecycleListener	148

Currency	66

current	118, 119, 121, 122, 126, 127, 130, 133, 136, 138, 146, 148

currentTransaction	122

currentValue	148

D

datastore connection	145, 152

DataStoreCache	101, 110

DatastoreIdentity	107

DatastoreIdentityMetadata	313

DatastoreTimeout	109

DateFormat	90

DateTime	108

declareImports	169, 173, 175, 196

declareParameters	169, 173, 186, 187, 196, 200, 201, 202, 203, 204, 207

declareVariables	169, 170, 172, 173, 175, 187, 196, 200, 205

default	119, 120, 122, 133, 134, 135, 137, 138, 139, 140, 141, 143, 144, 146

default-value	241, 259, 264

delete persistent instances	128

DeleteCallback	92, 93

DeleteLifecycleListener	150

deletePersistent	128, 129, 150

deletePersistentAll	128, 129, 198, 207

Deletion by Query	167, 198

Detachable	70, 78

DetachAllOnCommit	33, 35, 37, 43, 47, 52

DetachCallback	94

detachCopy	132, 133, 134, 135, 136

detachCopyAll	132, 133

detached	70, 71, 72, 73, 78

detached-clean	35, 43, 45, 47, 49, 50, 53

detached-dirty	35, 50, 52

DetachLifecycleListener	150

DirtyLifecycleListener	150

Distinct results	190

E

EJB	228

ELEMENT array	253, 260

ELEMENT class	241, 258, 263, 266

ELEMENT collection	251, 252, 253, 259

element column	238, 259, 260, 263, 264

ELEMENT datastore-identity	242, 258, 263

ELEMENT discriminator	245, 258, 263

ELEMENT element	251, 252, 253, 254, 260, 264

ELEMENT embedded	253, 261, 265

ELEMENT extension	256, 261, 265, 267

ELEMENT field	247, 259, 264

ELEMENT foreign-key	245, 259, 264

ELEMENT implements	245, 258, 263

ELEMENT index	246, 261, 265

ELEMENT inheritance	245, 258, 263

ELEMENT interface	237, 257, 262, 266

ELEMENT jdo	237, 257

ELEMENT jdoquery	256, 266

ELEMENT join	244, 258, 263

ELEMENT key	253, 260, 264

ELEMENT map	252, 259

ELEMENT order	254, 260, 265

ELEMENT orm	256, 262

ELEMENT package	237, 257, 262, 266

ELEMENT primary-key	243, 258, 263

ELEMENT property	247, 257, 262

ELEMENT query	255, 261, 265, 266

ELEMENT sequence	255, 261, 265

ELEMENT unique	246, 260, 261, 265

ELEMENT value	254, 260, 264

ELEMENT version	243, 258, 263

embedded	241, 249, 250, 251, 252, 253, 257, 258, 259, 260, 261, 262, 264, 265, 343, 359

endsWith	181, 183

enhancer	332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 344, 346, 354, 357

enum	67, 68

PersistenceModifier	287

persistent	268, 275, 277, 286, 287, 294, 300, 319

SequenceStrategy	292, 293, 300, 308

VersionStrategy	296, 297, 301

equals	23, 24, 25, 26, 143, 146

EventObject	151

evict	110, 111, 119, 120, 128

evictAll	110, 111, 119, 120

Evicting objects from the cache	110

exceptions	231, 232, 234

execute	167, 168, 169, 173, 175, 176, 177, 186, 187, 189, 192, 195, 199, 200, 201, 202, 203, 204, 205, 206

executeWithArray	176

executeWithMap	176

ExtensionMetadata	301, 302

Extent	123, 124, 134, 135, 137, 139, 146, 325, 326, 327

F

Fetch groups	134, 135, 137, 138, 139, 140, 141, 142, 143, 345

FetchGroup	137, 142, 143, 144, 145

FetchGroupMetadata	317

FetchPlan	130, 133, 136, 137, 138, 139

FetchPlanMetadata	305

Field Modifiers	342

Field Numbering	339

FieldMetadata	318, 319

final	344, 347, 348, 349, 352, 354, 355, 356, 357, 358, 359, 360, 362

First Class Objects	62, 63

flush	128, 133, 145, 149, 154

ForeignKeyMetadata	314

G

Generated fields	340, 347, 354

generated methods	339, 346, 348, 350, 351, 362

get	181

getBooleanField	367

getByteField	367

getCacheable	310

getCandidateClass	326

getCatalog	303, 306, 311

getCharField	367

getClasses	306

getCopyOnAttach	131

getDataStoreCache	110

getDataStoreConnection	108, 152, 153

getDatastoreIdentityMetadata	313

getDatastoreReadTimeoutMillis	123, 177

getDatastoreWriteTimeoutMillis	123, 177

getDate	183

getDetachable	310

getDetachAllOnCommit	131

getDetachedInstance	152

getDoubleField	368

getEmbeddedOnly	311

getExtensions	302

getExtent	118, 123, 124

getFetchGroup	142

getFetchGroups	317

getFetchPlan	136, 137, 138, 139, 172, 326

getFetchPlans	305

getFieldFlags	87, 88

getFieldNames	86, 88

getFieldTypes	86, 88

getFloatField	368

getForeignKeys	314

getIdentityType	309

getIgnoreCache	122, 174

getIndices	315

getInheritanceMetadata	312

getInstance	86, 90

getInterfaces	307

getIntField	368

getIsolationLevel	161

GetJDBCConnection	108

getJoins	314

getKey	28, 29

getKeyAsObject	28

getLongField	368

getMembers	144, 316

getMetadata	112, 371, 372

getMinutes	183

getMonth	184

getMultithreaded	145, 146

getName	143, 147, 148, 306, 309, 320

getNativeConnection	152, 153

getNontransactionalRead	160

getNontransactionalWrite	160

getNumberOfClasses	307

getNumberOfExtensions	302

getNumberOfFetchPlans	305

getNumberOfForeignKeys	314

getNumberOfIndices	315

getNumberOfInterfaces	308

getNumberOfJoins	314

getNumberOfMembers	316

getNumberOfPackages	304

getNumberOfQueries	305, 317

getNumberOfSequences	308

getNumberOfUniques	315

getObjectById	118, 124, 125, 126, 139

getObjectField	368

getObjectId	80, 124, 125, 126, 134, 366

getObjectIdClass	147, 309

getObjectIds	80

getObjectsById	126

getObjectState	82

getOptimistic	160

getPackages	303

getParent	302

getPersistenceCapableSuperclass	87, 88

getPersistenceManager	79, 95, 98, 104, 105, 106, 112, 172, 173, 327, 365

getPersistenceManagerFactory	83, 84, 85, 147

getPersistenceManagerProxy	105

getPersistentInstance	152

getPostLoad	143

getPrimaryKeyMetadata	313

getProperties	106

getQueries	304, 316

getRecursionDepth	144

getRegisteredClass	88

getRegisteredClasses	88

getRequiresExtent	310

getRestoreValues	161

getRetainValues	161

getRollbackOnly	164

getSchema	303, 306, 312

getSeconds	183

getSequence	148

getSequences	308

getSerializeRead	162, 175, 311

getServerDate	153

getShortField	368

getSource	151

getStringField	368

getTable	312

getTarget	152

getTargetClass	28, 29

getTargetClassName	28

getTransactionalObjectId	80, 124, 126, 366

getType	143

getUniques	315

getUserObject	146

getVersion	81

getYear	184

H

hashCode	23, 24, 26, 143, 146

hasSubclasses	326

HeterogeneousInterfaceType	109

HeterogeneousObjectType	108

hollow	30, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 47, 51, 52, 58, 59

I

ignoreCache	170, 174, 176

Implicit parameter declaration	187

Implicit variable declaration	187

IndexMetadata	315

indexOf	182

inheritance	68, 69, 238, 242, 244, 245, 257, 258, 262, 263, 339, 340, 347, 354

InheritanceMetadata	312

Inner class	236, 251

insert-value	241, 242, 259, 264

InstanceCallbacks	92

InstanceLifecycleEvent	149, 150, 151

InstanceLifecycleListener	148, 149, 150, 151, 152

InterfaceMetadata	304, 307, 308, 319

IntIdentity	28

introspection	342, 352

isActive	159

isClosed	118, 119

isDeleted	82, 366

isDetached	82

isDirty	81, 128, 150, 366

isEmpty	181, 182

isLoaded	364, 366, 367

isNew	81, 366

isolation level	97, 98, 108, 161

IsolationLevel	161

isPersistent	81, 366

isTransactional	81, 366

isUnmodifiable	144, 174

J

Java Persistence API	323

java.sql.Connection	153

javax.jdo.mapping.Catalog	101

javax.jdo.mapping.Schema	101

javax.jdo.option.mapping	100, 108, 109

jdbc-type	238, 239, 240, 259, 263

JDO identity	23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 38, 124, 125, 126, 128, 129, 147, 329, 366

JDO Reference Enhancer	332, 333

jdoconfig.xml	98, 102, 103, 113

JDOConnection	152, 153

jdoCopyField	75

jdoCopyFields	75

jdoCopyKeyFieldsFromObjectId	77

jdoCopyKeyFieldsToObjectId	76

jdoDetachedState	78

JDOEntityManager	323, 324

JDOEntityManagerFactory	323, 324

jdoGetObjectId	71

jdoGetPersistenceManager	71

jdoGetTransactionalObjectId	72

jdoGetVersion	72

JDOHelper	70

JDOHelper.getVersion	184

JDOImplHelper	79

jdoIsDeleted	72, 73

jdoIsDetached	73

jdoIsDirty	72

jdoIsNew	72

jdoIsPersistent	72

jdoIsTransactional	72

jdoMakeDirty	71

JDOMetadata	302, 303, 305

jdoNewInstance	73, 74

jdoNewObjectIdInstance	75, 76

JDONullIdentityException	29

JDOPermission	371, 372

jdoPostAttach	94, 128, 132, 151

jdoPostDetach	150

jdoPostLoad	92, 121, 122, 134, 135, 138, 140, 149

jdoPreAttach	94, 151

jdoPreClear	93, 120, 149

jdoPreDelete	93, 150

jdoPreDetach	94, 132, 150

jdoPreStore	93, 149

jdoProvideField	75

jdoProvideFields	75

JDOQL	108, 109

jdoquery	256, 265, 266

jdoReplaceDetachedState	78

jdoReplaceField	74

jdoReplaceFields	74

jdoReplaceFlags	74

jdoReplaceStateManager	74

JDOUnsupportedOptionException	98, 101

JoinedTablePerClass	109

JoinedTablePerConcreteClass	109

JoinMetadata	314

L

length	183, 240, 259, 264

LinkedHashMap	66

LinkedHashSet	66

LinkedList	107

list	101, 107, 111, 112

LoadCallback	92

LoadLifecycleListener	149

Locale	66

LongIdentity	28

M

Make instances nontransactional	130

Make instances persistent	127

Make instances transactional	130

Make instances transient	129

makeDirty	80, 366

makeNontransactional	130

makeNontransactionalAll	130

makePersistent	127, 128, 131, 132, 134, 149, 151

makePersistentAll	127, 128

makeTransactional	130

makeTransactionalAll	130

makeTransient	121, 129, 130

makeTransientAll	129, 130

managed environment	157, 158, 162, 163, 164

manageMetadata	371, 372

mapped-by	213, 215, 216, 217, 218, 219

Mapping Strategies	208, 214

matches	181, 182, 193, 198

Math.cos	184

Math.sin	184

Math.tan	184

MaxFetchDepth	130, 136

MemberMetadata	316, 319

Message-driven beans	7

META-INF	102, 114

Metadata Annotations	269

Metadata API	268, 301

Modified field access	346

Multithreaded	145, 146

multivalued	143

mutable	63, 64, 66

N

Named Result Expressions	190, 191

namespaces in queries	169

new-table	244, 245

newClassMetadata	304, 307

newDatastoreIdentityMetadata	313

newExtensionMetaData	302

newFetchGroupMetadata	317

newFetchPlanMetadata	305

newForeignKeyMetadata	314

newIndexMetadata	315

newInheritanceMetadata	312

newInstance	87, 127

newInterfaceMetadata	304, 307, 308

newMetadata	112

newNamedQuery	171, 174, 196

newObjectIdInstance	89, 90, 126, 147

newPackageMetadata	303, 304

newPrimaryKeyMetadata	313

newPropertyMetadata	316

newQuery	170, 171, 173, 174, 185, 186, 195, 199, 200, 201, 202, 203, 204, 205, 206, 207

newQueryMetadata	304, 317

newSequenceMetadata	308

newUniqueMetadata	315

newVersionMetadata	313

next	131, 132, 148

nextValue	148

Non-persistent	342

NonDurableIdentity	107

NonJoinedTablePerConcreteClass	109

nontransactional	35

NontransactionalRead	96, 100, 107

NontransactionalWrite	96, 100, 107

null-value	343, 344

NullCollection	108

O

Object class type	67

object database	5, 7

object equality	23, 24

object identity	23, 24, 25

Object Model	329

ObjectId class management	147

ObjectIdentity	29

ObjectIdFieldConsumer	77, 78

ObjectIdFieldSupplier	76, 77, 78

Optimistic	95, 96, 99, 100, 103, 107, 463

optimistic transaction	31, 35, 38, 39, 40, 43, 44, 45, 48, 49, 50, 59

optimistic transactions	158, 161, 165

Optional Features	328

ordering statement	188

orm	235, 236, 237, 256, 261, 262

OSGi Service Discovery	113

P

PackageMetadata	303, 304, 305, 306

parseXXX	29

persistence by reachability	31

persistence capable	21, 22, 23, 60, 67

persistence unit	334

PersistenceCapable	70, 73, 74, 76, 77, 78, 332, 333, 337, 338, 339, 340, 341, 342, 345, 347, 348, 349, 350, 351, 355, 357, 361, 362, 363

PersistenceManager	116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 131, 133, 134, 135, 136, 137, 139, 142, 143, 145, 146, 147, 148, 152, 154

PersistenceManager–Factory	112

PersistenceManagerFactory	83, 84, 85, 95, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 109, 110, 111, 112, 114

Persistent	342

persistent-clean	33, 34, 35, 36, 37, 40, 58

persistent-deleted	32, 33, 34, 37, 40, 58, 59

persistent-dirty	32, 33, 34, 35, 36, 37, 40, 58, 59

persistent-new	31, 32, 34, 36, 40, 57, 58, 59

persistent-nontransactional	22, 30, 34, 35, 36, 37, 38, 40, 58, 59

persistent-nontransactional-dirty	38, 39

pin	111

pinAll	111

Pinning objects in the cache	111

portability	328

postAttach	128, 132, 151, 152

postClear	149

postCreate	149

postDelete	150

postDetach	150, 152

postDirty	150

postLoad	122, 143, 149

postStore	149

preClear	149

preDelete	150

preDetach	132, 150

preDirty	150

PreDirtyEvent	108

preSerialize	366

preStore	149

primary key	24, 25, 26, 27, 33, 34, 40

PrimaryKey	343

PrimaryKeyMetadata	313

private	333, 342, 344, 347, 348, 354, 355, 361, 362

PropertyMetadata	316, 319

providedBooleanField	369

providedByteField	369

providedCharField	369

providedDoubleField	369

providedFloatField	369

providedIntField	369

providedLongField	369

providedObjectField	369

providedShortField	369

providedStringField	369

Public, Protected	344

putUserObject	146

Q

Query Cancel	177

Query compilation	175

query execution	166, 167, 172, 175, 189

query factory	122

Query Methods	181

Query Operators	179

QueryCancel	109

QueryMetadata	304, 316, 317, 320, 321, 322

R

refresh	120, 121, 135, 136, 139

refreshAll	119, 120, 121

registerAuthorizedStateManagerClass	89

registerAuthorizedStateManagerClasses	89

registerClass	86, 87, 89

RegisterClassEvent	88, 89

RegisterClassListener	88, 89

registerDateFormat	90

registerMetadata	112

relational	2, 5, 7

relationship	116, 124, 129, 136, 137, 143, 209, 210, 213, 214, 221

RelationSubclassTable	109

removeCategory	144

removeFetchGroups	142

removeInstanceLifecycleListener	112, 152

removeMember	144

removeMembers	144

removeRegisterClassListener	88

removeStateInterrogation	91

removeUserObject	146

replacingBooleanField	369

replacingByteField	369

replacingCharField	369

replacingDetachedState	370

replacingDoubleField	369

replacingFlags	365

replacingFloatField	369

replacingIntField	369

replacingLongField	369

replacingObjectField	370

replacingShortField	369

replacingStateManager	365

replacingStringField	370

RestoreValues	32, 34, 35, 36, 38, 39, 40, 43, 47, 58, 59, 161, 165

RetainValues	96, 100, 107, 161, 165

retrieve	121, 122, 136, 139, 148

retrieveAll	121, 122

rollback	157, 159, 160, 161, 162, 163, 164

RollbackOnly	164

S

scale	240, 259, 264

Schema Descriptor	256, 261, 265

Second Class Objects	62, 63

Second-level cache management	110

sequence	129, 147, 148

SequenceMetadata	308

serialization	132, 151, 154, 338, 340, 341, 349, 354

SerializeRead	161, 162, 175

Session Bean	228, 229, 230

setBooleanField	368

setByteField	368

setCacheable	310

setCandidates	172, 173, 196

setCatalog	302, 306, 311

setCharField	368

setClass	169, 172, 174, 195

setDatastoreReadTimeoutMillis	123, 177

setDatastoreWriteTimeoutMillis	123, 177

setDetachable	310

setDetachAllOnCommit	131

setDoubleField	368

setEmbeddedOnly	311

setExtensions	198, 199

setFilter	169, 173, 175, 185, 186, 196, 205, 206

setFloatField	368

setGrouping	169, 173, 175, 192, 196, 203

setIdentityType	309

setIgnoreCache	122, 174

setIntField	368

setIsolationLevel	161

setLongField	368

setMultithreaded	145, 146

setNontransactionalRead	160

setNontransactionalWrite	160

setObjectField	369

setObjectIdClass	309

setOptimistic	160

setOrdering	169, 173, 175, 196, 199

setPostLoad	143

setRange	173, 175, 189, 196

setRecursionDepth	144

setRequiresExtent	310

setRestoreValues	161

setResult	169, 173, 175, 185, 186, 190, 193, 194, 196, 201, 202, 203, 204, 205, 206

setResultClass	173, 175, 193, 194, 196, 201, 202, 204

setRetainValues	161

setRollbackOnly	164

setSchema	303, 306, 312

setSerializeRead	162, 175, 311

setShortField	368

setStateManager	371, 372

setStringField	368

setSynchronization	162, 163

setTable	312

setUnique	173, 189, 192, 194, 196, 203, 204

setUnmodifiable	144, 174

setUserObject	146

ShortIdentity	28

single field identity	28

Single-string Query	194

SingleFieldIdentity	28, 29

size	168, 176, 182

SQL Portability	153

SQL queries	195, 196, 197

sql-type	240, 259, 264

Standard Enhancement	333

startsWith	181, 183, 200, 205

State interrogation	73

StateImage	108

StateInterrogation	79, 91

StateManager	364, 365, 366, 367, 368, 369, 370

static	333, 339, 344, 347, 348, 351, 352, 355, 357, 358

StoreCallback	92, 93

StoreLifecycleListener	149

StringIdentity	29

subclass-table	245

substring	182, 183

superclass-table	245

supportedOptions	106

Synchronization	160, 162, 163, 164, 165

T

threading	117, 146

toLowerCase	182

toString	183

toUpperCase	182

Transaction	156, 157, 158, 159, 160, 161, 162, 163, 164, 165

Transaction factory	122

transaction isolation level	98

Transactional non-persistent	342

transient	21, 22, 25, 27, 31, 32, 34, 39, 40, 41, 42, 43, 46, 47, 56, 57, 58

Transient Transactional	22, 39, 56

transient-clean	39, 40, 58

transient-dirty	39, 40, 58

TransientTransactional	107

TreeMap	107

TreeSet	107

trim	183

U

UnconstrainedQueryVariables	108

UniqueMetadata	315

Uniqueness of the Query Result	192

unmodifiable	172, 174, 175, 176

unpin	111

unpinAll	111

V

validate	124, 125, 126

Vector	107

VersionMetadata	312, 313

4140 Network Circle

Santa Clara, CA 95404

For U.S. Sales Office locations, call:

800 821-4643

In California:

800 821-4642

Australia: (02) 844 5000

Belgium: 32 2 716 7911

Canada: 416 477-6745

Finland: +358-0-525561

France: (1) 30 67 50 00

Germany: (0) 89-46 00 8-0

Hong Kong: 852 802 4188

Italy: 039 60551

Japan: (03) 5717-5000

Korea: 822-563-8700

Latin America: 415 688-9464

The Netherlands: 033 501234

New Zealand: (04) 499 2344

Nordic Countries: +46 (0) 8 623 90 00

PRC: 861-849 2828

Singapore: 224 3388

Spain: (91) 5551648

Switzerland: (1) 825 71 11

Taiwan: 2-514-0567

UK: 0276 20444

Elsewhere in the world,

call Corporate Headquarters:

415 960-1300

Java Data Objects 3.1

March 20, 2015	JDOPermission	370

March 20, 2015	Table of Contents	xxiii

March 20, 2015	489

Java Data Objects 3.1

Michael Bouschen

2012-06-24T13:47:27.45