You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by st...@apache.org on 2019/02/26 20:40:11 UTC
svn commit: r1854420 -
/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/
Author: struberg
Date: Tue Feb 26 20:40:11 2019
New Revision: 1854420
URL: http://svn.apache.org/viewvc?rev=1854420&view=rev
Log:
GERONIMO-6572 add JPA-2.2 enhancements
* some repeatable annotations
* Query and TypedQuery #getResultStream
Added:
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerators.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerators.java
Modified:
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AssociationOverride.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AttributeOverride.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Convert.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/JoinColumn.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/MapKeyJoinColumn.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedEntityGraph.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedNativeQuery.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedQuery.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedStoredProcedureQuery.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContext.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceUnit.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Query.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SecondaryTable.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerator.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SqlResultSetMapping.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerator.java
geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TypedQuery.java
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AssociationOverride.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AssociationOverride.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AssociationOverride.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AssociationOverride.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -34,7 +35,7 @@ import static javax.persistence.Constrai
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
-
+@Repeatable(AssociationOverrides.class)
public @interface AssociationOverride {
String name();
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AttributeOverride.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AttributeOverride.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AttributeOverride.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/AttributeOverride.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -34,7 +35,7 @@ import static java.lang.annotation.Reten
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
-
+@Repeatable(AttributeOverrides.class)
public @interface AttributeOverride {
String name();
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Convert.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Convert.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Convert.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Convert.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -31,7 +32,9 @@ import static java.lang.annotation.Eleme
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
-@Target({METHOD, FIELD, TYPE}) @Retention(RUNTIME)
+@Target({METHOD, FIELD, TYPE})
+@Retention(RUNTIME)
+@Repeatable(Converts.class)
public @interface Convert {
Class converter() default void.class;
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/JoinColumn.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/JoinColumn.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/JoinColumn.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/JoinColumn.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
@@ -33,6 +34,7 @@ import static javax.persistence.Constrai
@Target({METHOD, FIELD})
@Retention(RUNTIME)
+@Repeatable(JoinColumns.class)
public @interface JoinColumn {
String name() default "";
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/MapKeyJoinColumn.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/MapKeyJoinColumn.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/MapKeyJoinColumn.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/MapKeyJoinColumn.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
@@ -33,6 +34,7 @@ import static javax.persistence.Constrai
@Target( { METHOD, FIELD })
@Retention(RUNTIME)
+@Repeatable(MapKeyJoinColumns.class)
public @interface MapKeyJoinColumn {
String name() default "";
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedEntityGraph.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedEntityGraph.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedEntityGraph.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedEntityGraph.java Tue Feb 26 20:40:11 2019
@@ -25,6 +25,7 @@
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -32,6 +33,7 @@ import static java.lang.annotation.Reten
@Target({TYPE})
@Retention(RUNTIME)
+@Repeatable(NamedEntityGraphs.class)
public @interface NamedEntityGraph {
String name() default "";
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedNativeQuery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedNativeQuery.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedNativeQuery.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedNativeQuery.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -32,6 +33,7 @@ import static java.lang.annotation.Reten
@Target({TYPE})
@Retention(RUNTIME)
+@Repeatable(NamedNativeQueries.class)
public @interface NamedNativeQuery {
String name();
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedQuery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedQuery.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedQuery.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedQuery.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static javax.persistence.LockModeType.NONE;
@@ -33,6 +34,7 @@ import static java.lang.annotation.Reten
@Target({TYPE})
@Retention(RUNTIME)
+@Repeatable(NamedQueries.class)
public @interface NamedQuery {
String name();
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedStoredProcedureQuery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedStoredProcedureQuery.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedStoredProcedureQuery.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedStoredProcedureQuery.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -31,6 +32,7 @@ import static java.lang.annotation.Reten
@Target({TYPE})
@Retention(RUNTIME)
+@Repeatable(NamedStoredProcedureQueries.class)
public @interface NamedStoredProcedureQuery {
String name();
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContext.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContext.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceContext.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
@@ -32,6 +33,7 @@ import static java.lang.annotation.Reten
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
+@Repeatable(PersistenceContexts.class)
public @interface PersistenceContext {
String name() default "";
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceUnit.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceUnit.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceUnit.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceUnit.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
@@ -33,6 +34,7 @@ import static java.lang.annotation.Reten
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
+@Repeatable(PersistenceUnits.class)
public @interface PersistenceUnit {
String name() default "";
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
@@ -34,7 +35,7 @@ import static javax.persistence.Constrai
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
-
+@Repeatable(PrimaryKeyJoinColumns.class)
public @interface PrimaryKeyJoinColumn {
String name() default "";
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Query.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Query.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Query.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/Query.java Tue Feb 26 20:40:11 2019
@@ -31,6 +31,7 @@ import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.Map;
+import java.util.stream.Stream;
public interface Query {
@@ -104,4 +105,8 @@ public interface Query {
LockModeType getLockMode();
<T> T unwrap(Class<T> cls);
+
+ default Stream getResultStream() {
+ return getResultList().stream();
+ }
}
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SecondaryTable.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SecondaryTable.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SecondaryTable.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SecondaryTable.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -32,7 +33,7 @@ import static javax.persistence.Constrai
@Target(TYPE)
@Retention(RUNTIME)
-
+@Repeatable(SecondaryTables.class)
public @interface SecondaryTable {
String name();
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerator.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerator.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerator.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
@@ -34,6 +35,7 @@ import static java.lang.annotation.Reten
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
+@Repeatable(SequenceGenerators.class)
public @interface SequenceGenerator {
String name();
Added: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerators.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerators.java?rev=1854420&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerators.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SequenceGenerators.java Tue Feb 26 20:40:11 2019
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Target({TYPE, METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface SequenceGenerators {
+ SequenceGenerator[] value();
+}
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SqlResultSetMapping.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SqlResultSetMapping.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SqlResultSetMapping.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/SqlResultSetMapping.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.TYPE;
@@ -31,6 +32,7 @@ import static java.lang.annotation.Reten
@Target({TYPE})
@Retention(RUNTIME)
+@Repeatable(SqlResultSetMappings.class)
public @interface SqlResultSetMapping {
String name();
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerator.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerator.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerator.java Tue Feb 26 20:40:11 2019
@@ -24,6 +24,7 @@
//
package javax.persistence;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.FIELD;
@@ -33,6 +34,7 @@ import static java.lang.annotation.Reten
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
+@Repeatable(TableGenerators.class)
public @interface TableGenerator {
String name();
Added: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerators.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerators.java?rev=1854420&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerators.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TableGenerators.java Tue Feb 26 20:40:11 2019
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Target({TYPE, METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface TableGenerators {
+ TableGenerator[] value();
+}
Modified: geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TypedQuery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TypedQuery.java?rev=1854420&r1=1854419&r2=1854420&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TypedQuery.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/TypedQuery.java Tue Feb 26 20:40:11 2019
@@ -28,6 +28,7 @@ package javax.persistence;
import java.util.List;
import java.util.Date;
import java.util.Calendar;
+import java.util.stream.Stream;
public interface TypedQuery<X> extends Query {
@@ -70,4 +71,7 @@ public interface TypedQuery<X> extends Q
TypedQuery<X> setLockMode(LockModeType lockMode);
+ default Stream<X> getResultStream() {
+ return getResultList().stream();
+ }
}