Initial 2.1 API codebase from Linda DeMichiel
Build changes for 2.1.0.v201201192338
diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF
index 3b633ee..09d7a5b 100644
--- a/META-INF/MANIFEST.MF
+++ b/META-INF/MANIFEST.MF
@@ -1,38 +1,23 @@
 Manifest-Version: 1.0

-Export-Package: javax.persistence.spi;jpa="2.0";uses:="javax.persistence,javax.sql";version="2.0.4",

- javax.persistence;jpa="2.0";uses:="javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi";version="2.0.4",

- javax.persistence.criteria;jpa="2.0";uses:="javax.persistence.metamodel,javax.persistence";version="2.0.4",

- javax.persistence.metamodel;jpa="2.0";version="2.0.4",

- org.osgi.service.jpa;uses:="javax.persistence";version="1.0.0"

-Private-Package: .,org.eclipse.persistence.javax.persistence.osgi

-Implementation-Version: 2.0.4

+Export-Package: javax.persistence;jpa="2.1";version="2.1.0",

+ javax.persistence.criteria;jpa="2.1";version="2.1.0",

+ javax.persistence.metamodel;jpa="2.1";version="2.1.0",

+ javax.persistence.spi;jpa="2.1";version="2.1.0",

+ org.osgi.service.jpa;version="1.0.0

+Implementation-Version: 2.1.0

 Bundle-ClassPath: .

-Specification-Vendor: Sun Microsystems Inc.

-Tool: Bnd-0.0.366

-DSTAMP: 20111216

-Bundle-Name: Java Persistence API 2.0

-TODAY: December 16 2011

+Specification-Vendor: Sun Microsystems Inc., Oracle

+Bundle-Name: Java Persistence API 2.1

 Created-By: 1.6.0_26 (Sun Microsystems Inc.)

-TSTAMP: 1009

 Bundle-RequiredExecutionEnvironment: J2SE-1.5

 Implementation-Vendor: Eclipse.org - EclipseLink Project

 Bundle-Vendor: Eclipse.org - EclipseLink Project

-Bundle-Version: 2.0.4.v201112161009

-Bnd-LastModified: 1324048194634

+Bundle-Version: 2.1.0.v201201192338

 Bundle-ManifestVersion: 2

 Bundle-Activator: org.eclipse.persistence.javax.persistence.osgi.Activator

-Include-Resource: ../../../about.html,

- ../../../readme.html,

- ../../../license.html,

- ./readme.txt,

- javax/persistence/orm_1_0.xsd=./src/javax/persistence/orm_1_0.xsd,

- javax/persistence/orm_2_0.xsd=./src/javax/persistence/orm_2_0.xsd,

- javax/persistence/persistence_1_0.xsd=./src/javax/persistence/persistence_1_0.xsd,

- javax/persistence/persistence_2_0.xsd=./src/javax/persistence/persistence_2_0.xsd,

- META-INF/eclipse.inf=./META-INF/eclipse.inf

+Specification-Version: 2.1

+Bundle-SymbolicName: javax.persistence

 Import-Package: javax.sql;resolution:=optional,

  org.osgi.framework;resolution:=optional,

  org.osgi.service.jpa;version="1.0.0"

-Specification-Version: 2.0

-Bundle-SymbolicName: javax.persistence

 

diff --git a/antbuild.xml b/antbuild.xml
index fc2149c..e707da7 100644
--- a/antbuild.xml
+++ b/antbuild.xml
@@ -56,11 +56,11 @@
        <format property="jpaproto.build.time" pattern="HHmm"/>
     </tstamp>
     <property name="jpaproto.qualifier"    value="v${jpaproto.build.date}${jpaproto.build.time}"/>
-    <property name="jpaproto.spec.vendor"  value="Sun Microsystems Inc."/>
+    <property name="jpaproto.spec.vendor"  value="Oracle"/>
     <property name="implementation.vendor" value="Eclipse.org - EclipseLink Project"/>
-    <property name="jpaproto.spec.version" value="2.0"/>
-    <property name="jpaproto.version"      value="2.0.4"/>
-    <property name="jpaproto.bundle.name"  value="Java Persistence API 2.0"/>
+    <property name="jpaproto.spec.version" value="2.1"/>
+    <property name="jpaproto.version"      value="2.1.0"/>
+    <property name="jpaproto.bundle.name"  value="Java Persistence API 2.1"/>
     <!-- Project infrastructure properties -->
     <property name="src.dir"               value="src"/>
     <property name="package.dir"           value=".."/>
@@ -179,7 +179,35 @@
     </target>
 
     <!-- package -->
-    <target name="package" if="nobnd" depends="init" description="jar OSGI bundle">
+    <target name="package-src" depends="init" description="jar OSGI bundle">
+        <jar jarfile="${package.dir}/${jpaproto.src.jar}" duplicate="preserve">
+            <manifest>
+                <attribute name="Specification-Vendor"   value="${jpaproto.spec.vendor}"/>
+                <attribute name="Specification-Version"  value="${jpaproto.spec.version}"/>
+                <attribute name="Implementation-Vendor"  value="${implementation.vendor}"/>
+                <attribute name="Implementation-Version" value="${jpaproto.version}"/>
+                <attribute name="Bundle-ManifestVersion" value="2"/>
+                <attribute name="Bundle-Name"            value="${jpaproto.bundle.name} Source"/>
+                <attribute name="Bundle-SymbolicName"    value="javax.persistence.source"/>
+                <attribute name="Bundle-Vendor"          value="${implementation.vendor}"/>
+                <attribute name="Bundle-Version"         value="${jpaproto.version}.${jpaproto.qualifier}"/>
+                <attribute name="Eclipse-SourceBundle"   value="javax.persistence;version=&quot;${jpaproto.version}.${jpaproto.qualifier}&quot;"/>
+            </manifest>
+            <fileset dir="${jpaproto.2.base.dir}">
+                <include name="about.html"/>
+                <include name="readme.html"/>
+                <include name="license.*"/>
+            </fileset>
+            <fileset dir="."
+                includes="readme.txt"
+            />
+            <fileset dir="${src.dir}"
+                includes="**"
+            />
+        </jar>
+    </target>
+
+    <target name="package" if="nobnd" depends="init, package-src" description="jar OSGI bundle">
         <jar jarfile="${package.dir}/${jpaproto.jar}" duplicate="preserve" manifest="${nobndtool.manifest.dir}/MANIFEST.MF">
             <fileset dir="${jpaproto.2.base.dir}">
                 <include name="about.html"/>
@@ -196,34 +224,9 @@
                 includes="**/*.class"
             />
         </jar>
-        <jar jarfile="${package.dir}/${jpaproto.src.jar}" duplicate="preserve">
-            <manifest>
-                <attribute name="Specification-Vendor"   value="${jpaproto.spec.vendor}"/>
-                <attribute name="Specification-Version"  value="${jpaproto.spec.version}"/>
-                <attribute name="Implementation-Vendor"  value="${implementation.vendor}"/>
-                <attribute name="Implementation-Version" value="${jpaproto.version}"/>
-                <attribute name="Bundle-ManifestVersion" value="2"/>
-                <attribute name="Bundle-Name"            value="${jpaproto.bundle.name} Source"/>
-                <attribute name="Bundle-SymbolicName"    value="${ant.project.name}.source"/>
-                <attribute name="Bundle-Vendor"          value="${implementation.vendor}"/>
-                <attribute name="Bundle-Version"         value="${jpaproto.version}.${jpaproto.qualifier}"/>
-                <attribute name="Eclipse-SourceBundle"   value="${ant.project.name};version=&quot;${jpaproto.version}.${jpaproto.qualifier}&quot;"/>
-            </manifest>
-            <fileset dir="${jpaproto.2.base.dir}">
-                <include name="about.html"/>
-                <include name="readme.html"/>
-                <include name="license.*"/>
-            </fileset>
-            <fileset dir="."
-                includes="readme.txt"
-            />
-            <fileset dir="${src.dir}"
-                includes="**"
-            />
-        </jar>
     </target>
 
-    <target name="bnd-package" if="bnd.bld" depends="init">
+    <target name="bnd-package" if="bnd.bld" depends="init, package-src">
         <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${bndtool.lib}"/>
         <bnd
             classpath="${classes.dir}"
@@ -233,30 +236,5 @@
             exceptions="true"
             files="./javax.persistence.bnd"
             output="${package.dir}/${jpaproto.jar}"/>
-        <jar jarfile="${package.dir}/${jpaproto.src.jar}" duplicate="preserve">
-            <manifest>
-                <attribute name="Specification-Vendor"   value="${jpaproto.spec.vendor}"/>
-                <attribute name="Specification-Version"  value="${jpaproto.spec.version}"/>
-                <attribute name="Implementation-Vendor"  value="${implementation.vendor}"/>
-                <attribute name="Implementation-Version" value="${jpaproto.version}"/>
-                <attribute name="Bundle-ManifestVersion" value="2"/>
-                <attribute name="Bundle-Name"            value="${jpaproto.bundle.name} Source"/>
-                <attribute name="Bundle-SymbolicName"    value="${ant.project.name}.source"/>
-                <attribute name="Bundle-Vendor"          value="${implementation.vendor}"/>
-                <attribute name="Bundle-Version"         value="${jpaproto.version}.${jpaproto.qualifier}"/>
-                <attribute name="Eclipse-SourceBundle"   value="${ant.project.name};version=&quot;${jpaproto.version}.${jpaproto.qualifier}&quot;"/>
-            </manifest>
-            <fileset dir="${jpaproto.2.base.dir}">
-                <include name="about.html"/>
-                <include name="readme.html"/>
-                <include name="license.*"/>
-            </fileset>
-            <fileset dir="."
-                includes="readme.txt"
-            />
-            <fileset dir="${src.dir}"
-                includes="**"
-            />
-        </jar>
     </target>
 </project>
diff --git a/readme.txt b/readme.txt
index e2dff95..157931b 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,4 +1,4 @@
- Copyright (c) 2008, 2009 Sun Microsystems, Oracle Corporation. All rights reserved. 

+ Copyright (c) 2008, 2012 Sun Microsystems, Oracle Corporation. All rights reserved. 

   

  This program and the accompanying materials are made available under the 

  terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

@@ -8,7 +8,7 @@
  http://www.eclipse.org/org/documents/edl-v10.php.

   

   Contributors:

-      Linda DeMichiel -Java Persistence 2.0 - Proposed Final Draft, Version 2.0 (August 31, 2009)

-      Specification available from http://jcp.org/en/jsr/detail?id=317

+      Linda DeMichiel -Java Persistence 2.1 - Draft, Version 1.0 (January 17, 2012)

+      Specification available from http://jcp.org/en/jsr/detail?id=

       Oracle Committers - EclipseLink specific implementations and OSGi support

  

diff --git a/src/javax/persistence/Access.java b/src/javax/persistence/Access.java
index 3f1a672..0a4a780 100644
--- a/src/javax/persistence/Access.java
+++ b/src/javax/persistence/Access.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

diff --git a/src/javax/persistence/AccessType.java b/src/javax/persistence/AccessType.java
index 84a99c9..6eba052 100644
--- a/src/javax/persistence/AccessType.java
+++ b/src/javax/persistence/AccessType.java
@@ -1,22 +1,22 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

 

 /**

- * Is used with the {@link Access} annotation to specify an access

+ * Used with the {@link Access} annotation to specify an access

  * type to be applied to an entity class, mapped superclass, or

  * embeddable class, or to a specific attribute of such a class.

  * 

diff --git a/src/javax/persistence/AssociationOverrides.java b/src/javax/persistence/AssociationOverrides.java
index 00420cf..ef2e0f2 100644
--- a/src/javax/persistence/AssociationOverrides.java
+++ b/src/javax/persistence/AssociationOverrides.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/AttributeOverride.java b/src/javax/persistence/AttributeOverride.java
index 3e48537..beecbd0 100644
--- a/src/javax/persistence/AttributeOverride.java
+++ b/src/javax/persistence/AttributeOverride.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/AttributeOverrides.java b/src/javax/persistence/AttributeOverrides.java
index abbfbb5..ba141f6 100644
--- a/src/javax/persistence/AttributeOverrides.java
+++ b/src/javax/persistence/AttributeOverrides.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/Basic.java b/src/javax/persistence/Basic.java
index cb3dfca..0b700dd 100644
--- a/src/javax/persistence/Basic.java
+++ b/src/javax/persistence/Basic.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/Cache.java b/src/javax/persistence/Cache.java
index 7022b0f..8e88ecd 100644
--- a/src/javax/persistence/Cache.java
+++ b/src/javax/persistence/Cache.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

@@ -50,4 +50,19 @@
      * Clear the cache.

      */

     public void evictAll();

+

+    /**

+     * Return an object of the specified type to allow access to the

+     * provider-specific API.  If the provider's Cache

+     * implementation does not support the specified class, the

+     * PersistenceException is thrown.

+     * @param cls  the class of the object to be returned.  This is

+     * normally either the underlying Cache implementation

+     * class or an interface that it implements.

+     * @return an instance of the specified class

+     * @throws PersistenceException if the provider does not

+     * support the call

+     * @since Java Persistence 2.1

+     */

+    public <T> T unwrap(Class<T> cls);

 }

diff --git a/src/javax/persistence/CacheRetrieveMode.java b/src/javax/persistence/CacheRetrieveMode.java
index 268e006..2151921 100644
--- a/src/javax/persistence/CacheRetrieveMode.java
+++ b/src/javax/persistence/CacheRetrieveMode.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

diff --git a/src/javax/persistence/CacheStoreMode.java b/src/javax/persistence/CacheStoreMode.java
index f33f292..9f88639 100644
--- a/src/javax/persistence/CacheStoreMode.java
+++ b/src/javax/persistence/CacheStoreMode.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

@@ -26,8 +26,8 @@
 public enum CacheStoreMode {

 

     /**

-     * Insert/update entity data into cache when read 

-     * from database and when committed into database: 

+     * Insert entity data into cache when read from database

+     * and insert/update entity data when committed into database: 

      * this is the default behavior. Does not force refresh

      * of already cached items when reading from database.

      */

diff --git a/src/javax/persistence/Cacheable.java b/src/javax/persistence/Cacheable.java
index 9b04f64..e50ae75 100644
--- a/src/javax/persistence/Cacheable.java
+++ b/src/javax/persistence/Cacheable.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import static java.lang.annotation.ElementType.TYPE;

diff --git a/src/javax/persistence/CascadeType.java b/src/javax/persistence/CascadeType.java
index 615cbfe..44fec73 100644
--- a/src/javax/persistence/CascadeType.java
+++ b/src/javax/persistence/CascadeType.java
@@ -1,19 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
-package javax.persistence;
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+ package javax.persistence;
 
 /**
  * Defines the set of cascadable operations that are propagated 
diff --git a/src/javax/persistence/CollectionTable.java b/src/javax/persistence/CollectionTable.java
index a218ef3..03c59d7 100644
--- a/src/javax/persistence/CollectionTable.java
+++ b/src/javax/persistence/CollectionTable.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

diff --git a/src/javax/persistence/Column.java b/src/javax/persistence/Column.java
index 37162c4..b195a20 100644
--- a/src/javax/persistence/Column.java
+++ b/src/javax/persistence/Column.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -22,7 +22,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify the mapped column for a persistent property or field.
+ * Specifies the mapped column for a persistent property or field.
  * If no <code>Column</code> annotation is specified, the default values apply.
  *
  * <blockquote><pre>
diff --git a/src/javax/persistence/ColumnResult.java b/src/javax/persistence/ColumnResult.java
index 10e25c9..ff35dbb 100644
--- a/src/javax/persistence/ColumnResult.java
+++ b/src/javax/persistence/ColumnResult.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -20,8 +20,12 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * References name of a column in the SELECT clause of a SQL query - 
- * i.e., column alias, if applicable. Scalar result types can be 
+ * Used in conjunction with the {@link SqlResultSetMapping} annotation or
+ * {@link ConstructorResult} annotation to map a column of the SELECT
+ * list of a SQL query.
+ *
+ * <p> The <code>name</code> element references the name of a column in the SELECT list
+ *  &#8212; i.e., column alias, if applicable. Scalar result types can be 
  * included in the query result by specifying this annotation in 
  * the metadata.
  *
@@ -59,4 +63,12 @@
 
     /** (Required) The name of a column in the SELECT clause of a SQL query */
     String name();
+
+    /** 
+     *  (Optional) The Java type to which the column type is to be mapped.
+     *  If the <code>type</code> element is not specified, the default JDBC type 
+     *  mapping for the column will be used.
+     *  @since Java Persistence 2.1
+     */
+    Class type() default void.class;
 }
