JPA 2.1 Spec updates
diff --git a/src/javax/persistence/EntityManager.java b/src/javax/persistence/EntityManager.java index f306164..17ae586 100644 --- a/src/javax/persistence/EntityManager.java +++ b/src/javax/persistence/EntityManager.java
@@ -795,8 +795,9 @@ * Close an application-managed entity manager. * After the close method has been invoked, all methods * on the <code>EntityManager</code> instance and any - * <code>Query</code> and <code>TypedQuery</code> - * objects obtained from it will throw the <code>IllegalStateException</code> + * <code>Query</code>, <code>TypedQuery</code>, and + * <code>StoredProcedureQuery</code> objects obtained from + * it will throw the <code>IllegalStateException</code> * 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
diff --git a/src/javax/persistence/EntityManagerFactory.java b/src/javax/persistence/EntityManagerFactory.java index b776d76..a200d31 100644 --- a/src/javax/persistence/EntityManagerFactory.java +++ b/src/javax/persistence/EntityManagerFactory.java
@@ -169,7 +169,8 @@ /** * 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. + * from it using the <code>createNamedQuery</code> or + * <code>createNamedStoredProcedureQuery</code> method. * <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. @@ -177,11 +178,12 @@ * 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 + * by means of the query APIs 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. + * means of the <code>createNamedQuery</code> or + * <code>createNamedStoredProcedureQuery</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.
diff --git a/src/javax/persistence/JoinColumns.java b/src/javax/persistence/JoinColumns.java index e810f0d..0766c80 100644 --- a/src/javax/persistence/JoinColumns.java +++ b/src/javax/persistence/JoinColumns.java
@@ -57,8 +57,11 @@ /** * (Optional) Used to specify or control the generation of a - * foreign key constraint when table generation is in effect. If - * this element is not specified, the persistence provider's + * foreign key constraint when table generation is in effect. + * If both this element and the <code>foreignKey</code> element + * of any of the <code>JoinColumn</code> elements are specified, + * the behavior is undefined. If no foreign key annotation element + * is specified in either location, the persistence provider's * default foreign key strategy will apply. * * @since Java Persistence 2.1
diff --git a/src/javax/persistence/MapKeyJoinColumns.java b/src/javax/persistence/MapKeyJoinColumns.java index ca57ff0..357adfe 100644 --- a/src/javax/persistence/MapKeyJoinColumns.java +++ b/src/javax/persistence/MapKeyJoinColumns.java
@@ -47,9 +47,13 @@ /** * (Optional) Used to specify or control the generation of a - * foreign key constraint when table generation is in effect. If - * this element is not specified, the persistence provider's - * default foreign key strategy will apply. + * foreign key constraint when table generation is in effect. + * If both this element and the <code>foreignKey</code> + * element of any of the <code>MapKeyJoinColumn</code> + * elements are specified, the behavior is undefined. If no + * foreign key annotation element is specified in either + * location, the persistence provider's default foreign key + * strategy will apply. * * @since Java Persistence 2.1 */
diff --git a/src/javax/persistence/PrimaryKeyJoinColumn.java b/src/javax/persistence/PrimaryKeyJoinColumn.java index c9d72f2..5da2697 100644 --- a/src/javax/persistence/PrimaryKeyJoinColumn.java +++ b/src/javax/persistence/PrimaryKeyJoinColumn.java
@@ -104,7 +104,8 @@ /** * (Optional) Used to specify or control the generation of a - * foreign key constraint when table generation is in effect. If + * foreign key constraint for the primary key join column + * when table generation is in effect. If * this element is not specified, the persistence provider's * default foreign key strategy will apply. *
diff --git a/src/javax/persistence/PrimaryKeyJoinColumns.java b/src/javax/persistence/PrimaryKeyJoinColumns.java index 6744af2..2befe5d 100644 --- a/src/javax/persistence/PrimaryKeyJoinColumns.java +++ b/src/javax/persistence/PrimaryKeyJoinColumns.java
@@ -55,9 +55,13 @@ PrimaryKeyJoinColumn[] value(); /** - * (Optional) Used to specify or disable a foreign key constraint when - * table generation is in effect. If this element is not specified, - * the persistence provider's default foreign key strategy will apply. + * (Optional) Used to specify or control the generation of a + * foreign key constraint when table generation is in effect. + * If both this element and the <code>foreignKey</code> element + * of any of the <code>PrimaryKeyJoinColumn</code> elements are specified, + * the behavior is undefined. If no foreign key annotation element + * is specified in either location, the persistence provider's + * default foreign key strategy will apply. * * @since Java Persistence 2.1 */
diff --git a/src/javax/persistence/SqlResultSetMapping.java b/src/javax/persistence/SqlResultSetMapping.java index 8954efd..0db0dd5 100644 --- a/src/javax/persistence/SqlResultSetMapping.java +++ b/src/javax/persistence/SqlResultSetMapping.java
@@ -21,7 +21,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** - * Specifies the mapping of the result of a native SQL query. + * Specifies the mapping of the result of a native SQL query or stored + * procedure. * * <pre> * Example: @@ -46,6 +47,11 @@ * ) * </pre> * + * @see Query + * @see StoredProcedureQuery + * @see NamedNativeQuery + * @see NamedStoredProcedureQuery + * * @since Java Persistence 1.0 */ @Target({TYPE}) @@ -54,7 +60,8 @@ /** * The name given to the result set mapping, and used to refer - * to it in the methods of the {@link Query} API. + * to it in the methods of the {@link Query} and + * {@link StoredProcedureQuery} APIs. */ String name();