Author: mbo
Date: Fri Mar 18 16:53:48 2005
New Revision: 158175

URL: http://svn.apache.org/viewcvs?view=rev&rev=158175
Log:
api11 subproject

Added:
    incubator/jdo/trunk/api11/
    incubator/jdo/trunk/api11/LICENSE.txt
    incubator/jdo/trunk/api11/maven.xml
    incubator/jdo/trunk/api11/project.xml
    incubator/jdo/trunk/api11/src/
    incubator/jdo/trunk/api11/src/dtd/
    incubator/jdo/trunk/api11/src/dtd/javax/
    incubator/jdo/trunk/api11/src/dtd/javax/jdo/
    incubator/jdo/trunk/api11/src/dtd/javax/jdo/jdo.dtd
    incubator/jdo/trunk/api11/src/java/
    incubator/jdo/trunk/api11/src/java/javax/
    incubator/jdo/trunk/api11/src/java/javax/jdo/
    incubator/jdo/trunk/api11/src/java/javax/jdo/Bundle.properties
    incubator/jdo/trunk/api11/src/java/javax/jdo/Extent.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/InstanceCallbacks.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOCanRetryException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDODataStoreException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalDataStoreException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalInternalException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalUserException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOHelper.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOObjectNotFoundException.java
    
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOOptimisticVerificationException.java
    
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOUnsupportedOptionException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/JDOUserException.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/PersistenceManager.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/PersistenceManagerFactory.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/Query.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/Transaction.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/package.html
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/I18NHelper.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/JDOImplHelper.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/JDOPermission.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/PersistenceCapable.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/RegisterClassEvent.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/RegisterClassListener.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/StateManager.java
    incubator/jdo/trunk/api11/src/java/javax/jdo/spi/package.html
    incubator/jdo/trunk/api11/test/
    incubator/jdo/trunk/api11/test/java/
    incubator/jdo/trunk/api11/test/java/javax/
    incubator/jdo/trunk/api11/test/java/javax/jdo/
    incubator/jdo/trunk/api11/test/java/javax/jdo/JDOHelperTest.java
    incubator/jdo/trunk/api11/test/java/javax/jdo/pc/
    incubator/jdo/trunk/api11/test/java/javax/jdo/pc/PCPoint.java
    incubator/jdo/trunk/api11/test/java/javax/jdo/spi/
    incubator/jdo/trunk/api11/test/java/javax/jdo/spi/JDOImplHelperTest.java
    incubator/jdo/trunk/api11/test/java/javax/jdo/util/
    incubator/jdo/trunk/api11/test/java/javax/jdo/util/AbstractTest.java
    incubator/jdo/trunk/api11/test/java/javax/jdo/util/BatchResultPrinter.java
    incubator/jdo/trunk/api11/test/java/javax/jdo/util/BatchTestRunner.java
    incubator/jdo/trunk/api11/xdocs/
    incubator/jdo/trunk/api11/xdocs/index.xml
    incubator/jdo/trunk/api11/xdocs/navigation.xml

Added: incubator/jdo/trunk/api11/LICENSE.txt
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/LICENSE.txt?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/LICENSE.txt (added)
+++ incubator/jdo/trunk/api11/LICENSE.txt Fri Mar 18 16:53:48 2005
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: incubator/jdo/trunk/api11/maven.xml
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/maven.xml?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/maven.xml (added)
+++ incubator/jdo/trunk/api11/maven.xml Fri Mar 18 16:53:48 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2005 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<project default="default"
+    xmlns:j="jelly:core"
+    xmlns:ant="jelly:ant"
+    >
+
+    <!-- ==================== -->
+    <!-- Default Global Goals -->
+    <!-- ==================== -->
+
+    <goal name="default">
+        <attainGoal name="jar:install"/>
+    </goal>
+
+    <goal name="build">
+        <attainGoal name="default"/>
+    </goal>
+
+    <goal name="rebuild">
+        <attainGoal name="clean"/>
+        <attainGoal name="build"/>
+    </goal>
+
+    <goal name="clobber">
+        <attainGoal name="clean"/>
+        <delete>
+            <fileset dir="." defaultexcludes="no" includes="**/*~"/>
+        </delete>
+    </goal>
+
+</project>