diff --git a/src/javax/persistence/ConstructorResult.java b/src/javax/persistence/ConstructorResult.java
new file mode 100644
index 0000000..8b864a5
--- /dev/null
+++ b/src/javax/persistence/ConstructorResult.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+package javax.persistence;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Used in conjunction with the {@link SqlResultSetMapping} annotation to map the SELECT
+ * clause of a SQL query to a constructor.
+ *
+ * <p>Applies a constructor for the target class, passing in as arguments
+ * values from the specified columns.  All columns corresponding
+ * to arguments of the intended constructor must be specified using the
+ * <code>columns</code> element of the <code>ConstructorResult</code>
+ * annotation in the same order as that of the argument list of the
+ * constructor.  Any entities returned as constructor results will be
+ * in either the new or detached state, depending on whether a primary
+ * key is retrieved for the constructed object.
+ * 
+ * <pre>
+ *
+ * Example:
+ *
+ *   Query q = em.createNativeQuery(
+ *      "SELECT c.id, c.name, COUNT(o) as orderCount, AVG(o.price) AS avgOrder " +
+ *      "FROM Customer c, Orders o " +
+ *      "WHERE o.cid = c.id " +
+ *      "GROUP BY c.id, c.name",
+ *      "CustomerDetailsResult");
+ *
+ *   &#064;SqlResultSetMapping(
+ *       name="CustomerDetailsResult",
+ *       classes={
+ *          &#064;ConstructorResult(
+ *               targetClass=com.acme.CustomerDetails.class,
+ *                 columns={
+ *                    &#064;ColumnResult(name="id"),
+ *                    &#064;ColumnResult(name="name"),
+ *                    &#064;ColumnResult(name="orderCount"),
+ *                    &#064;ColumnResult(name="avgOrder", type=Double.class)
+ *                    }
+ *          )
+ *       }
+ *      )
+ *
+ * </pre>
+ *
+ * @see SqlResultSetMapping
+ * @see ColumnResult
+ *
+ * @since Java Persistence 2.1
+ */
+@Target({}) 
+@Retention(RUNTIME)
+
+public @interface ConstructorResult { 
+
+    /** (Required) The class whose constructor is to be invoked. */
+    Class targetClass();
+
+    /** 
+     *  (Required) The mapping of columns in the SELECT list to the arguments
+     *  of the intended constructor, in order.
+     */
+    ColumnResult[] columns();
+}
diff --git a/src/javax/persistence/DiscriminatorColumn.java b/src/javax/persistence/DiscriminatorColumn.java
index ba2fd7d..2e36bc6 100644
--- a/src/javax/persistence/DiscriminatorColumn.java
+++ b/src/javax/persistence/DiscriminatorColumn.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/DiscriminatorType.java b/src/javax/persistence/DiscriminatorType.java
index 269ca81..660b07a 100644
--- a/src/javax/persistence/DiscriminatorType.java
+++ b/src/javax/persistence/DiscriminatorType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/DiscriminatorValue.java b/src/javax/persistence/DiscriminatorValue.java
index fa0daa2..f0d25cb 100644
--- a/src/javax/persistence/DiscriminatorValue.java
+++ b/src/javax/persistence/DiscriminatorValue.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/ElementCollection.java b/src/javax/persistence/ElementCollection.java
index 5450193..7a1f212 100644
--- a/src/javax/persistence/ElementCollection.java
+++ b/src/javax/persistence/ElementCollection.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

@@ -23,7 +23,7 @@
 import static javax.persistence.FetchType.LAZY;

 

 /**

- * Defines a collection of instances of a basic type or embeddable

+ * Specifies a collection of instances of a basic type or embeddable

  * class. 

  * Must be specified if the collection is to be mapped by

  * means of a collection table.

diff --git a/src/javax/persistence/Embeddable.java b/src/javax/persistence/Embeddable.java
index 5e6674a..7cc752d 100644
--- a/src/javax/persistence/Embeddable.java
+++ b/src/javax/persistence/Embeddable.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -22,7 +22,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Defines a class whose instances are stored as an intrinsic 
+ * Specifies a class whose instances are stored as an intrinsic 
  * part of an owning entity and share the identity of the entity. 
  * Each of the persistent properties or fields of the embedded 
  * object is mapped to the database table for the entity. 
diff --git a/src/javax/persistence/Embedded.java b/src/javax/persistence/Embedded.java
index eebe368..6b595bd 100644
--- a/src/javax/persistence/Embedded.java
+++ b/src/javax/persistence/Embedded.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/EmbeddedId.java b/src/javax/persistence/EmbeddedId.java
index 88939a6..3842a7f 100644
--- a/src/javax/persistence/EmbeddedId.java
+++ b/src/javax/persistence/EmbeddedId.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/Entity.java b/src/javax/persistence/Entity.java
index 83c0692..82acc12 100644
--- a/src/javax/persistence/Entity.java
+++ b/src/javax/persistence/Entity.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/EntityExistsException.java b/src/javax/persistence/EntityExistsException.java
index 0ac3b31..e4b7271 100644
--- a/src/javax/persistence/EntityExistsException.java
+++ b/src/javax/persistence/EntityExistsException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
@@ -23,7 +23,8 @@
  * If the entity already exists, the <code>EntityExistsException</code> may be thrown when
  * the persist operation is invoked, or the <code>EntityExistsException</code> or another
  * <code>PersistenceException</code> may be thrown at flush or commit time.
- * <p> The current transaction, if one is active, will be marked for rollback.
+ * <p> The current transaction, if one is active and the persistence context
+ * has been joined to it, will be marked for rollback.
  *
  * @see javax.persistence.EntityManager#persist(Object)
  * 
diff --git a/src/javax/persistence/EntityListeners.java b/src/javax/persistence/EntityListeners.java
index 19bcd33..81c3fca 100644
--- a/src/javax/persistence/EntityListeners.java
+++ b/src/javax/persistence/EntityListeners.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/EntityManager.java b/src/javax/persistence/EntityManager.java
index b3293ad..193e95e 100644
--- a/src/javax/persistence/EntityManager.java
+++ b/src/javax/persistence/EntityManager.java
@@ -1,24 +1,26 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.util.Map;
 import javax.persistence.metamodel.Metamodel;
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.CriteriaUpdate;
+import javax.persistence.criteria.CriteriaDelete;
 
 /**
  * Interface used to interact with the persistence context.
@@ -42,6 +44,7 @@
  * @see TypedQuery
  * @see CriteriaQuery
  * @see PersistenceContext
+ * @see StoredProcedureQuery
  * 
  * @since Java Persistence 1.0
  */
@@ -57,10 +60,9 @@
      * thrown at flush or commit time.) 
      * @throws IllegalArgumentException if the instance is not an
      *         entity
-     * @throws TransactionRequiredException if invoked on a
-     *         container-managed entity manager of type 
-     *         <code>PersistenceContextType.TRANSACTION</code> and there is 
-     *         no transaction
+     * @throws TransactionRequiredException if there is no transaction when
+     *         invoked on a container-managed entity manager of that is of type 
+     *         <code>PersistenceContextType.TRANSACTION</code>
      */
     public void persist(Object entity);
     
@@ -71,10 +73,9 @@
      * @return the managed instance that the state was merged to
      * @throws IllegalArgumentException if instance is not an
      *         entity or is a removed entity
-     * @throws TransactionRequiredException if invoked on a
-     *         container-managed entity manager of type 
-     *         <code>PersistenceContextType.TRANSACTION</code> and there is 
-     *         no transaction
+     * @throws TransactionRequiredException if there is no transaction when
+     *         invoked on a container-managed entity manager of that is of type 
+     *         <code>PersistenceContextType.TRANSACTION</code>
      */    
     public <T> T merge(T entity);
     
@@ -158,8 +159,10 @@
      *         not a valid type for that entity's primary key or 
      *         is null
      * @throws TransactionRequiredException if there is no 
-     *         transaction and a lock mode other than NONE is
-     *         specified
+     *         transaction and a lock mode other than <code>NONE</code> is
+     *         specified or if invoked on an entity manager which has
+     *         not been joined to the current transaction and a lock
+     *         mode other than <code>NONE</code> is specified
      * @throws OptimisticLockException if the optimistic version 
      *         check fails
      * @throws PessimisticLockException if pessimistic locking 
@@ -211,8 +214,10 @@
      *         not a valid type for that entity's primary key or 
      *         is null
      * @throws TransactionRequiredException if there is no 
-     *         transaction and a lock mode other than <code>NONE</code> is 
-     *         specified
+     *         transaction and a lock mode other than <code>NONE</code> is
+     *         specified or if invoked on an entity manager which has
+     *         not been joined to the current transaction and a lock
+     *         mode other than <code>NONE</code> is specified
      * @throws OptimisticLockException if the optimistic version 
      *         check fails
      * @throws PessimisticLockException if pessimistic locking 
@@ -242,7 +247,7 @@
      * @return the found entity instance
      * @throws IllegalArgumentException if the first argument does
      *         not denote an entity type or the second argument is
-     *         not a valid type for that entityÂ’s primary key or
+     *         not a valid type for that entity's primary key or
      *         is null
      * @throws EntityNotFoundException if the entity state 
      *         cannot be accessed
@@ -254,7 +259,8 @@
      * Synchronize the persistence context to the
      * underlying database.
      * @throws TransactionRequiredException if there is
-     *         no transaction
+     *         no transaction or if the entity manager has not been
+     *         joined to the current transaction
      * @throws PersistenceException if the flush fails
      */
     public void flush();
@@ -294,7 +300,8 @@
      * @throws IllegalArgumentException if the instance is not an
      *         entity or is a detached entity
      * @throws TransactionRequiredException if there is no 
-     *         transaction
+     *         transaction or if invoked on an entity manager which
+     *         has not been joined to the current transaction
      * @throws EntityNotFoundException if the entity does not exist 
      *         in the database when pessimistic locking is 
      *         performed
@@ -339,7 +346,8 @@
      * @throws IllegalArgumentException if the instance is not an
      *         entity or is a detached entity
      * @throws TransactionRequiredException if there is no 
-     *         transaction
+     *         transaction or if invoked on an entity manager which
+     *         has not been joined to the current transaction
      * @throws EntityNotFoundException if the entity does not exist 
      *         in the database when pessimistic locking is 
      *         performed
@@ -362,10 +370,9 @@
      * @param entity  entity instance
      * @throws IllegalArgumentException if the instance is not
      *         an entity or the entity is not managed
-     * @throws TransactionRequiredException if invoked on a
-     *         container-managed entity manager of type 
-     *         <code>PersistenceContextType.TRANSACTION</code> and there is 
-     *         no transaction
+     * @throws TransactionRequiredException if there is no
+     *         transaction when invoked on a container-managed
+     *         entity manager of type <code>PersistenceContextType.TRANSACTION</code>
      * @throws EntityNotFoundException if the entity no longer
      *         exists in the database
      */    
@@ -382,10 +389,9 @@
      *        and hints
      * @throws IllegalArgumentException if the instance is not 
      *         an entity or the entity is not managed 
-     * @throws TransactionRequiredException if invoked on a 
-     *         container-managed entity manager of type
-     *         <code>PersistenceContextType.TRANSACTION</code> and there is
-     *         no transaction 
+     * @throws TransactionRequiredException if there is no
+     *         transaction when invoked on a container-managed
+     *         entity manager of type <code>PersistenceContextType.TRANSACTION</code>
      * @throws EntityNotFoundException if the entity no longer 
      *         exists in the database 
      * @since Java Persistence 2.0
@@ -410,11 +416,14 @@
      * @param lockMode  lock mode
      * @throws IllegalArgumentException if the instance is not
      *         an entity or the entity is not managed
-     * @throws TransactionRequiredException if there is no 
-     *         transaction and if invoked on a container-managed
-     *         <code>EntityManager</code> instance with
-     *         <code>PersistenceContextType.TRANSACTION</code> or with a lock mode 
-     *         other than <code>NONE</code>
+     * @throws TransactionRequiredException if invoked on a 
+     *         container-managed entity manager of type
+     *         <code>PersistenceContextType.TRANSACTION</code> when there is
+     *         no transaction; if invoked on an extended entity manager when
+     *         there is no transaction and a lock mode other than <code>NONE</code>
+     *         has been specified; or if invoked on an extended entity manager
+     *         that has not been joined to the current transaction and a
+     *         lock mode other than <code>NONE</code> has been specified
      * @throws EntityNotFoundException if the entity no longer exists
      *         in the database
      * @throws PessimisticLockException if pessimistic locking fails
@@ -452,11 +461,14 @@
      *        and hints
      * @throws IllegalArgumentException if the instance is not
      *         an entity or the entity is not managed
-     * @throws TransactionRequiredException if there is no 
-     *         transaction and if invoked on a container-managed
-     *         <code>EntityManager</code> instance with
-     *         <code>PersistenceContextType.TRANSACTION</code> or with a lock mode 
-     *         other than <code>NONE</code>
+     * @throws TransactionRequiredException if invoked on a 
+     *         container-managed entity manager of type
+     *         <code>PersistenceContextType.TRANSACTION</code> when there is
+     *         no transaction; if invoked on an extended entity manager when
+     *         there is no transaction and a lock mode other than <code>NONE</code>
+     *         has been specified; or if invoked on an extended entity manager
+     *         that has not been joined to the current transaction and a
+     *         lock mode other than <code>NONE</code> has been specified
      * @throws EntityNotFoundException if the entity no longer exists
      *         in the database
      * @throws PessimisticLockException if pessimistic locking fails
@@ -506,7 +518,8 @@
      * @param entity  entity instance
      * @return lock mode
      * @throws TransactionRequiredException if there is no 
-     *         transaction
+     *         transaction or if the entity manager has not been
+     *         joined to the current transaction
      * @throws IllegalArgumentException if the instance is not a
      *         managed entity and a transaction is active
      * @since Java Persistence 2.0
@@ -556,6 +569,28 @@
     public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery); 
 
     /**
+     * Create an instance of <code>Query</code> for executing a criteria
+     * update query.
+     * @param updateQuery  a criteria update query object
+     * @return the new query instance
+     * @throws IllegalArgumentException if the update query is
+     *         found to be invalid
+     * @since Java Persistence 2.1
+     */
+    public Query createQuery(CriteriaUpdate updateQuery);
+
+    /**
+     * Create an instance of <code>Query</code> for executing a criteria
+     * delete query.
+     * @param deleteQuery  a criteria delete query object
+     * @return the new query instance
+     * @throws IllegalArgumentException if the delete query is
+     *         found to be invalid
+     * @since Java Persistence 2.1
+     */
+    public Query createQuery(CriteriaDelete deleteQuery);
+
+    /**
      * Create an instance of <code>TypedQuery</code> for executing a
      * Java Persistence query language statement.
      * The select list of the query must contain only a single
@@ -602,6 +637,13 @@
     /**
      * Create an instance of <code>Query</code> for executing
      * a native SQL statement, e.g., for update or delete.
+     * If the query is not an update or delete query, query
+     * execution will result in each row of the SQL result
+     * being returned as a result of type Object[] (or a result
+     * of type Object if there is only one column in the select
+     * list.)  Column values are returned in the order of their
+     * appearance in the select list and default JDBC type
+     * mappings are applied.
      * @param sqlString a native SQL query string
      * @return the new query instance
      */
