Bug 249218 - Criteria API
This update consists of implementations of the QueryBuilder interface and updates to the Specification API
diff --git a/src/javax/persistence/criteria/AbstractQuery.java b/src/javax/persistence/criteria/AbstractQuery.java
index 35eb932..fac6e27 100644
--- a/src/javax/persistence/criteria/AbstractQuery.java
+++ b/src/javax/persistence/criteria/AbstractQuery.java
@@ -156,7 +156,7 @@
      * 

      * @return where clause predicate

      */

-    Predicate getRestriction();

+    Expression<Boolean> getRestriction();

 

     /**

      * Return the predicate that corresponds to the restriction(s) over the

diff --git a/src/javax/persistence/criteria/CompoundSelection.java b/src/javax/persistence/criteria/CompoundSelection.java
new file mode 100644
index 0000000..809aef6
--- /dev/null
+++ b/src/javax/persistence/criteria/CompoundSelection.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 1998, 2009 Oracle. All rights reserved. 
+ * 
+ * This program and the accompanying materials are made available under the 
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
+ * which accompanies this distribution. 
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at 
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     gyorke - Java Persistence 2.0 - Post Proposed Final Draft (March 13, 2009) Updates
+ *               Specification available from http://jcp.org/en/jsr/detail?id=317
+ *
+ * Java(TM) Persistence API, Version 2.0 - EARLY ACCESS
+ * This is an implementation of an early-draft specification developed under the 
+ * Java Community Process (JCP).  The code is untested and presumed not to be a  
+ * compatible implementation of JSR 317: Java(TM) Persistence API, Version 2.0.   
+ * We encourage you to migrate to an implementation of the Java(TM) Persistence 
+ * API, Version 2.0 Specification that has been tested and verified to be compatible 
+ * as soon as such an implementation is available, and we encourage you to retain 
+ * this notice in any implementation of Java(TM) Persistence API, Version 2.0 
+ * Specification that you distribute.
+ ******************************************************************************/
+
+package javax.persistence.criteria;
+
+/**
+ * The CompoundSelection interface defines a compound selection item
+ * (tuple, array, or result of constructor).
+ * @param <X> the type of the selection item
+ */
+public interface CompoundSelection<X> extends Selection<X> {}
diff --git a/src/javax/persistence/criteria/From.java b/src/javax/persistence/criteria/From.java
index 1ef1ebb..61eca03 100644
--- a/src/javax/persistence/criteria/From.java
+++ b/src/javax/persistence/criteria/From.java
@@ -161,7 +161,7 @@
      *            name of the attribute for the target of the join

      * @return the resulting join

      */

-    <Y> Join<X, Y> join(String attributeName);

+    <X, Y> Join<X, Y> join(String attributeName);

 

     /**

      * Join to the specified Collection-valued attribute using an inner join.

@@ -170,7 +170,7 @@
      *            name of the attribute for the target of the join

      * @return the resulting join

      */

-    <Y> CollectionJoin<X, Y> joinCollection(String attributeName);

+    <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName);

 

     /**

      * Join to the specified Set-valued attribute using an inner join.

@@ -179,7 +179,7 @@
      *            name of the attribute for the target of the join

      * @return the resulting join

      */

-    <Y> SetJoin<X, Y> joinSet(String attributeName);

+    <X, Y> SetJoin<X, Y> joinSet(String attributeName);

 

     /**

      * Join to the specified List-valued attribute using an inner join.

@@ -188,7 +188,7 @@
      *            name of the attribute for the target of the join

      * @return the resulting join

      */

-    <Y> ListJoin<X, Y> joinList(String attributeName);

+    <X, Y> ListJoin<X, Y> joinList(String attributeName);

 

     /**

      * Join to the specified Map-valued attribute using an inner join.

@@ -197,7 +197,7 @@
      *            name of the attribute for the target of the join

      * @return the resulting join

      */

-    <K, V> MapJoin<X, K, V> joinMap(String attributeName);

+    <X, K, V> MapJoin<X, K, V> joinMap(String attributeName);

 

     /**

      * Join to the specified attribute using the given join type.

@@ -208,7 +208,7 @@
      *            join type

      * @return the resulting join

      */

-    <Y> Join<X, Y> join(String attributeName, JoinType jt);

+    <X, Y> Join<X, Y> join(String attributeName, JoinType jt);

 

     /**

      * Join to the specified Collection-valued attribute using the given join

@@ -220,7 +220,7 @@
      *            join type

      * @return the resulting join

      */

-    <Y> CollectionJoin<X, Y> joinCollection(String attributeName, JoinType jt);

+    <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName, JoinType jt);

 

     /**

      * Join to the specified Set-valued attribute using the given join type.

@@ -231,7 +231,7 @@
      *            join type

      * @return the resulting join

      */

-    <Y> SetJoin<X, Y> joinSet(String attributeName, JoinType jt);

+    <X, Y> SetJoin<X, Y> joinSet(String attributeName, JoinType jt);

 

     /**

      * Join to the specified List-valued attribute using the given join type.

@@ -242,7 +242,7 @@
      *            join type

      * @return the resulting join

      */

-    <Y> ListJoin<X, Y> joinList(String attributeName, JoinType jt);

+    <X, Y> ListJoin<X, Y> joinList(String attributeName, JoinType jt);

 

     /**

      * Join to the specified Map-valued attribute using the given join type.

@@ -253,5 +253,5 @@
      *            join type

      * @return the resulting join

      */

-    <K, V> MapJoin<X, K, V> joinMap(String attributeName, JoinType jt);

+    <X, K, V> MapJoin<X, K, V> joinMap(String attributeName, JoinType jt);

 }
\ No newline at end of file