Added: incubator/jdo/trunk/api11/project.xml
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/project.xml?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/project.xml (added)
+++ incubator/jdo/trunk/api11/project.xml Fri Mar 18 16:53:48 2005
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+    Copyright 2005 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project>
+    <pomVersion>3</pomVersion>
+    <extend>../project.xml</extend>
+    <!-- ============== -->
+    <!-- Identification -->
+    <!-- ============== -->
+    <name>JDO API 1.1</name>
+    <artifactId>jdo-api</artifactId>
+    <currentVersion>1.1</currentVersion>
+    <package>javax.jdo</package>
+    <shortDescription>Java Data Object (JDO) API 1.1</shortDescription>
+    <description>The Java Data Objects (JDO) API is a standard interface-based 
+Java model abstraction of persistence, developed as Java Specification 
+Request 12 JSR 12 under the auspices of the Java Community 
Process.</description>
+    <repository />
+    <!-- ============ -->
+    <!-- Dependencies -->
+    <!-- ============ -->
+    <dependencies>
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-jta</artifactId>
+            <version>1.0.1B-rc2</version>
+        </dependency>
+    </dependencies>
+    <!-- =================== -->
+    <!-- Build Specification -->
+    <!-- =================== -->
+    <build>
+        <sourceDirectory>src/java</sourceDirectory>
+        <unitTestSourceDirectory>test/java</unitTestSourceDirectory>
+        <!-- Unit test cases -->
+        <unitTest>
+            <includes>
+                <include>**/*Test.java</include>
+            </includes>
+            <excludes>
+                <exclude>javax/jdo/util/AbstractTest.java</exclude>
+                <exclude>javax/jdo/pc/*.java</exclude>
+            </excludes>
+        </unitTest>
+        <!-- J A R  R E S O U R C E S -->
+        <!-- Resources that are packaged up inside the JAR file -->
+        <resources>
+            <resource>
+                <directory>${basedir}/src/java</directory>
+                <includes>
+                    <include>javax/jdo/*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>${basedir}/src/dtd</directory>
+                <includes>
+                    <include>javax/jdo/*.dtd</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+</project>
+

Added: incubator/jdo/trunk/api11/src/dtd/javax/jdo/jdo.dtd
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/dtd/javax/jdo/jdo.dtd?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/dtd/javax/jdo/jdo.dtd (added)
+++ incubator/jdo/trunk/api11/src/dtd/javax/jdo/jdo.dtd Fri Mar 18 16:53:48 2005
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright 2005 The Apache Software Foundation.
+ 
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at 
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software 
+ distributed under the License is distributed on an "AS IS" BASIS, 
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ See the License for the specific language governing permissions and 
+ limitations under the License.
+-->
+<!--
+
+This is the DTD defining the Java Data Objects 1.0 metadata.
+
+The metadata must declare all persistence-capable classes. If any 
+field declarations are not provided in the metadata, then field 
+metadata is defaulted for the missing field declarations. 
+Therefore, the JDO implementation is able to determine based on the
+metadata whether a class is persistence-capable or not. 
+Any class not known to be persistence-capable by the JDO 
+specification (for example, java.lang.Integer) and not explicitly 
+named in the metadata is not persistence-capable. 
+
+The metadata associated with each persistence capable class must 
+be contained within a file, and its format is as defined in the DTD. 
+If the metadata is for only one class, then its file name should be 
+<class-name>.jdo. If the metadata is for a package, then its file name 
+should be <package-name>.jdo. For portability, files should be 
+available via resources loaded by the same class loader as the class. 
+These rules apply both to enhancement and to runtime.
+
+The metadata is used both at enhancement time and at runtime. 
+Information required at enhancement time is a subset of the information 
+needed at runtime. 
+
+-->
+
+<!NOTATION JDO.1_0 PUBLIC
+          "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN">
+<!--
+This is the XML DTD for the JDO 1.0 Metadata.
+All JDO 1.0 metadata descriptors must include a DOCTYPE
+of the following form:
+
+  <!DOCTYPE jdo
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN"
+    "http://java.sun.com/dtd/jdo_1_0.dtd";>
+
+-->
+
+<!ELEMENT jdo ((package)+, (extension)*)>
+
+<!ELEMENT package ((class)+, (extension)*)>
+<!ATTLIST package name CDATA #REQUIRED>
+
+<!ELEMENT class (field|extension)*>
+<!ATTLIST class name CDATA #REQUIRED>
+<!ATTLIST class identity-type (application|datastore|nondurable) #IMPLIED>
+<!ATTLIST class objectid-class CDATA #IMPLIED>
+<!ATTLIST class requires-extent (true|false) 'true'>
+<!ATTLIST class persistence-capable-superclass CDATA #IMPLIED>
+
+<!ELEMENT field ((collection|map|array)?, (extension)*)?>
+<!ATTLIST field name CDATA #REQUIRED>
+<!ATTLIST field persistence-modifier (persistent|transactional|none) #IMPLIED>
+<!ATTLIST field primary-key (true|false) 'false'>
+<!ATTLIST field null-value (exception|default|none) 'none'>
+<!ATTLIST field default-fetch-group (true|false) #IMPLIED>
+<!ATTLIST field embedded (true|false) #IMPLIED>
+
+<!ELEMENT collection (extension)*>
+<!ATTLIST collection element-type CDATA #IMPLIED>
+<!ATTLIST collection embedded-element (true|false) #IMPLIED>
+
+<!ELEMENT map (extension)*>
+<!ATTLIST map key-type CDATA #IMPLIED>
+<!ATTLIST map embedded-key (true|false) #IMPLIED>
+<!ATTLIST map value-type CDATA #IMPLIED>
+<!ATTLIST map embedded-value (true|false) #IMPLIED>
+
+<!ELEMENT array (extension)*>
+<!ATTLIST array embedded-element (true|false) #IMPLIED>
+
+<!ELEMENT extension (extension)*>
+<!ATTLIST extension vendor-name CDATA #REQUIRED>
+<!ATTLIST extension key CDATA #IMPLIED>
+<!ATTLIST extension value CDATA #IMPLIED>
+

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/Bundle.properties
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/Bundle.properties?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/Bundle.properties (added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/Bundle.properties Fri Mar 18 
16:53:48 2005
@@ -0,0 +1,34 @@
+#
+# Copyright 2005 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at 
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software 
+# distributed under the License is distributed on an "AS IS" BASIS, 
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+# See the License for the specific language governing permissions and 
+# limitations under the License.
+
+# ResourceBundle properties file for JDO
+ERR_AbstractClassNoIdentity=Abstract class {0} does not implement key field 
helper methods
+ERR_CannotInitCause=The initCause method cannot be used. To set the cause of 
this exception, \
+use a constructor with a Throwable[] argument.
+ERR_StateManagerClassCast=An element of the parameter collection is of class 
{0}.  \
+The parameter collection must contain only elements that are instances of 
java.lang.Class.
+ERR_NoMetadata=No metadata has been registered for class {0}.
+ERR_NoSuchMethod=Method getPersistenceManagerFactory(Properties) does not 
exist or is not public
+ERR_UnexpectedException=Unexpected exception caught
+EXC_ClassNotFound=Class {0} was not found
+EXC_IllegalAccess=Illegal Access for class {0} 
+EXC_NoClassNameProperty=A property named PersistenceManagerFactoryClass must 
be specified.
+EXC_getPersistenceManagerFactory=Exception thrown by 
getPersistenceManagerFactory(Properties)
+MSG_FailedObject=FailedObject:
+MSG_NestedThrowables=NestedThrowables:
+MSG_NestedThrowablesStackTrace=NestedThrowablesStackTrace:
+MSG_ExceptionGettingFailedToString=Exception getting failed.toString(): 
''{0}''.
+MSG_ExceptionGettingFailedToStringObjectId=Exception getting 
failed.toString(): ''{0}''. ObjectId of failed instance: ''{1}''. 
+ERR_NullClass=JDO implementation error: the parameter class object must not be 
null.

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/Extent.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/Extent.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/Extent.java (added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/Extent.java Fri Mar 18 
16:53:48 2005
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * Extent.java
+ *
+ * Created on December 8, 2000, 3:06 PM
+ */
+
+package javax.jdo;
+
+import java.util.Iterator;
+
+/** Instances of the <code>Extent</code> class represent the entire collection
+ * of instances in the data store of the candidate class
+ * possibly including its subclasses.
+ * <P>The <code>Extent</code> instance has two possible uses:
+ * <ol>
+ * <li>to iterate all instances of a particular class 
+ * <li>to execute a <code>Query</code> in the data store over all instances
+ * of a particular class
+ * </ol>
+ * @author Craig Russell
+ * @version 1.0
+ */
+public interface Extent {
+        
+    /** Returns an iterator over all the instances in the <code>Extent</code>.
+     * The behavior of the returned iterator might depend on the setting of the
+     * <code>ignoreCache</code> flag in the owning 
<code>PersistenceManager</code>.
+     * @return an iterator over all instances in the <code>Extent</code>
+     */
+    Iterator iterator();
+
+    /** Returns whether this <code>Extent</code> was defined to contain 
subclasses.
+     * @return true if this <code>Extent</code> was defined to contain 
instances
+     * that are of a subclass type.
+     */    
+    boolean hasSubclasses();
+
+    /** An <code>Extent</code> contains all instances of a particular class in 
the data
+     * store; this method returns the <code>Class</code> of the instances.
+      * @return the <code>Class</code> of instances of this 
<code>Extent</code>.
+      */
+    Class getCandidateClass();
+
+    /** An <code>Extent</code> is managed by a <code>PersistenceManager</code>;
+     * this method gives access to the owning <code>PersistenceManager</code>.
+     * @return the owning <code>PersistenceManager</code>
+     */
+    PersistenceManager getPersistenceManager();
+    
+    /** Close all <code>Iterator</code>s associated with this 
<code>Extent</code> instance.
+     * <code>Iterator</code>s closed by this method will return 
<code>false</code>
+     * to <code>hasNext()</code> and will throw
+     * <code>NoSuchElementException</code> on <code>next()</code>.
+     * The <code>Extent</code> instance can still be used
+     * as a parameter of <code>Query.setExtent</code>, and to get an 
<code>Iterator</code>.
+     */    
+    void closeAll ();
+    
+    /** Close an <code>Iterator</code> associated with this 
<code>Extent</code> instance.
+     * <code>Iterator</code>s closed by this method will return 
<code>false</code>
+     * to <code>hasNext()</code> and will throw 
<code>NoSuchElementException</code>
+     * on <code>next()</code>. The <code>Extent</code> instance can still be 
used
+     * as a parameter of <code>Query.setExtent</code>, and to get an 
<code>Iterator</code>.
+     * @param it an <code>Iterator</code> obtained by the method
+     * <code>iterator()</code> on this <code>Extent</code> instance.
+     */    
+    void close (Iterator it);
+}
+

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/InstanceCallbacks.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/InstanceCallbacks.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/InstanceCallbacks.java (added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/InstanceCallbacks.java Fri Mar 
18 16:53:48 2005
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * InstanceCallbacks.java
+ *
+ * Created on February 25, 2000
+ */
+ 
+package javax.jdo;
+
+/** A <code>PersistenceCapable</code> class that provides callback methods for 
life
+ * cycle events implements this interface.
+ *
+ * <P>Classes which include non-persistent fields whose values depend
+ * on the values of persistent fields require callbacks on specific
+ * JDO instance life cycle events in order to correctly populate the
+ * values in these fields.
+ *
+ * <P>This interface defines the methods executed
+ * by the <code>PersistenceManager</code> for these life cycle events.  If the 
class
+ * implements <code>InstanceCallbacks</code>, it must explicitly declare it in 
the
+ * class definition.  
+ *
+ * <P>The callbacks might also be used if the persistent instances
+ * need to be put into the runtime infrastructure of the application.
+ * For example, a persistent instance might notify other instances
+ * on changes to state.  The persistent instance is in a list of
+ * managed instances, and when the persistent instance is made hollow,
+ * it can no longer generate change events, and the persistent
+ * instance should be removed from the list of managed instances.
+ *
+ * <P>To implement this, the application programmer would implement
+ * the <code>jdoPostLoad</code> callback to put itself into the list of managed
+ * instances; and implement the <code>jdoPreClear</code> to remove itself from
+ * the list.
+ *
+ * <P>Note that JDO does not manage the state of non-persistent
+ * fields, and when a JDO instance transitions to hollow, JDO clears
+ * the persistent fields.  It is the programmer's responsibility to
+ * clear non-persistent fields so that garbage collection of
+ * referred instances can occur.
+ *
+ * @author Craig Russell
+ * @version 1.0
+ */
+public interface InstanceCallbacks 
+{
+    /**
+     * Called after the values are loaded from the data store into
+     * this instance.
+     *
+     * <P>This method is not modified by the Reference Enhancer.
+     * <P>Derived fields should be initialized in this method.
+     * The context in which this call is made does not allow access to 
+     * other persistent JDO instances.
+     */
+    void jdoPostLoad();
+
+    /**
+     * Called before the values are stored from this instance to the
+     * data store.
+     *
+     * <P>Data store fields that might have been affected by modified
+     * non-persistent fields should be updated in this method.
+     *
+     * <P>This method is modified by the enhancer so that changes to 
+     * persistent fields will be reflected in the data store. 
+     * The context in which this call is made allows access to the 
+     * <code>PersistenceManager</code> and other persistent JDO instances.
+     */
+    void jdoPreStore();
+
+    /**
+     * Called before the values in the instance are cleared.
+     *
+     * <P>Transient fields should be cleared in this method.  
+     * Associations between this
+     * instance and others in the runtime environment should be cleared.
+     *
+     * <P>This method is not modified by the enhancer.
+     */
+    void jdoPreClear();
+
+    /**
+     * Called before the instance is deleted.
+     * This method is called before the state transition to persistent-deleted 
+     * or persistent-new-deleted. Access to field values within this call 
+     * are valid. Access to field values after this call are disallowed. 
+     * <P>This method is modified by the enhancer so that fields referenced 
+     * can be used in the business logic of the method.
+     */
+    void jdoPreDelete();
+}

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/JDOCanRetryException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOCanRetryException.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/JDOCanRetryException.java 
(added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/JDOCanRetryException.java Fri 
Mar 18 16:53:48 2005
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOCanRetryException.java
+ *
+ * Created on March 8, 2000, 8:32 AM
+ */
+
+package javax.jdo;
+
+/** This is the base class for exceptions that can be retried.
+ *
+ * @author  Craig Russell
+ * @version 1.0
+ */
+public class JDOCanRetryException extends JDOException {
+
+  /**
+   * Constructs a new <code>JDOCanRetryException</code> without a detail 
message.
+   */
+  public JDOCanRetryException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOCanRetryException</code> with the specified 
detail message.
+   * @param msg the detail message.
+   */
+  public JDOCanRetryException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Constructs a new <code>JDOCanRetryException</code> with the specified 
detail
+   * message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOCanRetryException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+  
+  /**
+   * Constructs a new <code>JDOCanRetryException</code> with the specified 
detail
+   * message and nested <code>Throwable<code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDOCanRetryException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+  
+  /** Constructs a new <code>JDOCanRetryException</code> with the specified 
detail message
+   * and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDOCanRetryException(String msg, Object failed) {
+    super(msg, failed);
+  }
+  
+  /** Constructs a new <code>JDOCanRetryException</code> with the specified 
detail message,
+   * nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   * @param failed the failed object.
+   */
+  public JDOCanRetryException(String msg, Throwable[] nested, Object failed) {
+    super(msg, nested, failed);
+    
+  }
+  /** Constructs a new <code>JDOCanRetryException</code> with the specified 
detail message,
+   * nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   * @param failed the failed object.
+   */
+  public JDOCanRetryException(String msg, Throwable nested, Object failed) {
+    super(msg, nested, failed);
+  }
+}
+

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/JDODataStoreException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDODataStoreException.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/JDODataStoreException.java 
(added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/JDODataStoreException.java Fri 
Mar 18 16:53:48 2005
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDODataStoreException.java
+ *
+ * Created on March 8, 2000, 8:37 AM
+ */
+
+package javax.jdo;
+
+/** This class represents data store exceptions that can be retried.
+ *
+ * @author  Craig Russell
+ * @version 1.0
+ */
+public class JDODataStoreException extends JDOCanRetryException {
+
+  /**
+   * Constructs a new <code>JDODataStoreException</code> without a detail 
message.
+   */
+  public JDODataStoreException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDODataStoreException</code> with the specified 
detail message.
+   * @param msg the detail message.
+   */
+  public JDODataStoreException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Constructs a new <code>JDODataStoreException</code> with the specified 
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDODataStoreException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+
+  /**
+   * Constructs a new <code>JDODataStoreException</code> with the specified 
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDODataStoreException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+
+  /** Constructs a new <code>JDODataStoreException</code> with the specified 
detail message
+   * and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDODataStoreException(String msg, Object failed) {
+    super(msg, failed);
+  }
+ 
+  /** Constructs a new <code>JDODataStoreException</code> with the specified 
detail message,
+   * nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   * @param failed the failed object.
+   */
+  public JDODataStoreException(String msg, Throwable[] nested, Object failed) {
+    super(msg, nested, failed);
+  }
+
+  /** Constructs a new <code>JDODataStoreException</code> with the specified 
detail message,
+   * nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   * @param failed the failed object.
+   */
+  public JDODataStoreException(String msg, Throwable nested, Object failed) {
+    super(msg, nested, failed);
+  }
+
+}
+

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/JDOException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOException.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/JDOException.java (added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/JDOException.java Fri Mar 18 
16:53:48 2005
@@ -0,0 +1,296 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOException.java
+ *
+ * Created on March 8, 2000, 8:29 AM
+ */
+
+package javax.jdo;
+
+import javax.jdo.spi.I18NHelper;
+
+/** This is the root of all JDO Exceptions.  It contains an optional detail
+ * message, an optional nested <code>Throwable</code> array and an optional 
failed object.
+ * @author Craig Russell
+ * @version 1.0.2
+ */
+public class JDOException extends java.lang.RuntimeException {
+  
+  /** This exception was generated because of an exception in the runtime 
library.
+   * @serial the nested <code>Throwable</code> array
+   */
+  Throwable[] nested;
+  
+  /** This exception may be the result of incorrect parameters supplied
+   * to an API.  This is the object from which the user can determine
+   * the cause of the problem.
+   * @serial the failed <code>Object</code>
+   */
+  Object failed;
+
+    /** The Internationalization message helper.
+     */
+    private static I18NHelper msg = I18NHelper.getInstance 
("javax.jdo.Bundle"); //NOI18N
+
+    /** Flag indicating whether printStackTrace is being executed.
+     */
+    private boolean inPrintStackTrace = false;
+    
+  /**
+   * Constructs a new <code>JDOException</code> without a detail message.
+   */
+  public JDOException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOException</code> with the specified detail 
message.
+   * @param msg the detail message.
+   */
+  public JDOException(String msg) {
+    super(msg);
+  }
+
+  /** Constructs a new <code>JDOException</code> with the specified detail 
message
+   * and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOException(String msg, Throwable[] nested) {
+    super(msg);
+    this.nested = nested;
+  }
+  
+  /** Constructs a new <code>JDOException</code> with the specified detail 
message
+   * and nested <code>Throwable</code>.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDOException(String msg, Throwable nested) {
+    super(msg);
+    this.nested = new Throwable[] {nested};
+  }
+  
+  /** Constructs a new <code>JDOException</code> with the specified detail 
message
+   * and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDOException(String msg, Object failed) {
+    super(msg);
+    this.failed = failed;
+  }
+  
+  /** Constructs a new <code>JDOException</code> with the specified detail 
message,
+   * nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   * @param failed the failed object.
+   */
+  public JDOException(String msg, Throwable[] nested, Object failed) {
+    super(msg);
+    this.nested = nested;
+    this.failed = failed;
+  }
+  
+  /** Constructs a new <code>JDOException</code> with the specified detail 
message,
+   * nested <code>Throwable</code>, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   * @param failed the failed object.
+   */
+  public JDOException(String msg, Throwable nested, Object failed) {
+    super(msg);
+    this.nested = new Throwable[] {nested};
+    this.failed = failed;
+  }
+  
+  /** The exception may include a failed object.
+   * @return the failed object.
+   */
+  public Object getFailedObject() {
+    return failed;
+  }
+  
+  /** The exception may have been caused by multiple exceptions in the runtime.
+   * If multiple objects caused the problem, each failed object will have
+   * its own <code>Exception</code>.
+   * @return the nested Throwable array.
+   */
+  public Throwable[] getNestedExceptions() {
+    return nested;
+  }
+  
+  /** Often there is only one nested exception, and this method returns it.
+   * If there are more than one, then this method returns the first nested
+   * exception. If there is no nested exception, then null is returned.
+   * @return the first or only nested Throwable.
+   * @since 1.0.1
+   */
+  public synchronized Throwable getCause() {
+      // super.printStackTrace calls getCause to handle the cause. 
+      // Returning null prevents the superclass from handling the cause;
+      // instead the local implementation of printStackTrace should
+      // handle the cause. Otherwise, the cause is printed twice.
+      if (nested == null || nested.length == 0 || inPrintStackTrace) {
+          return null;
+      } else {
+          return nested[0];
+      }
+  }
+  
+  /** JDK 1.4 includes a new chaining mechanism for Throwable, but since
+   * JDO has its own "legacy" chaining mechanism, the "standard" mechanism
+   * cannot be used. This method always throws a JDOFatalInternalException.
+   * @param cause ignored.
+   * @return never.
+   */
+  public Throwable initCause(Throwable cause) {
+      throw new JDOFatalInternalException(msg.msg("ERR_CannotInitCause"));
+  }
+  
+  /** The <code>String</code> representation includes the name of the class,
+   * the descriptive comment (if any),
+   * the <code>String</code> representation of the failed <code>Object</code> 
(if any),
+   * and the <code>String</code> representation of the nested 
<code>Throwable</code>s (if any).
+   * @return the <code>String</code>.
+   */
+  public synchronized String toString() {
+    int len = nested==null?0:nested.length;
+    // calculate approximate size of the String to return
+    StringBuffer sb = new StringBuffer (10 + 100 * len);
+    sb.append (super.toString());
+    // include failed object information
+    if (failed != null) {
+        sb.append ("\n").append (msg.msg ("MSG_FailedObject"));
+      String failedToString = null;
+      try {
+          failedToString = failed.toString();
+      } catch (Exception ex) {
+          // include the information from the exception thrown by 
failed.toString
+          Object objectId = JDOHelper.getObjectId(failed);
+          if (objectId == null) {
+              failedToString = msg.msg("MSG_ExceptionGettingFailedToString", 
//NOI18N
+                                       exceptionToString(ex));
+          }
+          else {
+              // include the ObjectId information
+              String objectIdToString = null;
+              try {
+                  objectIdToString = objectId.toString();
+              }
+              catch (Exception ex2) {
+                  objectIdToString = exceptionToString(ex2);
+              }
+              failedToString = 
msg.msg("MSG_ExceptionGettingFailedToStringObjectId", //NOI18N
+                                       exceptionToString(ex), 
objectIdToString);
+          }
+      }
+      sb.append (failedToString);
+    }
+    // include nested Throwable information, but only if not called by
+    // printStackTrace; the stacktrace will include the cause anyway.
+    if (len > 0 && !inPrintStackTrace) {
+      sb.append ("\n").append (msg.msg ("MSG_NestedThrowables")).append ("\n");
+      Throwable exception = nested[0];
+      sb.append (exception==null?"null":exception.toString()); //NOI18N
+      for (int i=1; i<len; ++i) {
+        sb.append ("\n"); //NOI18N
+        exception = nested[i];
+      sb.append (exception==null?"null":exception.toString()); //NOI18N
+      }
+    }
+    return sb.toString();
+  }    
+  
+    /**
+     * Prints this <code>JDOException</code> and its backtrace to the 
+     * standard error output.
+     * Print nested Throwables' stack trace as well.
+     */
+    public void printStackTrace() { 
+        printStackTrace (System.err);
+    }
+
+    /**
+     * Prints this <code>JDOException</code> and its backtrace to the 
+     * specified print stream.
+     * Print nested Throwables' stack trace as well.
+     * @param s <code>PrintStream</code> to use for output
+     */
+    public synchronized void printStackTrace(java.io.PrintStream s) { 
+    int len = nested==null?0:nested.length;
+        synchronized (s) {
+            inPrintStackTrace = true;
+            super.printStackTrace(s);
+            if (len > 0) {
+                s.println (msg.msg ("MSG_NestedThrowablesStackTrace"));
+                for (int i=0; i<len; ++i) {
+                    Throwable exception = nested[i];
+                    if (exception != null) {
+                        exception.printStackTrace(s);
+                    }
+                }
+            }
+            inPrintStackTrace = false;
+        }
+    }
+
+    /**
+     * Prints this <code>JDOException</code> and its backtrace to the specified
+     * print writer.
+     * Print nested Throwables' stack trace as well.
+     * @param s <code>PrintWriter</code> to use for output
+     */
+    public synchronized void printStackTrace(java.io.PrintWriter s) { 
+    int len = nested==null?0:nested.length;
+        synchronized (s) {
+            inPrintStackTrace = true;
+            super.printStackTrace(s);
+            if (len > 0) {
+                s.println (msg.msg ("MSG_NestedThrowablesStackTrace"));
+                for (int i=0; i<len; ++i) {
+                    Throwable exception = nested[i];
+                    if (exception != null) {
+                        exception.printStackTrace(s);
+                    }
+                }
+            }
+            inPrintStackTrace = false;
+        }
+    }
+
+    /**
+     * Helper method returning a short description of the exception passed
+     * as an argument. The returned string has the format defined by
+     * Throwable.toString. If the exception has a non-null detail message 
+     * string, then it returns the name of exception class concatenated
+     * with ": " concatenated with the detailed message. Otherwise it
+     * returns the name of exception class.
+     * @param ex the exception to be represented.
+     * @return a string representation of the exception passed as an argument.
+     */
+    private static String exceptionToString(Exception ex)
+    {
+        if (ex == null) return null;
+        String s = ex.getClass().getName();
+        String message = ex.getMessage();
+        return (message != null) ? (s + ": " + message) : s;
+    }
+}
+

Added: 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalDataStoreException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalDataStoreException.java?view=auto&rev=158175
==============================================================================
--- 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalDataStoreException.java 
(added)
+++ 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalDataStoreException.java 
Fri Mar 18 16:53:48 2005
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOFatalDataStoreException.java
+ *
+ * Created on March 8, 2000, 8:36 AM
+ */
+
+package javax.jdo;
+
+/** This class represents data store exceptions that cannot be retried.
+ *
+ * @author  Craig Russell
+ * @version 1.0.1
+ */
+public class JDOFatalDataStoreException extends JDOFatalException {
+
+  /**
+   * Constructs a new <code>JDOFatalDataStoreException</code> without a detail 
message.
+   */
+  public JDOFatalDataStoreException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOFatalDataStoreException</code> with the 
specified detail message.
+   * @param msg the detail message.
+   */
+  public JDOFatalDataStoreException(String msg) {
+    super(msg);
+  }
+
+  /** Constructs a new <code>JDOFatalDataStoreException</code> with the 
specified detail message
+   * and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDOFatalDataStoreException(String msg, Object failed) {
+    super(msg, failed);
+  }
+  
+  /**
+   * Constructs a new <code>JDOFatalDataStoreException</code> with the 
specified
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOFatalDataStoreException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+
+  /**
+   * Constructs a new <code>JDOFatalDataStoreException</code> with the 
specified
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDOFatalDataStoreException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+}
+

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalException.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalException.java (added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalException.java Fri Mar 
18 16:53:48 2005
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOFatalException.java
+ *
+ * Created on March 8, 2000, 8:32 AM
+ */
+
+package javax.jdo;
+
+/** This class represents exceptions that are fatal; that is, the condition
+ * that caused it cannot be bypassed even if the operation is retried.
+ *
+ * @author  Craig Russell
+ * @version 1.0
+ */
+public class JDOFatalException extends JDOException {
+
+  /**
+   * Constructs a new <code>JDOFatalException</code> without a detail message.
+   */
+  public JDOFatalException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOFatalException</code> with the specified detail 
message.
+   * @param msg the detail message.
+   */
+  public JDOFatalException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Constructs a new <code>JDOFatalException</code> with the specified detail
+   * message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOFatalException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+  
+  /**
+   * Constructs a new <code>JDOFatalException</code> with the specified detail
+   * message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDOFatalException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+  
+  /** Constructs a new <code>JDOFatalException</code> with the specified 
detail message
+   * and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDOFatalException(String msg, Object failed) {
+    super(msg, failed);
+  }
+  
+  /** Constructs a new <code>JDOFatalException</code> with the specified 
detail message,
+   * nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   * @param failed the failed object.
+   */
+  public JDOFatalException(String msg, Throwable[] nested, Object failed) {
+    super(msg, nested, failed);
+    
+  }
+  /** Constructs a new <code>JDOFatalException</code> with the specified 
detail message,
+   * nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   * @param failed the failed object.
+   */
+  public JDOFatalException(String msg, Throwable nested, Object failed) {
+    super(msg, nested, failed);
+  }
+}
+

Added: 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalInternalException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalInternalException.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalInternalException.java 
(added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalInternalException.java 
Fri Mar 18 16:53:48 2005
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOFatalInternalException.java
+ *
+ * Created on March 8, 2000, 8:35 AM
+ */
+
+package javax.jdo;
+
+/** This class represents errors in the implementation for which no user
+ * error handling is possible.  The error should be reported to the JDO
+ * vendor for corrective action.
+ *
+ * @author  Craig Russell
+ * @version 1.0
+ */
+public class JDOFatalInternalException extends JDOFatalException {
+
+  /**
+   * Constructs a new <code>JDOFatalInternalException</code> without a detail 
message.
+   */
+  public JDOFatalInternalException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOFatalInternalException</code> with the 
specified detail message.
+   * @param msg the detail message.
+   */
+  public JDOFatalInternalException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Constructs a new <code>JDOFatalInternalException</code> with the specified
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOFatalInternalException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+
+  /**
+   * Constructs a new <code>JDOFatalInternalException</code> with the specified
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDOFatalInternalException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+}
+

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalUserException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalUserException.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalUserException.java 
(added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/JDOFatalUserException.java Fri 
Mar 18 16:53:48 2005
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOUserException.java
+ *
+ * Created on March 8, 2000, 8:33 AM
+ */
+
+package javax.jdo;
+
+/** This class represents user errors that cannot be retried.  
+ *
+ * @author  Craig Russell
+ * @version 1.0
+ */
+public class JDOFatalUserException extends JDOFatalException {
+
+  /**
+   * Constructs a new <code>JDOFatalUserException</code> without a detail 
message.
+   */
+  public JDOFatalUserException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOFatalUserException</code> with the specified 
detail message.
+   * @param msg the detail message.
+   */
+  public JDOFatalUserException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Constructs a new <code>JDOFatalUserException</code> with the specified
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOFatalUserException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+  
+  /**
+   * Constructs a new <code>JDOFatalUserException</code> with the specified
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDOFatalUserException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+  
+  /** Constructs a new <code>JDOFatalUserException</code> with the specified
+   * detail message and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDOFatalUserException(String msg, Object failed) {
+    super(msg, failed);
+  }
+  
+  /** Constructs a new <code>JDOFatalUserException</code> with the specified
+   * detail message, nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   * @param failed the failed object.
+   */
+  public JDOFatalUserException(String msg, Throwable[] nested, Object failed) {
+    super(msg, nested, failed);
+  }
+  
+  /** Constructs a new <code>JDOFatalUserException</code> with the specified
+   * detail message, nested <code>Throwable</code>s, and failed object.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   * @param failed the failed object.
+   */
+  public JDOFatalUserException(String msg, Throwable nested, Object failed) {
+    super(msg, nested, failed);
+  }
+}
+

Added: incubator/jdo/trunk/api11/src/java/javax/jdo/JDOHelper.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOHelper.java?view=auto&rev=158175
==============================================================================
--- incubator/jdo/trunk/api11/src/java/javax/jdo/JDOHelper.java (added)
+++ incubator/jdo/trunk/api11/src/java/javax/jdo/JDOHelper.java Fri Mar 18 
16:53:48 2005
@@ -0,0 +1,288 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOHelper.java
+ *
+ * Created on April 24, 2000, 9:09 AM
+ */
+ 
+package javax.jdo;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+
+import java.util.Properties;
+
+import javax.jdo.spi.I18NHelper;
+import javax.jdo.spi.PersistenceCapable;
+import javax.jdo.spi.StateManager; // for javadoc
+
+/**
+ * This class can be used by a JDO-aware application to call the JDO behavior
+ * of <code>PersistenceCapable</code> instances without declaring them to be
+ * <code>PersistenceCapable</code>.
+ * It is also used to acquire a <code>PersistenceManagerFactory</code> via a 
standard
+ * <code>Properties</code> construction.
+ * <P>Every class whose instances can be managed by a JDO 
<code>PersistenceManager</code> must
+ * implement the <code>PersistenceCapable</code> interface.
+ *
+ * <P>This helper class defines static methods that allow a JDO-aware
+ * application to examine the runtime state of instances.  For example,
+ * an application can discover whether the instance is persistent, 
transactional,
+ * dirty, new, or deleted; and to get its associated
+ * <code>PersistenceManager</code> if it has one.
+ * 
+ * @author  Craig Russell
+ * @version 1.0.2
+ */
+public class JDOHelper extends Object {
+      
+    /** The Internationalization message helper.
+     */
+    private final static I18NHelper msg = I18NHelper.getInstance 
("javax.jdo.Bundle"); //NOI18N
+
+    /** Return the associated <code>PersistenceManager</code> if there is one.
+     * Transactional and persistent instances return the associated
+     * <code>PersistenceManager</code>.  
+     *
+     * <P>Transient non-transactional instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> return 
<code>null</code>.
+     * @see PersistenceCapable#jdoGetPersistenceManager()
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @return the <code>PersistenceManager</code> associated with the 
parameter instance.
+     */
+     public static PersistenceManager getPersistenceManager(Object pc) {
+        return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoGetPersistenceManager():null;
+      }
+    
+    /** Explicitly mark the parameter instance and field dirty.
+     * Normally, <code>PersistenceCapable</code> classes are able to detect 
changes made
+     * to their fields.  However, if a reference to an array is given to a
+     * method outside the class, and the array is modified, then the
+     * persistent instance is not aware of the change.  This API allows the
+     * application to notify the instance that a change was made to a field.
+     *
+     * <P>Transient instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> ignore this 
method.
+     * @see PersistenceCapable#jdoMakeDirty(String fieldName)
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @param fieldName the name of the field to be marked dirty.
+     */
+    public static void makeDirty(Object pc, String fieldName) {
+     if (pc instanceof PersistenceCapable) 
+      ((PersistenceCapable)pc).jdoMakeDirty(fieldName);
+    }
+    
+    /** Return a copy of the JDO identity associated with the parameter 
instance.
+     *
+     * <P>Persistent instances of <code>PersistenceCapable</code> classes have 
a JDO identity
+     * managed by the <code>PersistenceManager</code>.  This method returns a 
copy of the
+     * ObjectId that represents the JDO identity.  
+     * 
+     * <P>Transient instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> return 
<code>null</code>.
+     *
+     * <P>The ObjectId may be serialized
+     * and later restored, and used with a <code>PersistenceManager</code> 
from the same JDO
+     * implementation to locate a persistent instance with the same data store
+     * identity.
+     *
+     * <P>If the JDO identity is managed by the application, then the ObjectId 
may
+     * be used with a <code>PersistenceManager</code> from any JDO 
implementation that supports
+     * the <code>PersistenceCapable</code> class.
+     *
+     * <P>If the JDO identity is not managed by the application or the data 
store,
+     * then the ObjectId returned is only valid within the current transaction.
+     *<P>
+     * @see PersistenceManager#getObjectId(Object pc)
+     * @see PersistenceCapable#jdoGetObjectId()
+     * @see PersistenceManager#getObjectById(Object oid, boolean validate)
+     * @param pc the PersistenceCapable instance.
+     * @return a copy of the ObjectId of the parameter instance as of the 
beginning of the transaction.
+     */
+    public static Object getObjectId(Object pc) {
+      return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoGetObjectId():null;
+    }
+    
+    /** Return a copy of the JDO identity associated with the parameter 
instance.
+     *
+     * @see PersistenceCapable#jdoGetTransactionalObjectId()
+     * @see PersistenceManager#getObjectById(Object oid, boolean validate)
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @return a copy of the ObjectId of the parameter instance as modified in 
this transaction.
+     */
+    public static Object getTransactionalObjectId(Object pc) {
+      return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoGetTransactionalObjectId():null;
+    }
+    
+    /** Tests whether the parameter instance is dirty.
+     *
+     * Instances that have been modified, deleted, or newly 
+     * made persistent in the current transaction return <code>true</code>.
+     *
+     *<P>Transient instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> return 
<code>false</code>.
+     *<P>
+     * @see StateManager#makeDirty(PersistenceCapable pc, String fieldName)
+     * @see PersistenceCapable#jdoIsDirty()
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @return <code>true</code> if the parameter instance has been modified 
in the current transaction.
+     */
+    public static boolean isDirty(Object pc) {
+      return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoIsDirty():false;
+    }
+
+    /** Tests whether the parameter instance is transactional.
+     *
+     * Instances whose state is associated with the current transaction 
+     * return true. 
+     *
+     *<P>Transient instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> return 
<code>false</code>.
+     * @see PersistenceCapable#jdoIsTransactional()
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @return <code>true</code> if the parameter instance is transactional.
+     */
+    public static boolean isTransactional(Object pc) {
+      return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoIsTransactional():false;
+    }
+
+    /** Tests whether the parameter instance is persistent.
+     *
+     * Instances that represent persistent objects in the data store 
+     * return <code>true</code>. 
+     *
+     *<P>Transient instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> return 
<code>false</code>.
+     *<P>
+     * @see PersistenceManager#makePersistent(Object pc)
+     * @see PersistenceCapable#jdoIsPersistent()
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @return <code>true</code> if the parameter instance is persistent.
+     */
+    public static boolean isPersistent(Object pc) {
+      return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoIsPersistent():false;
+    }
+
+    /** Tests whether the parameter instance has been newly made persistent.
+     *
+     * Instances that have been made persistent in the current transaction 
+     * return <code>true</code>.
+     *
+     *<P>Transient instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> return 
<code>false</code>.
+     *<P>
+     * @see PersistenceManager#makePersistent(Object pc)
+     * @see PersistenceCapable#jdoIsNew()
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @return <code>true</code> if the parameter instance was made persistent
+     * in the current transaction.
+     */
+    public static boolean isNew(Object pc) {
+      return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoIsNew():false;
+    }
+
+    /** Tests whether the parameter instance has been deleted.
+     *
+     * Instances that have been deleted in the current transaction return 
<code>true</code>.
+     *
+     *<P>Transient instances and instances of classes 
+     * that do not implement <code>PersistenceCapable</code> return 
<code>false</code>.
+     *<P>
+     * @see PersistenceManager#deletePersistent(Object pc)
+     * @see PersistenceCapable#jdoIsDeleted()
+     * @param pc the <code>PersistenceCapable</code> instance.
+     * @return <code>true</code> if the parameter instance was deleted
+     * in the current transaction.
+     */
+    public static boolean isDeleted(Object pc) {
+      return pc instanceof 
PersistenceCapable?((PersistenceCapable)pc).jdoIsDeleted():false;
+    }
+    
+    /** Get a <code>PersistenceManagerFactory</code> based on a 
<code>Properties</code> instance, using
+     * the current thread's context class loader to locate the
+     * <code>PersistenceManagerFactory</code> class.
+     * @return the <code>PersistenceManagerFactory</code>.
+     * @param props a <code>Properties</code> instance with properties of the 
<code>PersistenceManagerFactory</code>.
+     * @see #getPersistenceManagerFactory(Properties,ClassLoader)
+     */
+    public static PersistenceManagerFactory getPersistenceManagerFactory
+            (Properties props) {
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        return getPersistenceManagerFactory (props, cl);
+    }
+    
+    /** Get a <code>PersistenceManagerFactory</code> based on a 
<code>Properties</code>
+     * instance and a class loader.
+     * The following are standard key values:
+     * <BR><code>"javax.jdo.PersistenceManagerFactoryClass"
+     * <BR>"javax.jdo.option.Optimistic",
+     * <BR>"javax.jdo.option.RetainValues",
+     * <BR>"javax.jdo.option.RestoreValues",
+     * <BR>"javax.jdo.option.IgnoreCache",
+     * <BR>"javax.jdo.option.NontransactionalRead",
+     * <BR>"javax.jdo.option.NontransactionalWrite",
+     * <BR>"javax.jdo.option.Multithreaded",
+     * <BR>"javax.jdo.option.ConnectionUserName",
+     * <BR>"javax.jdo.option.ConnectionPassword",
+     * <BR>"javax.jdo.option.ConnectionURL",
+     * <BR>"javax.jdo.option.ConnectionFactoryName",
+     * <BR>"javax.jdo.option.ConnectionFactory2Name".
+     * </code><P>JDO implementations
+     * are permitted to define key values of their own.  Any key values not
+     * recognized by the implementation must be ignored.  Key values that are
+     * recognized but not supported by an implementation must result in a
+     * <code>JDOFatalUserException</code> thrown by the method.
+     * <P>The returned <code>PersistenceManagerFactory</code> is not 
configurable (the
+     * <code>set<I>XXX</I></code> methods will throw an exception).
+     * <P>JDO implementations might manage a map of instantiated
+     * <code>PersistenceManagerFactory</code> instances based on specified 
property key
+     * values, and return a previously instantiated 
<code>PersistenceManagerFactory</code>
+     * instance.  In this case, the properties of the returned
+     * instance must exactly match the requested properties.
+     * @return the <code>PersistenceManagerFactory</code>.
+     * @param props a <code>Properties</code> instance with properties of the 
<code>PersistenceManagerFactory</code>.
+     * @param cl a class loader to use to load the 
<code>PersistenceManagerFactory</code> class.
+     */
+    public static PersistenceManagerFactory getPersistenceManagerFactory
+            (Properties props, ClassLoader cl) {
+        String pmfClassName = (String) props.get 
("javax.jdo.PersistenceManagerFactoryClass"); //NOI18N
+        if (pmfClassName == null) {
+            throw new JDOFatalUserException 
(msg.msg("EXC_NoClassNameProperty")); // NOI18N
+        }
+        try {
+            Class pmfClass = cl.loadClass (pmfClassName);
+            Method pmfMethod = pmfClass.getMethod 
("getPersistenceManagerFactory",  //NOI18N
+                new Class[] {Properties.class});
+            return (PersistenceManagerFactory) pmfMethod.invoke (null, new 
Object[] {props});
+        } catch (ClassNotFoundException cnfe) {
+            throw new JDOFatalUserException (msg.msg("EXC_ClassNotFound", 
pmfClassName), cnfe); //NOI18N
+        } catch (IllegalAccessException iae) {
+            throw new JDOFatalUserException (msg.msg("EXC_IllegalAccess", 
pmfClassName), iae); //NOI18N
+        } catch (NoSuchMethodException nsme) {
+            throw new JDOFatalInternalException (msg.msg("ERR_NoSuchMethod"), 
nsme); //NOI18N
+        } catch (InvocationTargetException ite) {
+            Throwable nested = ite.getTargetException();
+            if  (nested instanceof JDOException) {
+                throw (JDOException)nested;
+            } else throw new JDOFatalUserException 
(msg.msg("EXC_getPersistenceManagerFactory"), ite); //NOI18N
+        } catch (Exception e) {
+            throw new JDOFatalInternalException 
(msg.msg("ERR_UnexpectedException"), e); //NOI18N
+        }
+    }
+
+}

Added: 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOObjectNotFoundException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOObjectNotFoundException.java?view=auto&rev=158175
==============================================================================
--- 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOObjectNotFoundException.java 
(added)
+++ 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOObjectNotFoundException.java 
Fri Mar 18 16:53:48 2005
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOObjectNotFoundException.java
+ *
+ * Created on April 11, 2003
+ */
+
+package javax.jdo;
+
+/** This class represents exceptions caused by the user accessing 
+ * an object that does not exist in the datastore.
+ *
+ * @author  Craig Russell
+ * @since 1.0.1
+ * @version 1.0.1
+ */
+public class JDOObjectNotFoundException extends JDODataStoreException {
+
+  /**
+   * Constructs a new <code>JDOObjectNotFoundException</code> 
+   * without a detail message.
+   */
+  public JDOObjectNotFoundException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOObjectNotFoundException</code> 
+   * with the specified detail message.
+   * @param msg the detail message.
+   */
+  public JDOObjectNotFoundException(String msg) {
+    super(msg);
+  }
+
+  /** Constructs a new <code>JDOObjectNotFoundException</code> with the 
specified detail message
+   * and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDOObjectNotFoundException(String msg, Object failed) {
+    super(msg, failed);
+  }
+  
+  /**
+   * Constructs a new <code>JDOObjectNotFoundException</code> with the
+   * specified detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOObjectNotFoundException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+
+}
+

Added: 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOOptimisticVerificationException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOOptimisticVerificationException.java?view=auto&rev=158175
==============================================================================
--- 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOOptimisticVerificationException.java
 (added)
+++ 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOOptimisticVerificationException.java
 Fri Mar 18 16:53:48 2005
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOOptimisticVerificationException.java
+ *
+ * Created on April 11, 2003
+ */
+
+package javax.jdo;
+
+/** This class represents optimistic verification failures.  The nested
+ * exception array contains an exception for each instance that failed
+ * the optimistic verification.
+ *
+ * @author  Craig Russell
+ * @since 1.0.1
+ * @version 1.0.1
+ */
+public class JDOOptimisticVerificationException extends 
JDOFatalDataStoreException {
+
+  /**
+   * Constructs a new <code>JDOOptimisticVerificationException</code> without 
a detail message.
+   */
+  public JDOOptimisticVerificationException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOOptimisticVerificationException</code> with the 
specified detail message.
+   * @param msg the detail message.
+   */
+  public JDOOptimisticVerificationException(String msg) {
+    super(msg);
+  }
+
+  /** Constructs a new <code>JDOOptimisticVerificationException</code> with 
the specified detail message
+   * and failed object.
+   * @param msg the detail message.
+   * @param failed the failed object.
+   */
+  public JDOOptimisticVerificationException(String msg, Object failed) {
+    super(msg, failed);
+  }
+  
+  /**
+   * Constructs a new <code>JDOOptimisticVerificationException</code> with the 
specified
+   * detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOOptimisticVerificationException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+
+}
+

Added: 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOUnsupportedOptionException.java
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/api11/src/java/javax/jdo/JDOUnsupportedOptionException.java?view=auto&rev=158175
==============================================================================
--- 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOUnsupportedOptionException.java 
(added)
+++ 
incubator/jdo/trunk/api11/src/java/javax/jdo/JDOUnsupportedOptionException.java 
Fri Mar 18 16:53:48 2005
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOUnsupportedOptionException.java
+ *
+ * Created on March 8, 2000, 8:34 AM
+ */
+
+package javax.jdo;
+
+/** This class represents exceptions caused by the use of optional features
+ * not supported by the JDO implementation.
+ *
+ * @author  Craig Russell
+ * @version 1.0
+ */
+public class JDOUnsupportedOptionException extends JDOUserException {
+
+  /**
+   * Constructs a new <code>JDOUnsupportedOptionException</code> without a 
detail message.
+   */
+  public JDOUnsupportedOptionException() {
+  }
+  
+
+  /**
+   * Constructs a new <code>JDOUnsupportedOptionException</code> with the 
specified detail message.
+   * @param msg the detail message.
+   */
+  public JDOUnsupportedOptionException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Constructs a new <code>JDOUnsupportedOptionException</code> with the
+   * specified detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable[]</code>.
+   */
+  public JDOUnsupportedOptionException(String msg, Throwable[] nested) {
+    super(msg, nested);
+  }
+
+  /**
+   * Constructs a new <code>JDOUnsupportedOptionException</code> with the
+   * specified detail message and nested <code>Throwable</code>s.
+   * @param msg the detail message.
+   * @param nested the nested <code>Throwable</code>.
+   */
+  public JDOUnsupportedOptionException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+}
+


Reply via email to