@@ -626,17 +668,105 @@
     public Query createNativeQuery(String sqlString, String resultSetMapping);
 
     /**
+     * Create an instance of <code>StoredProcedureQuery</code> for executing a
+     * stored procedure in the database.
+     * <p>Parameters must be registered before the stored procedure can
+     * be executed.
+     * <p>If the stored procedure returns one or more result sets,
+     * any result set will be returned as a list of type Object[].
+     * @param name name assigned to the stored procedure query
+     * in metadata
+     * @return the new stored procedure query instance
+     * @throws IllegalArgumentException if a query has not been
+     * defined with the given name
+     * @since Java Persistence 2.1
+     */
+    public StoredProcedureQuery createNamedStoredProcedureQuery(String name);
+
+    /**
+     * Create an instance of <code>StoredProcedureQuery</code> for executing a
+     * stored procedure in the database.
+     * <p>Parameters must be registered before the stored procedure can
+     * be executed.
+     * <p>If the stored procedure returns one or more result sets,
+     * any result set will be returned as a list of type Object[].
+     * @param procedureName name of the stored procedure in the
+     * database
+     * @return the new stored procedure query instance
+     * @throws IllegalArgumentException if a stored procedure of the
+     * given name does not exist (or the query execution will
+     * fail)
+     * @since Java Persistence 2.1
+     */
+    public StoredProcedureQuery createStoredProcedureQuery(String procedureName);
+
+    /**
+     * Create an instance of <code>StoredProcedureQuery</code> for executing a
+     * stored procedure in the database.
+     * <p>Parameters must be registered before the stored procedure can
+     * be executed.
+     * <p>The <code>resultClass</code> arguments must be specified in the order in
+     * which the result sets will be returned by the stored procedure
+     * invocation.
+     * @param procedureName name of the stored procedure in the
+     * database
+     * @param resultClasses classes to which the result sets
+     * produced by the stored procedure are to
+     * be mapped
+     * @return the new stored procedure query instance
+     * @throws IllegalArgumentException if a stored procedure of the
+     * given name does not exist (or the query execution will
+     * fail)
+     * @since Java Persistence 2.1
+     */
+    public StoredProcedureQuery createStoredProcedureQuery(
+	       String procedureName, Class... resultClasses);
+
+    /**
+     * Create an instance of <code>StoredProcedureQuery</code> for executing a
+     * stored procedure in the database.
+     * <p>Parameters must be registered before the stored procedure can
+     * be executed.
+     * <p>The <code>resultSetMapping</code> arguments must be specified in the order
+     * in which the result sets will be returned by the stored
+     * procedure invocation.
+     * @param procedureName name of the stored procedure in the
+     *        database
+     * @param resultSetMappings the names of the result set mappings
+     *        to be used in mapping result sets
+     *        returned by the stored procedure
+     * @return the new stored procedure query instance
+     * @throws IllegalArgumentException if a stored procedure or
+     *         result set mapping of the given name does not exist
+     *         (or the query execution will fail)
+     */
+    public StoredProcedureQuery createStoredProcedureQuery(
+              String procedureName, String... resultSetMappings);
+
+    /**
      * Indicate to the entity manager that a JTA transaction is
-     * active. This method should be called on a JTA application 
+     * active and join the persistence context to it. 
+     * <p>This method should be called on a JTA application 
      * managed entity manager that was created outside the scope
-     * of the active transaction to associate it with the current
-     * JTA transaction.
+     * of the active transaction or on an entity manager of type
+     * <code>SynchronizationType.UNSYNCHRONIZED</code> to associate
+     * it with the current JTA transaction.
      * @throws TransactionRequiredException if there is
      *         no transaction
      */
     public void joinTransaction();
 
     /**
+     * Determine whether the entity manager is joined to the
+     * current transaction. Returns false if the entity manager
+     * is not joined to the current transaction or if no
+     * transaction is active
+     * @return boolean
+     * @since Java Persistence 2.1
+     */
+    public boolean isJoinedToTransaction();
+
+    /**
      * Return an object of the specified type to allow access to the
      * provider-specific API.   If the provider's <code>EntityManager</code>
      * implementation does not support the specified class, the
@@ -654,8 +784,8 @@
     /**
      * Return the underlying provider object for the <code>EntityManager</code>,
      * if available. The result of this method is implementation
-     * specific. The <code>unwrap</code> method is to be preferred for new 
-     * applications.
+     * specific. 
+     * <p>The <code>unwrap</code> method is to be preferred for new applications.
      * @return underlying provider object for EntityManager
      */
     public Object getDelegate();
@@ -669,7 +799,7 @@
      * except for <code>getProperties</code>, 
      * <code>getTransaction</code>, and <code>isOpen</code> (which will return false).
      * If this method is called when the entity manager is
-     * associated with an active transaction, the persistence
+     * joined to an active transaction, the persistence
      * context remains managed until the transaction completes. 
      * @throws IllegalStateException if the entity manager
      *         is container-managed
diff --git a/src/javax/persistence/EntityManagerFactory.java b/src/javax/persistence/EntityManagerFactory.java
index 06dce7a..ee80a01 100644
--- a/src/javax/persistence/EntityManagerFactory.java
+++ b/src/javax/persistence/EntityManagerFactory.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

@@ -131,4 +131,47 @@
      * @since Java Persistence 2.0

      */

     public PersistenceUnitUtil getPersistenceUnitUtil();

+

+    /**

+     * Define the query, typed query, or stored procedure query as

+     * a named query such that future query objects can be created

+     * from it using the <code>createNamedQuery</code> methods.

+     * <p>Any configuration of the query object (except for actual

+     * parameter binding) in effect when the named query is added

+     * is retained as part of the named query definition.

+     * This includes configuration information such as max results,

+     * hints, flush mode, lock mode, result set mapping information,

+     * and information about stored procedure parameters.

+     * <p>When the query is executed, information that can be set

+     * by means of the <code>Query</code> API can be overridden. Information

+     * that is overridden does not affect the named query as

+     * registered with the entity manager factory, and thus does

+     * not affect subsequent query objects created from it by

+     * means of the <code>createNamedQuery</code> method.

+     * <p>If a named query of the same name has been previously

+     * defined, either statically via metadata or via this method,

+     * that query definition is replaced.

+     *

+     * @param name name for the query

+     * @param query Query, TypedQuery, or StoredProcedureQuery object

+     *

+     * @since Java Persistence 2.1

+     */

+    public void addNamedQuery(String name, Query query);

+

+    /**

+     * Return an object of the specified type to allow access to the

+     * provider-specific API. If the provider's EntityManagerFactory

+     * implementation does not support the specified class, the

+     * PersistenceException is thrown.

+     * @param cls the class of the object to be returned. This is

+     * normally either the underlying EntityManagerFactory

+     * implementation class or an interface that it implements.

+     * @return an instance of the specified class

+     * @throws PersistenceException if the provider does not

+     * support the call

+     * @since Java Persistence 2.1

+     */

+    public <T> T unwrap(Class<T> cls);

+

 }

diff --git a/src/javax/persistence/EntityNotFoundException.java b/src/javax/persistence/EntityNotFoundException.java
index c23cd38..3542544 100644
--- a/src/javax/persistence/EntityNotFoundException.java
+++ b/src/javax/persistence/EntityNotFoundException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
@@ -23,7 +23,8 @@
  * object no longer exists in the database. 
  * Thrown when {@link EntityManager#lock EntityManager.lock} is used with
  * pessimistic locking is used and the entity no longer exists in the database.
- * <p> The current transaction, if one is active, will be marked for rollback.
+ * <p> The current transaction, if one is active and the persistence context
+ * has been joined to it, will be marked for rollback.
  * 
  * @see EntityManager#getReference(Class,Object)
  * @see EntityManager#refresh(Object)
diff --git a/src/javax/persistence/EntityResult.java b/src/javax/persistence/EntityResult.java
index 823a08f..0afebec 100644
--- a/src/javax/persistence/EntityResult.java
+++ b/src/javax/persistence/EntityResult.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -20,8 +20,10 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Used to map the SELECT clause of a SQL query to an entity result.
- * If this annotation is used, the SQL statement should select 
+ * Used in conjunction with the {@link SqlResultSetMapping} annotation to map the SELECT
+ * clause of a SQL query to an entity result.
+ *
+ * <p>If this annotation is used, the SQL statement should select 
  * all of the columns that are mapped to the entity object. 
  * This should include foreign key columns to related entities. 
  * The results obtained when insufficient data is available 
diff --git a/src/javax/persistence/EntityTransaction.java b/src/javax/persistence/EntityTransaction.java
index 1082e0e..79e6eb3 100644
--- a/src/javax/persistence/EntityTransaction.java
+++ b/src/javax/persistence/EntityTransaction.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/EnumType.java b/src/javax/persistence/EnumType.java
index 1bce751..8733301 100644
--- a/src/javax/persistence/EnumType.java
+++ b/src/javax/persistence/EnumType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/Enumerated.java b/src/javax/persistence/Enumerated.java
index 1350245..07ef1b9 100644
--- a/src/javax/persistence/Enumerated.java
+++ b/src/javax/persistence/Enumerated.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/ExcludeDefaultListeners.java b/src/javax/persistence/ExcludeDefaultListeners.java
index 35fca1c..5ab94d4 100644
--- a/src/javax/persistence/ExcludeDefaultListeners.java
+++ b/src/javax/persistence/ExcludeDefaultListeners.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/ExcludeSuperclassListeners.java b/src/javax/persistence/ExcludeSuperclassListeners.java
index e0d87d8..285060a 100644
--- a/src/javax/persistence/ExcludeSuperclassListeners.java
+++ b/src/javax/persistence/ExcludeSuperclassListeners.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/FetchType.java b/src/javax/persistence/FetchType.java
index 15140db..7ef0241 100644
--- a/src/javax/persistence/FetchType.java
+++ b/src/javax/persistence/FetchType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/FieldResult.java b/src/javax/persistence/FieldResult.java
index c50ef41..4eda9c1 100644
--- a/src/javax/persistence/FieldResult.java
+++ b/src/javax/persistence/FieldResult.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -20,8 +20,8 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to map the columns specified in the SELECT list 
- * of the query to the properties or fields of the entity class.
+ * Used in conjunction with the {@link EntityResult} annotation to map columns specified 
+ * in the SELECT list of a SQL query to the properties or fields of an entity class.
  *
  * <pre>
  *
@@ -43,6 +43,8 @@
  *       })
  * </pre>
  *
+ * @see EntityResult
+ * @see SqlResultSetMapping
  * @since Java Persistence 1.0
  */
 @Target({}) 
diff --git a/src/javax/persistence/FlushModeType.java b/src/javax/persistence/FlushModeType.java
index c1bbc90..349b145 100644
--- a/src/javax/persistence/FlushModeType.java
+++ b/src/javax/persistence/FlushModeType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
@@ -34,8 +34,9 @@
  * updates made to entities in the persistence context upon queries is
  * unspecified.
  *
- * <p> If there is no transaction active, the persistence provider 
- * must not flush to the database.
+ * <p> If there is no transaction active or the persistence context is not
+ * joined to the current transaction, the persistence provider must not flush 
+ * to the database.
  *
  * @since Java Persistence 1.0
  */
diff --git a/src/javax/persistence/GeneratedValue.java b/src/javax/persistence/GeneratedValue.java
index 9432652..1f1fda7 100644
--- a/src/javax/persistence/GeneratedValue.java
+++ b/src/javax/persistence/GeneratedValue.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/GenerationType.java b/src/javax/persistence/GenerationType.java
index 27e3649..74de4d1 100644
--- a/src/javax/persistence/GenerationType.java
+++ b/src/javax/persistence/GenerationType.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/Id.java b/src/javax/persistence/Id.java
index 35ba4bc..44558b6 100644
--- a/src/javax/persistence/Id.java
+++ b/src/javax/persistence/Id.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/IdClass.java b/src/javax/persistence/IdClass.java
index b79d7c2..3d4dde6 100644
--- a/src/javax/persistence/IdClass.java
+++ b/src/javax/persistence/IdClass.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/Inheritance.java b/src/javax/persistence/Inheritance.java
index cb20dab..908141d 100644
--- a/src/javax/persistence/Inheritance.java
+++ b/src/javax/persistence/Inheritance.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
@@ -22,7 +22,7 @@
 import static javax.persistence.InheritanceType.SINGLE_TABLE;
 
 /**
- * Defines the inheritance strategy to be used for an entity class
+ * Specifies the inheritance strategy to be used for an entity class
  * hierarchy. It is specified on the entity class that is the root of
  * the entity class hierarchy.  If the <code>Inheritance</code> annotation is not
  * specified or if no inheritance type is specified for an entity
diff --git a/src/javax/persistence/InheritanceType.java b/src/javax/persistence/InheritanceType.java
index 4ec2b61..1596120 100644
--- a/src/javax/persistence/InheritanceType.java
+++ b/src/javax/persistence/InheritanceType.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/JoinColumn.java b/src/javax/persistence/JoinColumn.java
index 6cc8792..3515f1a 100644
--- a/src/javax/persistence/JoinColumn.java
+++ b/src/javax/persistence/JoinColumn.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/JoinColumns.java b/src/javax/persistence/JoinColumns.java
index 104c050..cfa9a3d 100644
--- a/src/javax/persistence/JoinColumns.java
+++ b/src/javax/persistence/JoinColumns.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
@@ -22,7 +22,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Defines mapping for composite foreign keys. This annotation 
+ * Specifies the mapping for composite foreign keys. This annotation 
  * groups <code>JoinColumn</code> annotations for the same relationship.
  *
  * <p> When the <code>JoinColumns</code> annotation is used, 
diff --git a/src/javax/persistence/JoinTable.java b/src/javax/persistence/JoinTable.java
index 4f73450..60a3819 100644
--- a/src/javax/persistence/JoinTable.java
+++ b/src/javax/persistence/JoinTable.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -22,7 +22,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Used in the mapping of associations. It is specified on the
+ * Specifies the mapping of associations. It is applied to the
  * owning side of an association.  
  *
  * <p> A join table is typically used in the mapping of many-to-many
diff --git a/src/javax/persistence/Lob.java b/src/javax/persistence/Lob.java
index 427e81b..f0cc1b4 100644
--- a/src/javax/persistence/Lob.java
+++ b/src/javax/persistence/Lob.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/LockModeType.java b/src/javax/persistence/LockModeType.java
index b32bb85..d85daa2 100644
--- a/src/javax/persistence/LockModeType.java
+++ b/src/javax/persistence/LockModeType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
@@ -36,7 +36,7 @@
  *
  * <p> The semantics of requesting locks of type
  * <code>LockModeType.OPTIMISTIC</code> and
- * <code>LockModeType.OPTIMISTIC_FORCE_INCREMENT<code> are the
+ * <code>LockModeType.OPTIMISTIC_FORCE_INCREMENT</code> are the
  * following.
  *
  * <p> If transaction T1 calls for a lock of type 
diff --git a/src/javax/persistence/LockTimeoutException.java b/src/javax/persistence/LockTimeoutException.java
index 0e2895f..df8da87 100644
--- a/src/javax/persistence/LockTimeoutException.java
+++ b/src/javax/persistence/LockTimeoutException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/ManyToMany.java b/src/javax/persistence/ManyToMany.java
index 5aec1ac..be02824 100644
--- a/src/javax/persistence/ManyToMany.java
+++ b/src/javax/persistence/ManyToMany.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -24,7 +24,7 @@
 import static javax.persistence.FetchType.LAZY;
 
 /**
- * Defines a many-valued association with many-to-many multiplicity. 
+ * Specifies a many-valued association with many-to-many multiplicity. 
  *
  * <p> Every many-to-many association has two sides, the owning side
  * and the non-owning, or inverse, side.  The join table is specified
diff --git a/src/javax/persistence/ManyToOne.java b/src/javax/persistence/ManyToOne.java
index cd52b0c..6d3766c 100644
--- a/src/javax/persistence/ManyToOne.java
+++ b/src/javax/persistence/ManyToOne.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -24,7 +24,7 @@
 import static javax.persistence.FetchType.EAGER;
 
 /**
- * Defines a single-valued association to another entity class that
+ * Specifies a single-valued association to another entity class that
  * has many-to-one multiplicity. It is not normally necessary to
  * specify the target entity explicitly since it can usually be
  * inferred from the type of the object being referenced.  If the
diff --git a/src/javax/persistence/MapKey.java b/src/javax/persistence/MapKey.java
index 6bf7b56..53adf56 100644
--- a/src/javax/persistence/MapKey.java
+++ b/src/javax/persistence/MapKey.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/MapKeyClass.java b/src/javax/persistence/MapKeyClass.java
index a47a519..0a8f883 100644
--- a/src/javax/persistence/MapKeyClass.java
+++ b/src/javax/persistence/MapKeyClass.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

diff --git a/src/javax/persistence/MapKeyColumn.java b/src/javax/persistence/MapKeyColumn.java
index 1e55369..c7f6eb8 100644
--- a/src/javax/persistence/MapKeyColumn.java
+++ b/src/javax/persistence/MapKeyColumn.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

diff --git a/src/javax/persistence/MapKeyEnumerated.java b/src/javax/persistence/MapKeyEnumerated.java
index b481da7..6473f54 100644
--- a/src/javax/persistence/MapKeyEnumerated.java
+++ b/src/javax/persistence/MapKeyEnumerated.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

diff --git a/src/javax/persistence/MapKeyJoinColumn.java b/src/javax/persistence/MapKeyJoinColumn.java
index 760ba53..0e7d214 100644
--- a/src/javax/persistence/MapKeyJoinColumn.java
+++ b/src/javax/persistence/MapKeyJoinColumn.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

diff --git a/src/javax/persistence/MapKeyJoinColumns.java b/src/javax/persistence/MapKeyJoinColumns.java
index 73b97b4..2fc1682 100644
--- a/src/javax/persistence/MapKeyJoinColumns.java
+++ b/src/javax/persistence/MapKeyJoinColumns.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

diff --git a/src/javax/persistence/MapKeyTemporal.java b/src/javax/persistence/MapKeyTemporal.java
index 0b940a3..6ab4f22 100644
--- a/src/javax/persistence/MapKeyTemporal.java
+++ b/src/javax/persistence/MapKeyTemporal.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

diff --git a/src/javax/persistence/MappedSuperclass.java b/src/javax/persistence/MappedSuperclass.java
index 452c6b4..fdf25bf 100644
--- a/src/javax/persistence/MappedSuperclass.java
+++ b/src/javax/persistence/MappedSuperclass.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/MapsId.java b/src/javax/persistence/MapsId.java
index 571a119..9c821e1 100644
--- a/src/javax/persistence/MapsId.java
+++ b/src/javax/persistence/MapsId.java
@@ -1,17 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel -Java Persistence 2.0 - Proposed Final Draft, Version 2.0 (August 31, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

- ******************************************************************************/

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 

diff --git a/src/javax/persistence/NamedNativeQueries.java b/src/javax/persistence/NamedNativeQueries.java
index f94f670..82a6166 100644
--- a/src/javax/persistence/NamedNativeQueries.java
+++ b/src/javax/persistence/NamedNativeQueries.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence; 
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Used to specify multiple native SQL named queries.  Query names
+ * Specifies multiple native SQL named queries.  Query names
  * are scoped to the persistence unit.  The <code>NamedNativeQueries</code> 
  * annotation can be applied to an entity or mapped superclass.
  *
diff --git a/src/javax/persistence/NamedNativeQuery.java b/src/javax/persistence/NamedNativeQuery.java
index 3c9572d..5b83e12 100644
--- a/src/javax/persistence/NamedNativeQuery.java
+++ b/src/javax/persistence/NamedNativeQuery.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/NamedQueries.java b/src/javax/persistence/NamedQueries.java
index af92b43..9bf0b8e 100644
--- a/src/javax/persistence/NamedQueries.java
+++ b/src/javax/persistence/NamedQueries.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence; 
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/NamedQuery.java b/src/javax/persistence/NamedQuery.java
index cda4245..474dbc2 100644
--- a/src/javax/persistence/NamedQuery.java
+++ b/src/javax/persistence/NamedQuery.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -67,7 +67,7 @@
     /** 
      * (Optional) The lock mode type to use in query execution.  If a <code>lockMode</code>
      * other than <code>LockModeType.NONE</code> is specified, the query must be executed in
-     * a transaction.
+     * a transaction and the persistence context joined to the transaction.
      * @since Java Persistence 2.0
      */
     LockModeType lockMode() default NONE;
diff --git a/src/javax/persistence/NamedStoredProcedureQueries.java b/src/javax/persistence/NamedStoredProcedureQueries.java
new file mode 100644
index 0000000..ac73f5d
--- /dev/null
+++ b/src/javax/persistence/NamedStoredProcedureQueries.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+package javax.persistence; 
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Specifies multiple named stored procedure queries.  Query names
+ * are scoped to the persistence unit.  The <code>NamedStoredProcedureQueries</code> 
+ * annotation can be applied to an entity or mapped superclass.
+ *
+ * @see NamedStoredProcedureQuery
+ *
+ * @since Java Persistence 2.1
+ */
+@Target({TYPE}) 
+@Retention(RUNTIME)
+public @interface NamedStoredProcedureQueries { 
+
+    /** (Required) Array of <code>NamedStoredProcedureQuery</code> annotations. */
+    NamedStoredProcedureQuery[] value ();
+}
diff --git a/src/javax/persistence/NamedStoredProcedureQuery.java b/src/javax/persistence/NamedStoredProcedureQuery.java
new file mode 100644
index 0000000..4170c4e
--- /dev/null
+++ b/src/javax/persistence/NamedStoredProcedureQuery.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+package javax.persistence;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;  
+
+/**
+ * Specifies and names a stored procedure, its parameters, and its result type.
+ *
+ * <p>The <code>NamedStoredProcedureQuery</code> annotation can be applied to an 
+ * entity or mapped superclass.
+ *
+ * <p>The <code>name</code> element is the name that is passed as an argument to the
+ * {@link EntityManager#createNamedStoredProcedureQuery}
+ * method to create an executable <code>StoredProcedureQuery</code> object.
+ * Names are scoped to the persistence unit.
+ *
+ * <p>The <code>procedureName</code> element is the name of the stored procedure in
+ * the database.
+ *
+ * <p>The parameters of the stored procedure are specified by the
+ * <code>parameters</code> element. All parameters must be specified in the order in
+ * which they occur in the parameter list of the stored procedure.
+ *
+ * <p>The <code>resultClasses</code> element refers to the class (or classes) that are
+ * used to map the results. The <code>resultSetMappings</code> element names one or
+ * more result set mappings, as defined by the {@link SqlResultSetMapping}
+ * annotation.
+ *
+ * <p>If there are multiple result sets, it is assumed that they will be
+ * mapped using the same mechanism &#8212; e.g., either all via a set of
+ * result class mappings or all via a set of result set mappings. The
+ * order of the specification of these mappings must be the same as
+ * the order in which the result sets will be returned by the stored
+ * procedure invocation. If the stored procedure returns one or more
+ * result sets and no <code>resultClasses</code> or <code>resultSetMappings</code>
+ * element is specified, any result set will be returned as a list of type
+ * Object[]. The combining of different strategies for the mapping of
+ * stored procedure result sets is undefined.
+ *
+ * <p>The <code>hints</code> element may be used to specify query properties and
+ * hints. Properties defined by this specification must be observed by
+ * the provider. Vendor-specific hints that are not recognized by a
+ * provider must be ignored.
+ *
+ * <p>All parameters of a named stored procedure query must be specified
+ * using the <code>StoredProcedureParameter</code> annotation.
+ *
+ * @see StoredProcedureQuery
+ * @see StoredProcedureParameter
+ *
+ * @since Java Persistence 2.1
+ */
+@Target({TYPE}) 
+@Retention(RUNTIME)
+public @interface NamedStoredProcedureQuery { 
+
+    /**
+     * The name used to refer to the query with the {@link EntityManager} 
+     * methods that create stored procedure query objects.
+     */
+    String name();
+
+    /** The name of the stored procedure in the database. */
+    String procedureName();
+
+    /**
+     *  Information about all parameters of the stored procedure.
+     *  All parameters must be specified in the order in which they
+     *  occur in the parameter list of the stored procedure.
+     */
+    StoredProcedureParameter[] parameters() default {};
+
+    /** The class or classes that are used to map the results. */
+    Class[] resultClasses() default {}; 
+
+    /** The names of one or more result set mappings, as defined in metadata. */
+    String[] resultSetMapping() default {};
+
+    /** Query properties and hints.  (May include vendor-specific query hints.) */
+    QueryHint[] hints() default {};
+
+}
diff --git a/src/javax/persistence/NoResultException.java b/src/javax/persistence/NoResultException.java
index 92cf61f..1907d72 100644
--- a/src/javax/persistence/NoResultException.java
+++ b/src/javax/persistence/NoResultException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/NonUniqueResultException.java b/src/javax/persistence/NonUniqueResultException.java
index ed0c29f..974421a 100644
--- a/src/javax/persistence/NonUniqueResultException.java
+++ b/src/javax/persistence/NonUniqueResultException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/OneToMany.java b/src/javax/persistence/OneToMany.java
index 67937d9..9eebcf5 100644
--- a/src/javax/persistence/OneToMany.java
+++ b/src/javax/persistence/OneToMany.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -24,7 +24,7 @@
 import static javax.persistence.FetchType.LAZY;
 
 /**
- * Defines a many-valued association with one-to-many multiplicity.
+ * Specifies a many-valued association with one-to-many multiplicity.
  * 
  * <p> If the collection is defined using generics to specify the 
  * element type, the associated target entity type need not be 
diff --git a/src/javax/persistence/OneToOne.java b/src/javax/persistence/OneToOne.java
index 3d4d8a8..2118e45 100644
--- a/src/javax/persistence/OneToOne.java
+++ b/src/javax/persistence/OneToOne.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -24,7 +24,7 @@
 import static javax.persistence.FetchType.EAGER;
 
 /**
- * Defines a single-valued association to another entity that has
+ * Specifies a single-valued association to another entity that has
  * one-to-one multiplicity. It is not normally necessary to specify
  * the associated target entity explicitly since it can usually be
  * inferred from the type of the object being referenced.  If the relationship is
diff --git a/src/javax/persistence/OptimisticLockException.java b/src/javax/persistence/OptimisticLockException.java
index cc8c383..177fce4 100644
--- a/src/javax/persistence/OptimisticLockException.java
+++ b/src/javax/persistence/OptimisticLockException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/OrderBy.java b/src/javax/persistence/OrderBy.java
index 0526677..9c69316 100644
--- a/src/javax/persistence/OrderBy.java
+++ b/src/javax/persistence/OrderBy.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/OrderColumn.java b/src/javax/persistence/OrderColumn.java
index 93c93fc..acc606e 100644
--- a/src/javax/persistence/OrderColumn.java
+++ b/src/javax/persistence/OrderColumn.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.lang.annotation.Target;

diff --git a/src/javax/persistence/Parameter.java b/src/javax/persistence/Parameter.java
index 3ee672a..c26ac15 100644
--- a/src/javax/persistence/Parameter.java
+++ b/src/javax/persistence/Parameter.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/ParameterMode.java b/src/javax/persistence/ParameterMode.java
new file mode 100644
index 0000000..01ec6d2
--- /dev/null
+++ b/src/javax/persistence/ParameterMode.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+package javax.persistence; 
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Specifies the mode of a parameter of a stored procedure query.
+ *
+ * @see StoredProcedureQuery
+ * @see StoredProcedureParameter
+ *
+ * @since Java Persistence 2.1
+ */
+public enum ParameterMode {
+
+    /**
+     *  Stored procedure input parameter
+     */
+    IN,
+
+    /**
+     *  Stored procedure input/output parameter
+     */
+    INOUT,
+
+    /**
+     *  Stored procedure output parameter
+     */
+    OUT,
+
+    /**
+     *  Stored procedure reference cursor parameter.   Some databases use
+     *  REF_CURSOR parameters to return result sets from stored procedures.
+     */
+    REF_CURSOR,
+
+}
diff --git a/src/javax/persistence/Persistence.java b/src/javax/persistence/Persistence.java
index fe74c04..7d482ad 100644
--- a/src/javax/persistence/Persistence.java
+++ b/src/javax/persistence/Persistence.java
@@ -1,19 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems, Oracle Corporation. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
- *     Oracle committers - EclipseLink implementation of Persistence and PersistenceUtil 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.util.List;
diff --git a/src/javax/persistence/PersistenceContext.java b/src/javax/persistence/PersistenceContext.java
index de015ce..b511ae0 100644
--- a/src/javax/persistence/PersistenceContext.java
+++ b/src/javax/persistence/PersistenceContext.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -53,6 +53,16 @@
     PersistenceContextType type() default PersistenceContextType.TRANSACTION;
 
     /**
+     * (Optional) Specifies whether the persistence context is always
+     * automatically synchronized with the current transaction or whether
+     * the persistence context must be explicitly joined to the current
+     * transaction by means of the EntityManager 
+     * {@link EntityManager#joinTransaction <code>joinTransaction</code>} method.
+     * @since Java Persistence 2.1
+     */
+    SynchronizationType synchronization() default SynchronizationType.SYNCHRONIZED;
+
+    /**
      * (Optional) Properties for the container or persistence
      * provider.  Vendor specific properties may be included in this
      * set of properties.  Properties that are not recognized by
diff --git a/src/javax/persistence/PersistenceContextType.java b/src/javax/persistence/PersistenceContextType.java
index 9826969..ce7ea53 100644
--- a/src/javax/persistence/PersistenceContextType.java
+++ b/src/javax/persistence/PersistenceContextType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/PersistenceContexts.java b/src/javax/persistence/PersistenceContexts.java
index 47edbb2..b73ca78 100644
--- a/src/javax/persistence/PersistenceContexts.java
+++ b/src/javax/persistence/PersistenceContexts.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/PersistenceException.java b/src/javax/persistence/PersistenceException.java
index 895d1a2..8948523 100644
--- a/src/javax/persistence/PersistenceException.java
+++ b/src/javax/persistence/PersistenceException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 
@@ -21,7 +21,8 @@
  * All instances of <code>PersistenceException</code> except for instances of 
  * {@link NoResultException}, {@link NonUniqueResultException},
  * {@link LockTimeoutException}, and {@link QueryTimeoutException} will cause 
- * the current transaction, if one is active, to be marked for rollback.
+ * the current transaction, if one is active and the persistence context has
+ * been joined to it, to be marked for rollback.
  *
  * @since Java Persistence 1.0
  */
diff --git a/src/javax/persistence/PersistenceProperty.java b/src/javax/persistence/PersistenceProperty.java
index 694be1d..c296de7 100644
--- a/src/javax/persistence/PersistenceProperty.java
+++ b/src/javax/persistence/PersistenceProperty.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/PersistenceUnit.java b/src/javax/persistence/PersistenceUnit.java
index 7593cc0..cc209e0 100644
--- a/src/javax/persistence/PersistenceUnit.java
+++ b/src/javax/persistence/PersistenceUnit.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/PersistenceUnitUtil.java b/src/javax/persistence/PersistenceUnitUtil.java
index 61109a7..48b1700 100644
--- a/src/javax/persistence/PersistenceUnitUtil.java
+++ b/src/javax/persistence/PersistenceUnitUtil.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/PersistenceUnits.java b/src/javax/persistence/PersistenceUnits.java
index 8727f99..5525e0d 100644
--- a/src/javax/persistence/PersistenceUnits.java
+++ b/src/javax/persistence/PersistenceUnits.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/PersistenceUtil.java b/src/javax/persistence/PersistenceUtil.java
index e695566..3444ca2 100644
--- a/src/javax/persistence/PersistenceUtil.java
+++ b/src/javax/persistence/PersistenceUtil.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/PessimisticLockException.java b/src/javax/persistence/PessimisticLockException.java
index 6aaa5a7..9cd75f4 100644
--- a/src/javax/persistence/PessimisticLockException.java
+++ b/src/javax/persistence/PessimisticLockException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/PessimisticLockScope.java b/src/javax/persistence/PessimisticLockScope.java
index 08593e5..341af26 100644
--- a/src/javax/persistence/PessimisticLockScope.java
+++ b/src/javax/persistence/PessimisticLockScope.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/PostLoad.java b/src/javax/persistence/PostLoad.java
index 3323a96..7e65f00 100644
--- a/src/javax/persistence/PostLoad.java
+++ b/src/javax/persistence/PostLoad.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify callback methods for the corresponding 
+ * Specifies a callback method for the corresponding 
  * lifecycle event. This annotation may be applied to methods 
  * of an entity class, a mapped superclass, or a callback 
  * listener class.
diff --git a/src/javax/persistence/PostPersist.java b/src/javax/persistence/PostPersist.java
index 07e15d7..4882f89 100644
--- a/src/javax/persistence/PostPersist.java
+++ b/src/javax/persistence/PostPersist.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify callback methods for the corresponding 
+ * Specifies a callback method for the corresponding 
  * lifecycle event. This annotation may be applied to methods 
  * of an entity class, a mapped superclass, or a callback 
  * listener class.
diff --git a/src/javax/persistence/PostRemove.java b/src/javax/persistence/PostRemove.java
index 7790558..4238c58 100644
--- a/src/javax/persistence/PostRemove.java
+++ b/src/javax/persistence/PostRemove.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify callback methods for the corresponding 
+ * Specifies a callback method for the corresponding 
  * lifecycle event. This annotation may be applied to methods 
  * of an entity class, a mapped superclass, or a callback 
  * listener class.
diff --git a/src/javax/persistence/PostUpdate.java b/src/javax/persistence/PostUpdate.java
index 4c6f02b..d9437f6 100644
--- a/src/javax/persistence/PostUpdate.java
+++ b/src/javax/persistence/PostUpdate.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify callback methods for the corresponding 
+ * Specifies a callback method for the corresponding 
  * lifecycle event. This annotation may be applied to methods 
  * of an entity class, a mapped superclass, or a callback 
  * listener class.
diff --git a/src/javax/persistence/PrePersist.java b/src/javax/persistence/PrePersist.java
index 6b12226..0331742 100644
--- a/src/javax/persistence/PrePersist.java
+++ b/src/javax/persistence/PrePersist.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify callback methods for the corresponding 
+ * Specifies a callback method for the corresponding 
  * lifecycle event. This annotation may be applied to methods 
  * of an entity class, a mapped superclass, or a callback 
  * listener class.
diff --git a/src/javax/persistence/PreRemove.java b/src/javax/persistence/PreRemove.java
index b6e1a0c..352cbc2 100644
--- a/src/javax/persistence/PreRemove.java
+++ b/src/javax/persistence/PreRemove.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify callback methods for the corresponding 
+ * Specifies a callback method for the corresponding 
  * lifecycle event. This annotation may be applied to methods 
  * of an entity class, a mapped superclass, or a callback 
  * listener class.
diff --git a/src/javax/persistence/PreUpdate.java b/src/javax/persistence/PreUpdate.java
index 10cd431..45bd362 100644
--- a/src/javax/persistence/PreUpdate.java
+++ b/src/javax/persistence/PreUpdate.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -21,7 +21,7 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Is used to specify callback methods for the corresponding 
+ * Specifies a callback method for the corresponding 
  * lifecycle event. This annotation may be applied to methods 
  * of an entity class, a mapped superclass, or a callback 
  * listener class.
diff --git a/src/javax/persistence/PrimaryKeyJoinColumn.java b/src/javax/persistence/PrimaryKeyJoinColumn.java
index e154370..c54d1f0 100644
--- a/src/javax/persistence/PrimaryKeyJoinColumn.java
+++ b/src/javax/persistence/PrimaryKeyJoinColumn.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/PrimaryKeyJoinColumns.java b/src/javax/persistence/PrimaryKeyJoinColumns.java
index b080751..56c5c1e 100644
--- a/src/javax/persistence/PrimaryKeyJoinColumns.java
+++ b/src/javax/persistence/PrimaryKeyJoinColumns.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/Query.java b/src/javax/persistence/Query.java
index e1ab528..4b20dcd 100644
--- a/src/javax/persistence/Query.java
+++ b/src/javax/persistence/Query.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.util.Calendar;
@@ -25,6 +25,7 @@
  * Interface used to control query execution.
  *
  * @see TypedQuery
+ * @see StoredProcedureQuery
  * @see Parameter
  *
  * @since Java Persistence 1.0
@@ -40,8 +41,9 @@
      * @throws QueryTimeoutException if the query execution exceeds
      *         the query timeout value set and only the statement is
      *         rolled back
-     * @throws TransactionRequiredException if a lock mode has
-     *         been set and there is no transaction
+     * @throws TransactionRequiredException if a lock mode other than
+     *         <code>NONE</code> has been set and there is no transaction
+     *         or the persistence context has not been joined to the transaction
      * @throws PessimisticLockException if pessimistic locking
      *         fails and the transaction is rolled back
      * @throws LockTimeoutException if pessimistic locking
@@ -62,8 +64,9 @@
      * @throws QueryTimeoutException if the query execution exceeds
      *         the query timeout value set and only the statement is
      *         rolled back
-     * @throws TransactionRequiredException if a lock mode has
-     *         been set and there is no transaction
+     * @throws TransactionRequiredException if a lock mode other than
+     *         <code>NONE</code> has been set and there is no transaction
+     *         or the persistence context has not been joined to the transaction
      * @throws PessimisticLockException if pessimistic locking
      *         fails and the transaction is rolled back
      * @throws LockTimeoutException if pessimistic locking
@@ -81,7 +84,8 @@
      *         Persistence query language SELECT statement or for
      *         a criteria query
      * @throws TransactionRequiredException if there is 
-     *         no transaction
+     *         no transaction or the persistence context has not
+     *         been joined to the transaction
      * @throws QueryTimeoutException if the statement execution 
      *         exceeds the query timeout value set and only 
      *         the statement is rolled back
@@ -190,7 +194,7 @@
                        TemporalType temporalType);
 
     /**
-     * Bind an argument to a named parameter.
+     * Bind an argument value to a named parameter.
      * @param name  parameter name
      * @param value  parameter value
      * @return the same query instance
@@ -227,7 +231,7 @@
                        TemporalType temporalType);
 
     /**
-     * Bind an argument to a positional parameter.
+     * Bind an argument value to a positional parameter.
      * @param position  position
      * @param value  parameter value
      * @return the same query instance
@@ -355,7 +359,8 @@
     boolean isBound(Parameter<?> param);
 
     /**
-     * Return the value bound to the parameter.
+     * Return the input value bound to the parameter.
+     * (Note that OUT parameters are unbound.)
      * @param param parameter object
      * @return parameter value
      * @throws IllegalArgumentException if the parameter is not 
@@ -367,7 +372,8 @@
     <T> T getParameterValue(Parameter<T> param);
 
     /**
-     * Return the value bound to the named parameter.
+     * Return the input value bound to the named parameter.
+     * (Note that OUT parameters are unbound.)
      * @param name  parameter name
      * @return parameter value
      * @throws IllegalStateException if the parameter has not been
@@ -379,7 +385,8 @@
     Object getParameterValue(String name);
 
     /**
-     * Return the value bound to the positional parameter.
+     * Return the input value bound to the positional parameter.
+     * (Note that OUT parameters are unbound.)
      * @param position  position
      * @return parameter value
      * @throws IllegalStateException if the parameter has not been
@@ -420,7 +427,8 @@
     Query setLockMode(LockModeType lockMode);
 
     /**
-     * Get the current lock mode for the query.
+     * Get the current lock mode for the query.  Returns null if a lock
+     * mode has not been set on the query object.
      * @return lock mode
      * @throws IllegalStateException if the query is found not to be
      *         a Java Persistence query language SELECT query or
diff --git a/src/javax/persistence/QueryHint.java b/src/javax/persistence/QueryHint.java
index 7708918..d3b425d 100644
--- a/src/javax/persistence/QueryHint.java
+++ b/src/javax/persistence/QueryHint.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/QueryTimeoutException.java b/src/javax/persistence/QueryTimeoutException.java
index a1f8e5d..20127bf 100644
--- a/src/javax/persistence/QueryTimeoutException.java
+++ b/src/javax/persistence/QueryTimeoutException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/RollbackException.java b/src/javax/persistence/RollbackException.java
index bcbae1d..d0821b5 100644
--- a/src/javax/persistence/RollbackException.java
+++ b/src/javax/persistence/RollbackException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 /**
  * Thrown by the persistence provider when 
diff --git a/src/javax/persistence/SecondaryTable.java b/src/javax/persistence/SecondaryTable.java
index 3a2adfc..8545c80 100644
--- a/src/javax/persistence/SecondaryTable.java
+++ b/src/javax/persistence/SecondaryTable.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/SecondaryTables.java b/src/javax/persistence/SecondaryTables.java
index 453240a..05c221c 100644
--- a/src/javax/persistence/SecondaryTables.java
+++ b/src/javax/persistence/SecondaryTables.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/SequenceGenerator.java b/src/javax/persistence/SequenceGenerator.java
index 62f381c..57e8ddc 100644
--- a/src/javax/persistence/SequenceGenerator.java
+++ b/src/javax/persistence/SequenceGenerator.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/SharedCacheMode.java b/src/javax/persistence/SharedCacheMode.java
index 79ff377..146a207 100644
--- a/src/javax/persistence/SharedCacheMode.java
+++ b/src/javax/persistence/SharedCacheMode.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/SqlResultSetMapping.java b/src/javax/persistence/SqlResultSetMapping.java
index 1dbf87b..68f53b0 100644
--- a/src/javax/persistence/SqlResultSetMapping.java
+++ b/src/javax/persistence/SqlResultSetMapping.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
@@ -61,6 +61,12 @@
     /** Specifies the result set mapping to entities. */
     EntityResult[] entities() default {};
 
+    /** 
+     * Specifies the result set mapping to constructors. 
+     * @since Java Persistence 2.1
+     */
+    ConstructorResult[] classes() default {};
+
     /** Specifies the result set mapping to scalar values. */
     ColumnResult[] columns() default {};
 }
diff --git a/src/javax/persistence/SqlResultSetMappings.java b/src/javax/persistence/SqlResultSetMappings.java
index 2d5c56b..da75bac 100644
--- a/src/javax/persistence/SqlResultSetMappings.java
+++ b/src/javax/persistence/SqlResultSetMappings.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/StoredProcedureParameter.java b/src/javax/persistence/StoredProcedureParameter.java
new file mode 100644
index 0000000..1477f10
--- /dev/null
+++ b/src/javax/persistence/StoredProcedureParameter.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+package javax.persistence; 
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Specifies a parameter of a named stored procedure query.  All
+ * parameters of a named stored procedure query must be specified.
+ *
+ * @see NamedStoredProcedureQuery
+ * @see ParameterMode 
+ *
+ * @since Java Persistence 2.1
+ */
+@Target({}) 
+@Retention(RUNTIME)
+public @interface StoredProcedureParameter { 
+
+    /** 
+     *  The name of the parameter as defined by the stored procedure in the database.
+     *  If a name is not specified, it is assumed that the stored procedure uses
+     *  positional parameters.
+     */
+    String name() default "";
+
+    /**
+     *  Specifies whether the parameter is an IN, INOUT, OUT, or REF_CURSOR parameter.
+     *  REF_CURSOR parameters are used by some databases to return result sets from
+     *  a stored procedure.
+     */
+    ParameterMode mode() default ParameterMode.IN;
+
+    /** JDBC type of the paramter. */
+    Class type();
+
+}
diff --git a/src/javax/persistence/StoredProcedureQuery.java b/src/javax/persistence/StoredProcedureQuery.java
new file mode 100644
index 0000000..187ee49
--- /dev/null
+++ b/src/javax/persistence/StoredProcedureQuery.java
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+package javax.persistence;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * Interface used to control stored procedure query execution.
+ *
+ * @see Query
+ * @see Parameter
+ *
+ * @since Java Persistence 2.1
+ */
+public interface StoredProcedureQuery extends Query {
+
+    /**
+     * Set a query property or hint. The hints elements may be used 
+     * to specify query properties and hints. Properties defined by
+     * this specification must be observed by the provider. 
+     * Vendor-specific hints that are not recognized by a provider
+     * must be silently ignored. Portable applications should not
+     * rely on the standard timeout hint. Depending on the database
+     * in use, this hint may or may not be observed.
+     * @param hintName  name of the property or hint
+     * @param value  value for the property or hint
+     * @return the same query instance
+     * @throws IllegalArgumentException if the second argument is not
+     *         valid for the implementation
+     */
+    StoredProcedureQuery setHint(String hintName, Object value);
+
+    /**
+     * Bind the value of a <code>Parameter</code> object.
+     * @param param  parameter object
+     * @param value  parameter value
+     * @return the same query instance
+     * @throws IllegalArgumentException if the parameter does not
+     *         correspond to a parameter of the query
+     */
+    <T> StoredProcedureQuery setParameter(Parameter<T> param, 
+                                          T value);
+
+    /**
+     * Bind an instance of <code>java.util.Calendar</code> to a <code>Parameter</code> object.
+     * @param param parameter object
+     * @param value  parameter value
+     * @param temporalType  temporal type
+     * @return the same query instance
+     * @throws IllegalArgumentException if the parameter does not
+     *         correspond to a parameter of the query
+     */
+    StoredProcedureQuery setParameter(Parameter<Calendar> param,
+                                      Calendar value, 
+                                      TemporalType temporalType);
+
+    /**
+     * Bind an instance of <code>java.util.Date</code> to a <code>Parameter</code> object.
+     * @param param parameter object
+     * @param value  parameter value
+     * @param temporalType  temporal type
+     * @return the same query instance
+     * @throws IllegalArgumentException if the parameter does not
+     *         correspond to a parameter of the query
+     */
+    StoredProcedureQuery setParameter(Parameter<Date> param, 
+                                      Date value, 
+                                      TemporalType temporalType);
+
+    /**
+     * Bind an argument value to a named parameter.
+     * @param name  parameter name
+     * @param value  parameter value
+     * @return the same query instance
+     * @throws IllegalArgumentException if the parameter name does 
+     *         not correspond to a parameter of the query or if the
+     *         argument is of incorrect type
+     */
+    StoredProcedureQuery setParameter(String name, Object value);
+
+    /**
+     * Bind an instance of <code>java.util.Calendar</code> to a named parameter.
+     * @param name  parameter name
+     * @param value  parameter value
+     * @param temporalType  temporal type
+     * @return the same query instance
+     * @throws IllegalArgumentException if the parameter name does 
+     *         not correspond to a parameter of the query or if the
+     *         value argument is of incorrect type
+     */
+    StoredProcedureQuery setParameter(String name, 
+                                      Calendar value, 
+                                      TemporalType temporalType);
+
+    /**
+     * Bind an instance of <code>java.util.Date</code> to a named parameter.
+     * @param name  parameter name
+     * @param value  parameter value
+     * @param temporalType  temporal type
+     * @return the same query instance
+     * @throws IllegalArgumentException if the parameter name does 
+     *         not correspond to a parameter of the query or if the
+     *         value argument is of incorrect type
+     */
+    StoredProcedureQuery setParameter(String name, 
+                                      Date value, 
+                                      TemporalType temporalType);
+
+    /**
+     * Bind an argument value to a positional parameter.
+     * @param position  position
+     * @param value  parameter value
+     * @return the same query instance
+     * @throws IllegalArgumentException if position does not
+     *         correspond to a positional parameter of the query
+     *         or if the argument is of incorrect type
+     */
+    StoredProcedureQuery setParameter(int position, Object value);
+
+    /**
+     * Bind an instance of <code>java.util.Calendar</code> to a positional
+     * parameter.
+     * @param position  position
+     * @param value  parameter value
+     * @param temporalType  temporal type
+     * @return the same query instance
+     * @throws IllegalArgumentException if position does not
+     *         correspond to a positional parameter of the query or
+     *         if the value argument is of incorrect type
+     */
+    StoredProcedureQuery setParameter(int position, 
+                                      Calendar value,  
+                                      TemporalType temporalType);
+
+    /**
+     * Bind an instance of <code>java.util.Date</code> to a positional parameter.
+     * @param position  position
+     * @param value  parameter value
+     * @param temporalType  temporal type
+     * @return the same query instance
+     * @throws IllegalArgumentException if position does not
+     *         correspond to a positional parameter of the query or
+     *         if the value argument is of incorrect type
+     */
+    StoredProcedureQuery setParameter(int position, 
+                                      Date value,  
+                                      TemporalType temporalType);
+
+    /**
+     * Set the flush mode type to be used for the query execution.
+     * The flush mode type applies to the query regardless of the
+     * flush mode type in use for the entity manager.
+     * @param flushMode  flush mode
+     * @return the same query instance
+     */
+    StoredProcedureQuery setFlushMode(FlushModeType flushMode);
+
+    /**
+     * Register a positional parameter.
+     * All parameters must be registered.
+     * @param position  parameter position
+     * @param type  type of the parameter
+     * @param mode  parameter mode 
+     * @return the same query instance
+     */
+    StoredProcedureQuery registerStoredProcedureParameter(
+	  int position,
+	  Class type,
+	  ParameterMode mode);
+
+    /**
+     * Register a named parameter.
+     * When using parameter names, all parameters must be registered
+     * in the order in which they occur in the parameter list of the 
+     * stored procedure.
+     * @param parameterName  name of the parameter as registered or
+     *             specified in metadata
+     * @param type  type of the parameter
+     * @param mode  parameter mode 
+     * @return the same query instance
+     */
+    StoredProcedureQuery registerStoredProcedureParameter(
+	  String parameterName,
+	  Class type,
+	  ParameterMode mode);
+
+    /**
+     *  Retrieve a value passed back from the procedure
+     *  through an INOUT or OUT parameter.
+     *  For portability, all results corresponding to result sets
+     *  and update counts must be retrieved before the values of 
+     *  output parameters.
+     *  @param position  parameter position
+     *  @return the result that is passed back through the parameter
+     *  @throws IllegalArgumentException if the position does
+     *          not correspond to a parameter of the query or is
+     *          not an INOUT or OUT parameter
+     */
+    Object getOutputParameterValue(int position);
+
+    /**
+     *  Retrieve a value passed back from the procedure
+     *  through an INOUT or OUT parameter.
+     *  For portability, all results corresponding to result sets
+     *  and update counts must be retrieved before the values of 
+     *  output parameters.
+     *  @param parameterName  name of the parameter as registered or
+     *              specified in metadata
+     *  @return the result that is passed back through the parameter
+     *  @throws IllegalArgumentException if the parameter name does
+     *          not correspond to a parameter of the query or is
+     *          not an INOUT or OUT parameter
+     */
+    Object getOutputParameterValue(String parameterName);
+
+    /**
+     * Return true if the first result corresponds to a result set,
+     * and false if it is an update count or if there are no results
+     * other than through INOUT and OUT parameters, if any.
+     * @return  true if first result corresponds to result set
+     * @throws QueryTimeoutException if the query execution exceeds
+     *         the query timeout value set and only the statement is
+     *         rolled back
+     * @throws PersistenceException if the query execution exceeds 
+     *         the query timeout value set and the transaction 
+     *         is rolled back 
+     */
+    boolean execute();
+
+    /**
+     * Return true if the next result corresponds to a result set,
+     * and false if it is an update count or if there are no results
+     * other than through INOUT and OUT parameters, if any.
+     * @return  true if next result corresponds to result set
+     * @throws QueryTimeoutException if the query execution exceeds
+     *         the query timeout value set and only the statement is
+     *         rolled back
+     * @throws PersistenceException if the query execution exceeds 
+     *         the query timeout value set and the transaction 
+     *         is rolled back 
+     */
+    boolean hasMoreResults();
+
+    /**
+     * Return the update count or  -1 if there is no pending result
+     * or if the next result is not an update count.
+     * @return  update count or -1 if there is no pending result or if
+     *          the next result is not an update count
+     * @throws QueryTimeoutException if the query execution exceeds
+     *         the query timeout value set and only the statement is
+     *         rolled back
+     * @throws PersistenceException if the query execution exceeds 
+     *         the query timeout value set and the transaction 
+     *         is rolled back 
+     */
+    int getUpdateCount();
+
+}
diff --git a/src/javax/persistence/SynchronizationType.java b/src/javax/persistence/SynchronizationType.java
new file mode 100644
index 0000000..04a12d8
--- /dev/null
+++ b/src/javax/persistence/SynchronizationType.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
+package javax.persistence;
+
+/**
+ * Specifies whether the persistence context is always automatically 
+ * synchronized with the current transaction or whether the persistence context
+ * must be explicitly joined to the current transaction by means of the
+ * {@link EntityManager#joinTransaction} method.
+ *
+ * @since Java Persistence 2.1
+ */
+public enum SynchronizationType {
+
+    /** Persistence context is automatically synchronized with the current transaction */
+    SYNCHRONIZED,
+
+    /** Persistence context must be explicitly joined to the current transaction */
+    UNSYNCHRONIZED,
+}
diff --git a/src/javax/persistence/Table.java b/src/javax/persistence/Table.java
index 45e8963..e08ba2e 100644
--- a/src/javax/persistence/Table.java
+++ b/src/javax/persistence/Table.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/TableGenerator.java b/src/javax/persistence/TableGenerator.java
index a3d8b9e..c93cb1b 100644
--- a/src/javax/persistence/TableGenerator.java
+++ b/src/javax/persistence/TableGenerator.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/Temporal.java b/src/javax/persistence/Temporal.java
index 153ff31..1d54ace 100644
--- a/src/javax/persistence/Temporal.java
+++ b/src/javax/persistence/Temporal.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/TemporalType.java b/src/javax/persistence/TemporalType.java
index 0c54caf..f5a41ed 100644
--- a/src/javax/persistence/TemporalType.java
+++ b/src/javax/persistence/TemporalType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/TransactionRequiredException.java b/src/javax/persistence/TransactionRequiredException.java
index 359451c..35692ae 100644
--- a/src/javax/persistence/TransactionRequiredException.java
+++ b/src/javax/persistence/TransactionRequiredException.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 /**
diff --git a/src/javax/persistence/Transient.java b/src/javax/persistence/Transient.java
index 2c575fe..d275b6f 100644
--- a/src/javax/persistence/Transient.java
+++ b/src/javax/persistence/Transient.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/Tuple.java b/src/javax/persistence/Tuple.java
index 3c484d5..ff902cd 100644
--- a/src/javax/persistence/Tuple.java
+++ b/src/javax/persistence/Tuple.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.util.List;
diff --git a/src/javax/persistence/TupleElement.java b/src/javax/persistence/TupleElement.java
index dfb4451..0fde26b 100644
--- a/src/javax/persistence/TupleElement.java
+++ b/src/javax/persistence/TupleElement.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 /**

diff --git a/src/javax/persistence/TypedQuery.java b/src/javax/persistence/TypedQuery.java
index b08d8fd..fe9ae2b 100644
--- a/src/javax/persistence/TypedQuery.java
+++ b/src/javax/persistence/TypedQuery.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence;

 

 import java.util.List;

@@ -39,8 +39,10 @@
      * @throws QueryTimeoutException if the query execution exceeds

      *         the query timeout value set and only the statement is

      *         rolled back

-     * @throws TransactionRequiredException if a lock mode has

-     *         been set and there is no transaction

+     * @throws TransactionRequiredException if a lock mode other than

+     *         <code>NONE</code> has been set and there is no transaction

+     *         or the persistence context has not been joined to the

+     *         transaction

      * @throws PessimisticLockException if pessimistic locking

      *         fails and the transaction is rolled back

      * @throws LockTimeoutException if pessimistic locking

@@ -61,8 +63,10 @@
      * @throws QueryTimeoutException if the query execution exceeds

      *         the query timeout value set and only the statement is

      *         rolled back

-     * @throws TransactionRequiredException if a lock mode has

-     *         been set and there is no transaction

+     * @throws TransactionRequiredException if a lock mode other than

+     *         <code>NONE</code> has been set and there is no transaction

+     *         or the persistence context has not been joined to the

+     *         transaction

      * @throws PessimisticLockException if pessimistic locking

      *         fails and the transaction is rolled back

      * @throws LockTimeoutException if pessimistic locking

@@ -144,7 +148,7 @@
                                TemporalType temporalType);

 

     /**

-     * Bind an argument to a named parameter.

+     * Bind an argument value to a named parameter.

      * @param name  parameter name

      * @param value  parameter value

      * @return the same query instance

@@ -181,7 +185,7 @@
                                TemporalType temporalType);

 

     /**

-     * Bind an argument to a positional parameter.

+     * Bind an argument value to a positional parameter.

      * @param position  position

      * @param value  parameter value

      * @return the same query instance

diff --git a/src/javax/persistence/UniqueConstraint.java b/src/javax/persistence/UniqueConstraint.java
index b3ec805..a847f13 100644
--- a/src/javax/persistence/UniqueConstraint.java
+++ b/src/javax/persistence/UniqueConstraint.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence;
 
 import java.lang.annotation.Target;
diff --git a/src/javax/persistence/ValidationMode.java b/src/javax/persistence/ValidationMode.java
index bdef0fb..5834cfb 100644
--- a/src/javax/persistence/ValidationMode.java
+++ b/src/javax/persistence/ValidationMode.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence;

diff --git a/src/javax/persistence/Version.java b/src/javax/persistence/Version.java
index 738ff90..36fa1cf 100644
--- a/src/javax/persistence/Version.java
+++ b/src/javax/persistence/Version.java
@@ -1,16 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
+ * and the Eclipse Distribution License is available at
  * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
+ *
  * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
  *
  ******************************************************************************/
 package javax.persistence;
diff --git a/src/javax/persistence/criteria/AbstractQuery.java b/src/javax/persistence/criteria/AbstractQuery.java
index c3d5e7a..7f5390e 100644
--- a/src/javax/persistence/criteria/AbstractQuery.java
+++ b/src/javax/persistence/criteria/AbstractQuery.java
@@ -1,25 +1,23 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.List;

 import java.util.Set;

 

-import javax.persistence.metamodel.EntityType;

-

 /**

  * The <code>AbstractQuery</code> interface defines functionality that is common

  * to both top-level queries and subqueries.

@@ -34,24 +32,7 @@
  *

  * @since Java Persistence 2.0

  */

-public interface AbstractQuery<T> {

-

-    /**

-     * Create and add a query root corresponding to the given entity,

-     * forming a cartesian product with any existing roots.

-     * @param entityClass  the entity class

-     * @return query root corresponding to the given entity

-     */

-    <X> Root<X> from(Class<X> entityClass);

-

-    /**

-     * Create and add a query root corresponding to the given entity,

-     * forming a cartesian product with any existing roots.

-     * @param entity  metamodel entity representing the entity

-     *                of type X

-     * @return query root corresponding to the given entity

-     */

-    <X> Root<X> from(EntityType<X> entity);

+public interface AbstractQuery<T> extends CommonAbstractQuery {

 

     /**

      * Modify the query to restrict the query results according

@@ -129,13 +110,6 @@
     AbstractQuery<T> distinct(boolean distinct);

 

     /**

-     * Create a subquery of the query. 

-     * @param type  the subquery result type

-     * @return subquery 

-     */

-    <U> Subquery<U> subquery(Class<U> type);

-

-    /**

      * Return the query roots.  These are the roots that have

      * been defined for the <code>CriteriaQuery</code> or <code>Subquery</code> itself,

      * including any subquery roots defined as a result of

@@ -153,14 +127,6 @@
     Selection<T> getSelection();

 

     /**

-     * Return the predicate that corresponds to the where clause

-     * restriction(s), or null if no restrictions have been

-     * specified.

-     * @return where clause predicate

-     */

-    Predicate getRestriction();

- 

-    /**

      * Return a list of the grouping expressions.  Returns empty

      * list if no grouping expressions have been specified.

      * Modifications to the list do not affect the query.

diff --git a/src/javax/persistence/criteria/CollectionJoin.java b/src/javax/persistence/criteria/CollectionJoin.java
index 84ab866..2eead57 100644
--- a/src/javax/persistence/criteria/CollectionJoin.java
+++ b/src/javax/persistence/criteria/CollectionJoin.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.Collection;

@@ -32,6 +32,26 @@
 		extends PluralJoin<Z, Collection<E>, E> {

 

     /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restriction  a simple or compound boolean expression

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    CollectionJoin<Z, E> on(Expression<Boolean> restriction);

+

+    /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restrictions  zero or more restriction predicates

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    CollectionJoin<Z, E> on(Predicate... restrictions);

+

+    /**

      * Return the metamodel representation for the collection

      * attribute.

      * @return metamodel type representing the <code>Collection</code> that is

diff --git a/src/javax/persistence/criteria/CommonAbstractQuery.java b/src/javax/persistence/criteria/CommonAbstractQuery.java
new file mode 100644
index 0000000..9102b4c
--- /dev/null
+++ b/src/javax/persistence/criteria/CommonAbstractQuery.java
@@ -0,0 +1,91 @@
+/*******************************************************************************

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

+package javax.persistence.criteria;

+

+import javax.persistence.metamodel.EntityType;

+

+/**

+ * The <code>CommonAbstractQuery</code> interface defines functionality that is 

+ * common to both top-level queries and subqueries as well as to update and

+ * delete criteria operations.

+ * It is not intended to be used directly in query construction.

+ *

+ * <p> All queries must have:

+ *         a set of root entities (which may in turn own joins).

+ * <p> All queries may have:

+ *         a conjunction of restrictions.

+ *

+ * <p> Note that criteria queries and criteria update and delete operations

+ * are typed differently.

+ * Criteria queries are typed according to the query result type.

+ * Update and delete operations are typed according to the target of the

+ * update or delete.

+ *

+ * @since Java Persistence 2.1

+ */

+public interface CommonAbstractQuery {

+

+    /**

+     * Create and add a query root corresponding to the given entity.

+     * @param entityClass  the entity class

+     * @return query root corresponding to the given entity

+     */

+    <X> Root<X> from(Class<X> entityClass);

+

+    /**

+     * Create and add a query root corresponding to the given entity,

+     * @param entity  metamodel entity representing the entity

+     *                of type X

+     * @return query root corresponding to the given entity

+     */

+    <X> Root<X> from(EntityType<X> entity);

+

+    /**

+     * Modify the query to restrict the query results according

+     * to the specified boolean expression.

+     * Replaces the previously added restriction(s), if any.

+     * @param restriction  a simple or compound boolean expression

+     * @return the modified query

+     */    

+    CommonAbstractQuery where(Expression<Boolean> restriction);

+

+    /**

+     * Modify the query to restrict the query results according 

+     * to the conjunction of the specified restriction predicates.

+     * Replaces the previously added restriction(s), if any.

+     * If no restrictions are specified, any previously added

+     * restrictions are simply removed.

+     * @param restrictions  zero or more restriction predicates

+     * @return the modified query

+     */

+    CommonAbstractQuery where(Predicate... restrictions);

+

+    /**

+     * Create a subquery of the query. 

+     * @param type  the subquery result type

+     * @return subquery 

+     */

+    <U> Subquery<U> subquery(Class<U> type);

+

+    /**

+     * Return the predicate that corresponds to the where clause

+     * restriction(s), or null if no restrictions have been

+     * specified.

+     * @return where clause predicate

+     */

+    Predicate getRestriction();

+ 

+}

diff --git a/src/javax/persistence/criteria/CompoundSelection.java b/src/javax/persistence/criteria/CompoundSelection.java
index 3a5b626..3257011 100644
--- a/src/javax/persistence/criteria/CompoundSelection.java
+++ b/src/javax/persistence/criteria/CompoundSelection.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence.criteria;
 
 /**
diff --git a/src/javax/persistence/criteria/CriteriaBuilder.java b/src/javax/persistence/criteria/CriteriaBuilder.java
index f1603cc..8c27bd1 100644
--- a/src/javax/persistence/criteria/CriteriaBuilder.java
+++ b/src/javax/persistence/criteria/CriteriaBuilder.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.math.BigDecimal;

@@ -55,6 +55,24 @@
      */

     CriteriaQuery<Tuple> createTupleQuery();

 

+    // methods to construct queries for bulk updates and deletes:

+

+    /**

+     *  Create a <code>CriteriaUpdate</code> query object to perform a bulk update operation.

+     *  @param targetEntity  target type for update operation

+     *  @return the query object

+     *  @since Java Persistence 2.1

+     */

+    <T> CriteriaUpdate<T> createCriteriaUpdate(Class<T> targetEntity);

+

+    /**

+     *  Create a <code>CriteriaDelete</code> query object to perform a bulk delete operation.

+     *  @param targetEntity  target type for delete operation

+     *  @return the query object

+     *  @since Java Persistence 2.1

+     */

+    <T> CriteriaDelete<T> createCriteriaDelete(Class<T> targetEntity);

+

 

     // selection construction methods:

 	

@@ -1440,6 +1458,73 @@
    <T> Expression<T> function(String name, Class<T> type,

 Expression<?>... args);

 

+

+    // methods for downcasting:

+

+    /**

+     *  Downcast Join object to the specified type.

+     *  @param join  Join object

+     *  @param type type to be downcast to

+     *  @return  Join object of the specified type

+     *  @since Java Persistence 2.1

+     */

+    <X, T, V extends T> Join<X, V> treat(Join<X, T> join, Class<V> type);

+

+    /**

+     *  Downcast CollectionJoin object to the specified type.

+     *  @param join  CollectionJoin object

+     *  @param type type to be downcast to

+     *  @return  CollectionJoin object of the specified type

+     *  @since Java Persistence 2.1

+     */

+    <X, T, E extends T> CollectionJoin<X, E> treat(CollectionJoin<X, T> join, Class<E> type);

+

+    /**

+     *  Downcast SetJoin object to the specified type.

+     *  @param join  SetJoin object

+     *  @param type type to be downcast to

+     *  @return  SetJoin object of the specified type

+     *  @since Java Persistence 2.1

+     */

+    <X, T, E extends T> SetJoin<X, E> treat(SetJoin<X, T> join, Class<E> type);

+

+    /**

+     *  Downcast ListJoin object to the specified type.

+     *  @param join  ListJoin object

+     *  @param type type to be downcast to

+     *  @return  ListJoin object of the specified type

+     *  @since Java Persistence 2.1

+     */

+    <X, T, E extends T> ListJoin<X, E> treat(ListJoin<X, T> join, Class<E> type);

+

+    /**

+     *  Downcast MapJoin object to the specified type.

+     *  @param join  MapJoin object

+     *  @param type type to be downcast to

+     *  @return  MapJoin object of the specified type

+     *  @since Java Persistence 2.1

+     */

+    <X, K, T, V extends T> MapJoin<X, K, V> treat(MapJoin<X, K, T> join, Class<V> type);

+

+

+    /**

+     *  Downcast Path object to the specified type.

+     *  @param path  path

+     *  @param type type to be downcast to

+     *  @return  Path object of the specified type

+     *  @since Java Persistence 2.1

+     */

+    <X, T extends X> Path<T> treat(Path<X> path, Class<T> type);

+

+    /**

+     *  Downcast Root object to the specified type.

+     *  @param root  root

+     *  @param type type to be downcast to

+     *  @return  Root object of the specified type

+     *  @since Java Persistence 2.1

+     */

+    <X, T extends X> Root<T> treat(Root<X> root, Class<T> type);

+

 }

 

 

diff --git a/src/javax/persistence/criteria/CriteriaDelete.java b/src/javax/persistence/criteria/CriteriaDelete.java
new file mode 100644
index 0000000..a064e9c
--- /dev/null
+++ b/src/javax/persistence/criteria/CriteriaDelete.java
@@ -0,0 +1,84 @@
+/*******************************************************************************

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

+package javax.persistence.criteria;

+

+import javax.persistence.metamodel.EntityType;

+

+

+/**

+ * The CriteriaDelete interface defines functionality for performing

+ * bulk delete operations using the Criteria API

+ *

+ * <p>Criteria API bulk delete operations map directly to database 

+ * delete operations.  The persistence context is not synchronized 

+ * with the result of the bulk delete.

+ *

+ * @param <T>  the entity type that is the target of the delete

+ *

+ * @since Java Persistence 2.1

+ */

+public interface CriteriaDelete<T> extends CommonAbstractQuery {

+

+

+    /**

+     * Create and add a query root corresponding to the entity

+     * that is the target of the delete.

+     * A CriteriaDelete object has a single root, the object that 

+     * is being deleted.

+     * @param entityClass  the entity class

+     * @return query root corresponding to the given entity

+     */

+    Root<T> from(Class<T> entityClass);

+

+    /**

+     * Create and add a query root corresponding to the entity

+     * that is the target of the delete.

+     * A CriteriaDelete object has a single root, the object that 

+     * is being deleted.

+     * @param entity  metamodel entity representing the entity

+     *                of type X

+     * @return query root corresponding to the given entity

+     */

+    Root<T> from(EntityType<T> entity);

+

+   /**

+    * Return the query root.

+    * @return the query root

+    */

+   Root<T> getRoot();

+

+    /**

+     * Modify the query to restrict the target of the deletion 

+     * according to the specified boolean expression.

+     * Replaces the previously added restriction(s), if any.

+     * @param restriction  a simple or compound boolean expression

+     * @return the modified query

+     */    

+   CriteriaDelete<T> where(Expression<Boolean> restriction);

+

+    /**

+     * Modify the query to restrict the target of the deletion

+     * according to the conjunction of the specified restriction 

+     * predicates.

+     * Replaces the previously added restriction(s), if any.

+     * If no restrictions are specified, any previously added

+     * restrictions are simply removed.

+     * @param restrictions  zero or more restriction predicates

+     * @return the modified query

+     */

+   CriteriaDelete<T> where(Predicate... restrictions);

+

+}

diff --git a/src/javax/persistence/criteria/CriteriaQuery.java b/src/javax/persistence/criteria/CriteriaQuery.java
index e02f761..bcc47aa 100644
--- a/src/javax/persistence/criteria/CriteriaQuery.java
+++ b/src/javax/persistence/criteria/CriteriaQuery.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.List;

diff --git a/src/javax/persistence/criteria/CriteriaUpdate.java b/src/javax/persistence/criteria/CriteriaUpdate.java
new file mode 100644
index 0000000..f818962
--- /dev/null
+++ b/src/javax/persistence/criteria/CriteriaUpdate.java
@@ -0,0 +1,127 @@
+/*******************************************************************************

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

+package javax.persistence.criteria;

+

+import javax.persistence.metamodel.SingularAttribute;

+import javax.persistence.metamodel.EntityType;

+

+/**

+ * The CriteriaUpdate interface defines functionality for performing

+ * bulk update operations using the Criteria API.

+ *

+ * <p>Criteria API bulk update operations map directly to database update

+ * operations, bypassing any optimistic locking checks.  Portable 

+ * applications using bulk update operations must manually update the 

+ * value of the version column, if desired, and/or manually validate 

+ * the value of the version column.

+ * The persistence context is not synchronized with the result of the

+ * bulk update.

+ *

+ * @param <T>  the entity type that is the target of the update

+ *

+ * @since Java Persistence 2.1

+ */

+public interface CriteriaUpdate<T> extends CommonAbstractQuery {

+

+   /**

+    * Create and add a query root corresponding to the entity

+    * that is the target of the update.

+    * A CriteriaUpdate object has a single root, the object that

+    * is being updated.

+    * @param entityClass  the entity class

+    * @return query root corresponding to the given entity

+    */

+   Root<T> from(Class<T> entityClass);

+

+   /**

+    * Create and add a query root corresponding to the entity

+    * that is the target of the update.

+    * A CriteriaUpdate object has a single root, the object that

+    * is being updated.

+    * @param entity  metamodel entity representing the entity

+    *                of type X

+    * @return query root corresponding to the given entity

+    */

+   Root<T> from(EntityType<T> entity);

+

+   /**

+    * Return the query root.

+    * @return the query root

+    */

+   Root<T> getRoot();

+

+   /**

+    * Update the value of the specified attribute.

+    * @param attribute  attribute to be updated

+    * @param value  new value

+    * @return  the modified query

+    */

+   <Y, X extends Y> CriteriaUpdate<T> set( SingularAttribute<? super T, Y> attribute, X value);

+

+   /**

+    * Update the value of the specified attribute.

+    * @param attribute  attribute to be updated

+    * @param value  new value

+    * @return  the modified query

+    */

+   <Y> CriteriaUpdate<T> set( SingularAttribute<? super T, Y> attribute, Expression<? extends Y> value);

+

+   /**

+    * Update the value of the specified attribute.

+    * @param attribute  attribute to be updated

+    * @param value  new value

+    * @return  the modified query

+    */

+   <Y, X extends Y> CriteriaUpdate<T> set(Path<Y> attribute, X value);

+

+   /**

+    * Update the value of the specified attribute.

+    * @param attribute  attribute to be updated

+    * @param value  new value

+    * @return  the modified query

+    */

+   <Y> CriteriaUpdate<T> set(Path<Y> attribute, Expression<? extends Y> value);

+

+   /**

+    * Update the value of the specified attribute.

+    * @param attributeName  name of the attribute to be updated

+    * @param value  new value

+    * @return  the modified query

+    */

+   CriteriaUpdate<T> set(String attributeName, Object value);

+

+    /**

+     * Modify the query to restrict the target of the update

+     * according to the specified boolean expression.

+     * Replaces the previously added restriction(s), if any.

+     * @param restriction  a simple or compound boolean expression

+     * @return the modified query

+     */    

+   CriteriaUpdate<T> where(Expression<Boolean> restriction);

+

+    /**

+     * Modify the query to restrict the target of the update

+     * according to the conjunction of the specified restriction 

+     * predicates.

+     * Replaces the previously added restriction(s), if any.

+     * If no restrictions are specified, any previously added

+     * restrictions are simply removed.

+     * @param restrictions  zero or more restriction predicates

+     * @return the modified query

+     */

+   CriteriaUpdate<T> where(Predicate... restrictions);

+

+}

diff --git a/src/javax/persistence/criteria/Expression.java b/src/javax/persistence/criteria/Expression.java
index 8ce4d15..05a11a7 100644
--- a/src/javax/persistence/criteria/Expression.java
+++ b/src/javax/persistence/criteria/Expression.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.Collection;

diff --git a/src/javax/persistence/criteria/Fetch.java b/src/javax/persistence/criteria/Fetch.java
index 81b53b5..0f72e31 100644
--- a/src/javax/persistence/criteria/Fetch.java
+++ b/src/javax/persistence/criteria/Fetch.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.metamodel.Attribute;

@@ -28,6 +28,36 @@
 public interface Fetch<Z, X> extends FetchParent<Z, X> {

 

     /**

+     *  Modify the fetch join to restrict the result according to

+     *  the specified ON condition and return the fetch join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restriction  a simple or compound boolean expression

+     *  @return the modified fetch join object

+     *  @since Java Persistence 2.1

+     */

+    Fetch<Z, X> on(Expression<Boolean> restriction);

+

+

+    /**

+     *  Modify the fetch join to restrict the result according to

+     *  the specified ON condition and return the fetch join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restrictions  zero or more restriction predicates

+     *  @return the modified fetch join object

+     *  @since Java Persistence 2.1

+     */

+    Fetch<Z, X> on(Predicate... restrictions);

+

+    /** 

+     *  Return the predicate that corresponds to the ON 

+     *  restriction(s), or null if no ON condition has been

+     *  specified.

+     *  @return the ON restriction predicate

+     *  @since Java Persistence 2.1

+     */

+    Predicate getOn();

+

+    /**

      * Return the metamodel attribute corresponding to the 

      * fetch join.

      * @return metamodel attribute for the join

diff --git a/src/javax/persistence/criteria/FetchParent.java b/src/javax/persistence/criteria/FetchParent.java
index e4b2194..df8cacc 100644
--- a/src/javax/persistence/criteria/FetchParent.java
+++ b/src/javax/persistence/criteria/FetchParent.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.metamodel.PluralAttribute;

diff --git a/src/javax/persistence/criteria/From.java b/src/javax/persistence/criteria/From.java
index 8b96a1d..2544b26 100644
--- a/src/javax/persistence/criteria/From.java
+++ b/src/javax/persistence/criteria/From.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.metamodel.SingularAttribute;

diff --git a/src/javax/persistence/criteria/Join.java b/src/javax/persistence/criteria/Join.java
index c07bd8b..447ce85 100644
--- a/src/javax/persistence/criteria/Join.java
+++ b/src/javax/persistence/criteria/Join.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.metamodel.Attribute;

@@ -28,6 +28,35 @@
 public interface Join<Z, X> extends From<Z, X> {

 

     /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restriction  a simple or compound boolean expression

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    Join<Z, X> on(Expression<Boolean> restriction);

+

+    /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restrictions  zero or more restriction predicates

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    Join<Z, X> on(Predicate... restrictions);

+

+    /** 

+     *  Return the predicate that corresponds to the ON 

+     *  restriction(s) on the join, or null if no ON condition 

+     *  has been specified.

+     *  @return the ON restriction predicate

+     *  @since Java Persistence 2.1

+     */

+    Predicate getOn();

+

+    /**

      * Return the metamodel attribute corresponding to the join.

      * @return metamodel attribute corresponding to the join

      */

diff --git a/src/javax/persistence/criteria/JoinType.java b/src/javax/persistence/criteria/JoinType.java
index ad81aa3..ed9316d 100644
--- a/src/javax/persistence/criteria/JoinType.java
+++ b/src/javax/persistence/criteria/JoinType.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence.criteria;

diff --git a/src/javax/persistence/criteria/ListJoin.java b/src/javax/persistence/criteria/ListJoin.java
index 91329ca..8336a5d 100644
--- a/src/javax/persistence/criteria/ListJoin.java
+++ b/src/javax/persistence/criteria/ListJoin.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.List;

@@ -32,6 +32,26 @@
 		extends PluralJoin<Z, List<E>, E> {

 

     /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restriction  a simple or compound boolean expression

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    ListJoin<Z, E> on(Expression<Boolean> restriction);

+

+    /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restrictions  zero or more restriction predicates

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    ListJoin<Z, E> on(Predicate... restrictions);

+

+    /**

      * Return the metamodel representation for the list attribute.

      * @return metamodel type representing the <code>List</code> that is

      *         the target of the join

diff --git a/src/javax/persistence/criteria/MapJoin.java b/src/javax/persistence/criteria/MapJoin.java
index f4b9174..e547e78 100644
--- a/src/javax/persistence/criteria/MapJoin.java
+++ b/src/javax/persistence/criteria/MapJoin.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.Map;

@@ -33,6 +33,26 @@
 		extends PluralJoin<Z, Map<K, V>, V> {

 

     /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restriction  a simple or compound boolean expression

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    MapJoin<Z, K, V> on(Expression<Boolean> restriction);

+

+    /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restrictions  zero or more restriction predicates

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    MapJoin<Z, K, V> on(Predicate... restrictions);

+

+    /**

      * Return the metamodel representation for the map attribute.

      * @return metamodel type representing the <code>Map</code> that is

      *         the target of the join

diff --git a/src/javax/persistence/criteria/Order.java b/src/javax/persistence/criteria/Order.java
index c8532c5..bf6e870 100644
--- a/src/javax/persistence/criteria/Order.java
+++ b/src/javax/persistence/criteria/Order.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence.criteria;

diff --git a/src/javax/persistence/criteria/ParameterExpression.java b/src/javax/persistence/criteria/ParameterExpression.java
index 0fbb601..b5a984a 100644
--- a/src/javax/persistence/criteria/ParameterExpression.java
+++ b/src/javax/persistence/criteria/ParameterExpression.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.Parameter;

diff --git a/src/javax/persistence/criteria/Path.java b/src/javax/persistence/criteria/Path.java
index 9a2ea96..fd90836 100644
--- a/src/javax/persistence/criteria/Path.java
+++ b/src/javax/persistence/criteria/Path.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.metamodel.PluralAttribute;

diff --git a/src/javax/persistence/criteria/PluralJoin.java b/src/javax/persistence/criteria/PluralJoin.java
index b2101e5..d5fc973 100644
--- a/src/javax/persistence/criteria/PluralJoin.java
+++ b/src/javax/persistence/criteria/PluralJoin.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.metamodel.PluralAttribute;

diff --git a/src/javax/persistence/criteria/Predicate.java b/src/javax/persistence/criteria/Predicate.java
index afbde78..c1375cb 100644
--- a/src/javax/persistence/criteria/Predicate.java
+++ b/src/javax/persistence/criteria/Predicate.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.List;

diff --git a/src/javax/persistence/criteria/Root.java b/src/javax/persistence/criteria/Root.java
index 72fda83..c6de7bb 100644
--- a/src/javax/persistence/criteria/Root.java
+++ b/src/javax/persistence/criteria/Root.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.metamodel.EntityType;

diff --git a/src/javax/persistence/criteria/Selection.java b/src/javax/persistence/criteria/Selection.java
index b4054cd..11a8b49 100644
--- a/src/javax/persistence/criteria/Selection.java
+++ b/src/javax/persistence/criteria/Selection.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import javax.persistence.TupleElement;

diff --git a/src/javax/persistence/criteria/SetJoin.java b/src/javax/persistence/criteria/SetJoin.java
index 76d6b67..19556d0 100644
--- a/src/javax/persistence/criteria/SetJoin.java
+++ b/src/javax/persistence/criteria/SetJoin.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.criteria;

 

 import java.util.Set;

@@ -31,6 +31,26 @@
 public interface SetJoin<Z, E> extends PluralJoin<Z, Set<E>, E> {

 

     /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restriction  a simple or compound boolean expression

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    SetJoin<Z, E> on(Expression<Boolean> restriction);

+

+    /**

+     *  Modify the join to restrict the result according to the

+     *  specified ON condition and return the join object.  

+     *  Replaces the previous ON condition, if any.

+     *  @param restrictions  zero or more restriction predicates

+     *  @return the modified join object

+     *  @since Java Persistence 2.1

+     */

+    SetJoin<Z, E> on(Predicate... restrictions);

+

+    /**

      * Return the metamodel representation for the set attribute.

      * @return metamodel type representing the <code>Set</code> that is

      *         the target of the join

diff --git a/src/javax/persistence/criteria/package-info.java b/src/javax/persistence/criteria/package-info.java
new file mode 100644
index 0000000..0a9a743
--- /dev/null
+++ b/src/javax/persistence/criteria/package-info.java
@@ -0,0 +1,20 @@
+/*******************************************************************************

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

+

+/**

+ * Java Persistence Criteria API

+ */

+package javax.persistence.criteria;

diff --git a/src/javax/persistence/metamodel/Attribute.java b/src/javax/persistence/metamodel/Attribute.java
index 97a6a73..1118392 100644
--- a/src/javax/persistence/metamodel/Attribute.java
+++ b/src/javax/persistence/metamodel/Attribute.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/BasicType.java b/src/javax/persistence/metamodel/BasicType.java
index ab661a3..d7b93aa 100644
--- a/src/javax/persistence/metamodel/BasicType.java
+++ b/src/javax/persistence/metamodel/BasicType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/Bindable.java b/src/javax/persistence/metamodel/Bindable.java
index 38da65f..1a40d29 100644
--- a/src/javax/persistence/metamodel/Bindable.java
+++ b/src/javax/persistence/metamodel/Bindable.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/CollectionAttribute.java b/src/javax/persistence/metamodel/CollectionAttribute.java
index 439fe39..4b3513a 100644
--- a/src/javax/persistence/metamodel/CollectionAttribute.java
+++ b/src/javax/persistence/metamodel/CollectionAttribute.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/EmbeddableType.java b/src/javax/persistence/metamodel/EmbeddableType.java
index 68429c5..329493c 100644
--- a/src/javax/persistence/metamodel/EmbeddableType.java
+++ b/src/javax/persistence/metamodel/EmbeddableType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/EntityType.java b/src/javax/persistence/metamodel/EntityType.java
index 5046ae8..0ae4a1a 100644
--- a/src/javax/persistence/metamodel/EntityType.java
+++ b/src/javax/persistence/metamodel/EntityType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/IdentifiableType.java b/src/javax/persistence/metamodel/IdentifiableType.java
index 0b67006..5bf186d 100644
--- a/src/javax/persistence/metamodel/IdentifiableType.java
+++ b/src/javax/persistence/metamodel/IdentifiableType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 import java.util.Set;

diff --git a/src/javax/persistence/metamodel/ListAttribute.java b/src/javax/persistence/metamodel/ListAttribute.java
index 787455a..f43dcca 100644
--- a/src/javax/persistence/metamodel/ListAttribute.java
+++ b/src/javax/persistence/metamodel/ListAttribute.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/ManagedType.java b/src/javax/persistence/metamodel/ManagedType.java
index 403b58f..895661a 100644
--- a/src/javax/persistence/metamodel/ManagedType.java
+++ b/src/javax/persistence/metamodel/ManagedType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 import java.util.Set;

diff --git a/src/javax/persistence/metamodel/MapAttribute.java b/src/javax/persistence/metamodel/MapAttribute.java
index 8f26b5d..761f859 100644
--- a/src/javax/persistence/metamodel/MapAttribute.java
+++ b/src/javax/persistence/metamodel/MapAttribute.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/MappedSuperclassType.java b/src/javax/persistence/metamodel/MappedSuperclassType.java
index 22cacf2..086fe34 100644
--- a/src/javax/persistence/metamodel/MappedSuperclassType.java
+++ b/src/javax/persistence/metamodel/MappedSuperclassType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/Metamodel.java b/src/javax/persistence/metamodel/Metamodel.java
index ad0f485..96fab1b 100644
--- a/src/javax/persistence/metamodel/Metamodel.java
+++ b/src/javax/persistence/metamodel/Metamodel.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 import java.util.Set;

diff --git a/src/javax/persistence/metamodel/PluralAttribute.java b/src/javax/persistence/metamodel/PluralAttribute.java
index 1417437..c3e4665 100644
--- a/src/javax/persistence/metamodel/PluralAttribute.java
+++ b/src/javax/persistence/metamodel/PluralAttribute.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/SetAttribute.java b/src/javax/persistence/metamodel/SetAttribute.java
index 380aa85..ef44899 100644
--- a/src/javax/persistence/metamodel/SetAttribute.java
+++ b/src/javax/persistence/metamodel/SetAttribute.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/SingularAttribute.java b/src/javax/persistence/metamodel/SingularAttribute.java
index a7024db..3025c70 100644
--- a/src/javax/persistence/metamodel/SingularAttribute.java
+++ b/src/javax/persistence/metamodel/SingularAttribute.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/StaticMetamodel.java b/src/javax/persistence/metamodel/StaticMetamodel.java
index 6657d96..1a9e7a5 100644
--- a/src/javax/persistence/metamodel/StaticMetamodel.java
+++ b/src/javax/persistence/metamodel/StaticMetamodel.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 import java.lang.annotation.ElementType;

diff --git a/src/javax/persistence/metamodel/Type.java b/src/javax/persistence/metamodel/Type.java
index 918d492..4cbb75f 100644
--- a/src/javax/persistence/metamodel/Type.java
+++ b/src/javax/persistence/metamodel/Type.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.metamodel;

 

 /**

diff --git a/src/javax/persistence/metamodel/package-info.java b/src/javax/persistence/metamodel/package-info.java
new file mode 100644
index 0000000..d462c91
--- /dev/null
+++ b/src/javax/persistence/metamodel/package-info.java
@@ -0,0 +1,20 @@
+/*******************************************************************************

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

+

+/**

+ * Java Persistence Metamodel API

+ */

+package javax.persistence.metamodel;

diff --git a/src/javax/persistence/package-info.java b/src/javax/persistence/package-info.java
new file mode 100644
index 0000000..e29c71d
--- /dev/null
+++ b/src/javax/persistence/package-info.java
@@ -0,0 +1,20 @@
+/*******************************************************************************

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

+

+/**

+ * Java Persistence is the API for the management for persistence and object/relational mapping.

+ */

+package javax.persistence;

diff --git a/src/javax/persistence/spi/ClassTransformer.java b/src/javax/persistence/spi/ClassTransformer.java
index 323b1e6..7a739d5 100644
--- a/src/javax/persistence/spi/ClassTransformer.java
+++ b/src/javax/persistence/spi/ClassTransformer.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.spi;

 

 import java.security.ProtectionDomain;

diff --git a/src/javax/persistence/spi/LoadState.java b/src/javax/persistence/spi/LoadState.java
index 6bab245..29c5f0c 100644
--- a/src/javax/persistence/spi/LoadState.java
+++ b/src/javax/persistence/spi/LoadState.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.spi;

 

 /**

diff --git a/src/javax/persistence/spi/PersistenceProvider.java b/src/javax/persistence/spi/PersistenceProvider.java
index a27085f..943c4a6 100644
--- a/src/javax/persistence/spi/PersistenceProvider.java
+++ b/src/javax/persistence/spi/PersistenceProvider.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.spi;

 

 import javax.persistence.EntityManagerFactory;

diff --git a/src/javax/persistence/spi/PersistenceProviderResolver.java b/src/javax/persistence/spi/PersistenceProviderResolver.java
index 78982ed..3d2d78e 100644
--- a/src/javax/persistence/spi/PersistenceProviderResolver.java
+++ b/src/javax/persistence/spi/PersistenceProviderResolver.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.spi;

 

 import java.util.List;

diff --git a/src/javax/persistence/spi/PersistenceProviderResolverHolder.java b/src/javax/persistence/spi/PersistenceProviderResolverHolder.java
index 882fb51..ef76883 100644
--- a/src/javax/persistence/spi/PersistenceProviderResolverHolder.java
+++ b/src/javax/persistence/spi/PersistenceProviderResolverHolder.java
@@ -1,19 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

- *     dclarke - EclipseLink implementation and default resolver

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.spi;

 

 import java.io.BufferedReader;

diff --git a/src/javax/persistence/spi/PersistenceUnitInfo.java b/src/javax/persistence/spi/PersistenceUnitInfo.java
index 88a01ad..d0cbf7d 100644
--- a/src/javax/persistence/spi/PersistenceUnitInfo.java
+++ b/src/javax/persistence/spi/PersistenceUnitInfo.java
@@ -1,18 +1,18 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

- * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

- * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

  *

- ******************************************************************************/

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

 package javax.persistence.spi;

 

 import javax.sql.DataSource;

diff --git a/src/javax/persistence/spi/PersistenceUnitTransactionType.java b/src/javax/persistence/spi/PersistenceUnitTransactionType.java
index dc2c12a..812192d 100644
--- a/src/javax/persistence/spi/PersistenceUnitTransactionType.java
+++ b/src/javax/persistence/spi/PersistenceUnitTransactionType.java
@@ -1,18 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 
- * 
- * This program and the accompanying materials are made available under the 
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
- * which accompanies this distribution. 
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at 
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * 
- * Contributors:
- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)
- *     Specification available from http://jcp.org/en/jsr/detail?id=317
+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
  *
- ******************************************************************************/
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Linda DeMichiel - Java Persistence 2.1
+ *     Linda DeMichiel - Java Persistence 2.0
+ *
+ ******************************************************************************/ 
 package javax.persistence.spi;
 
 /**
diff --git a/src/javax/persistence/spi/ProviderUtil.java b/src/javax/persistence/spi/ProviderUtil.java
index b653edd..69d85b4 100644
--- a/src/javax/persistence/spi/ProviderUtil.java
+++ b/src/javax/persistence/spi/ProviderUtil.java
@@ -1,16 +1,16 @@
 /*******************************************************************************

- * Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved. 

- * 

- * This program and the accompanying materials are made available under the 

- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

- * which accompanies this distribution. 

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

- * and the Eclipse Distribution License is available at 

+ * and the Eclipse Distribution License is available at

  * http://www.eclipse.org/org/documents/edl-v10.php.

- * 

+ *

  * Contributors:

- *     Linda DeMichiel - Java Persistence 2.0 - Version 2.0 (October 1, 2009)

- *     Specification available from http://jcp.org/en/jsr/detail?id=317

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

  *

  ******************************************************************************/

 package javax.persistence.spi;

diff --git a/src/javax/persistence/spi/package-info.java b/src/javax/persistence/spi/package-info.java
new file mode 100644
index 0000000..6166299
--- /dev/null
+++ b/src/javax/persistence/spi/package-info.java
@@ -0,0 +1,20 @@
+/*******************************************************************************

+ * Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.

+ *

+ * This program and the accompanying materials are made available under the

+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0

+ * which accompanies this distribution.

+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html

+ * and the Eclipse Distribution License is available at

+ * http://www.eclipse.org/org/documents/edl-v10.php.

+ *

+ * Contributors:

+ *     Linda DeMichiel - Java Persistence 2.1

+ *     Linda DeMichiel - Java Persistence 2.0

+ *

+ ******************************************************************************/ 

+

+/**

+ * SPI for Java Persistence providers

+ */

+package javax.persistence.spi;