You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2009/06/17 19:30:53 UTC

svn commit: r785739 [1/2] - in /geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence: ./ criteria/ metamodel/

Author: dwoods
Date: Wed Jun 17 17:30:47 2009
New Revision: 785739

URL: http://svn.apache.org/viewvc?rev=785739&view=rev
Log:
GERONIMO-4410 JPA2 spec udpates.  Contributed by Jeremy Bauer.

Added:
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheRetrieveMode.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheStoreMode.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PessimisticLockScope.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Tuple.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TupleElement.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TypedQuery.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ParameterExpression.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/PluralJoin.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/BasicType.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/CollectionAttribute.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EmbeddableType.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EntityType.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ListAttribute.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MapAttribute.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclassType.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/PluralAttribute.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SetAttribute.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SingularAttribute.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/StaticMetamodel.java   (with props)
Removed:
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheGetMode.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CachePutMode.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/AbstractCollectionJoin.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/AbstractCollection.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Basic.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Collection.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Embeddable.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Entity.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/List.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Map.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclass.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Member.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Set.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java
Modified:
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Cache.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManager.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManagerFactory.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityTransaction.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Parameter.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Query.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/AbstractQuery.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CollectionJoin.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CriteriaQuery.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Expression.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Fetch.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/FetchParent.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/From.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Join.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ListJoin.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/MapJoin.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Order.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Path.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Predicate.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ManagedType.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Metamodel.java
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Type.java

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Cache.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Cache.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Cache.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Cache.java Wed Jun 17 17:30:47 2009
@@ -25,6 +25,7 @@
 package javax.persistence;
 
 public interface Cache {
+
     public boolean contains(Class cls, Object primaryKey);
 
     public void evict(Class cls, Object primaryKey);

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheRetrieveMode.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheRetrieveMode.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheRetrieveMode.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheRetrieveMode.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,30 @@
+/*
+ * 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;
+
+public enum CacheRetrieveMode {
+    USE,
+    BYPASS
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheRetrieveMode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheStoreMode.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheStoreMode.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheStoreMode.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheStoreMode.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,32 @@
+/*
+ * 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;
+
+public enum CacheStoreMode {
+    USE,
+    BYPASS,
+    REFRESH
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CacheStoreMode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManager.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManager.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManager.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManager.java Wed Jun 17 17:30:47 2009
@@ -25,12 +25,11 @@
 
 package javax.persistence;
 
-import java.util.Map;
 import java.util.Set;
-
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.QueryBuilder;
+import java.util.Map;
 import javax.persistence.metamodel.Metamodel;
+import javax.persistence.criteria.QueryBuilder;
+import javax.persistence.criteria.CriteriaQuery;
 
 /**
  * @version $Rev$ $Date$
@@ -41,39 +40,44 @@
     public <T> T merge(T entity);
     public void remove(Object entity);
     public <T> T find(Class<T> entityClass, Object primaryKey);
+    public <T> T find(Class<T> entityClass, Object primaryKey, 
+                      Map<String, Object> properties); 
     public <T> T find(Class<T> entityClass, Object primaryKey,
-        Map<String, Object> properties);
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode);
+                      LockModeType lockMode);
     public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode, Map<String, Object> properties);
-    public <T> T getReference(Class<T> entityClass, Object primaryKey);
+                      LockModeType lockMode, 
+                      Map<String, Object> properties);
+    public <T> T getReference(Class<T> entityClass, 
+                                  Object primaryKey);
     public void flush();
     public void setFlushMode(FlushModeType flushMode);
     public FlushModeType getFlushMode();
     public void lock(Object entity, LockModeType lockMode);
     public void lock(Object entity, LockModeType lockMode,
-        Map<String, Object> properties);
+                     Map<String, Object> properties);
     public void refresh(Object entity);
-    public void refresh(Object entity, Map<String, Object> properties);
+    public void refresh(Object entity,
+                            Map<String, Object> properties); 
     public void refresh(Object entity, LockModeType lockMode);
     public void refresh(Object entity, LockModeType lockMode,
-        Map<String, Object> properties);
+                        Map<String, Object> properties);
     public void clear();
-    public void detach(Object entity);
+    public void detach(Object entity); 
     public boolean contains(Object entity);
     public LockModeType getLockMode(Object entity);
     public void setProperty(String propertyName, Object value);
     public Map<String, Object> getProperties();
     public Set<String> getSupportedProperties();
     public Query createQuery(String qlString);
-    public Query createQuery(CriteriaQuery criteriaQuery);
+    public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass);
+    public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery); 
     public Query createNamedQuery(String name);
+    public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass);
     public Query createNativeQuery(String sqlString);
     public Query createNativeQuery(String sqlString, Class resultClass);
     public Query createNativeQuery(String sqlString, String resultSetMapping);
     public void joinTransaction();
-    public <T> T unwrap(Class<T> cls);
+    public <T> T unwrap(Class<T> cls); 
     public Object getDelegate();
     public void close();
     public boolean isOpen();

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManagerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManagerFactory.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManagerFactory.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityManagerFactory.java Wed Jun 17 17:30:47 2009
@@ -24,11 +24,11 @@
 //
 package javax.persistence;
 
-import java.util.Map;
 import java.util.Set;
+import java.util.Map;
 
-import javax.persistence.criteria.QueryBuilder;
 import javax.persistence.metamodel.Metamodel;
+import javax.persistence.criteria.QueryBuilder;
 
 /**
  *

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityTransaction.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityTransaction.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityTransaction.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/EntityTransaction.java Wed Jun 17 17:30:47 2009
@@ -28,16 +28,16 @@
  * @version $Rev$ $Date$
  */
 public interface EntityTransaction {
+
     public void begin();
 
     public void commit();
 
     public void rollback();
 
-    public boolean isActive();
-
     public void setRollbackOnly();
 
     public boolean getRollbackOnly();
 
+    public boolean isActive();
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Parameter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Parameter.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Parameter.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Parameter.java Wed Jun 17 17:30:47 2009
@@ -25,10 +25,8 @@
 
 package javax.persistence;
 
-import javax.persistence.criteria.Expression;
+public interface Parameter<T> {
 
-public interface Parameter<T> extends Expression<T> {
-    
     String getName();
 
     Integer getPosition();

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PessimisticLockScope.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PessimisticLockScope.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PessimisticLockScope.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PessimisticLockScope.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,30 @@
+/*
+ * 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;
+
+public enum PessimisticLockScope {
+    NORMAL,
+    EXTENDED
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PessimisticLockScope.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Query.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Query.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Query.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Query.java Wed Jun 17 17:30:47 2009
@@ -27,18 +27,14 @@
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
+import java.util.Map;
 
 /**
  * @version $Rev$ $Date$
  */
 public interface Query {
 
-    List<Result> getTypedResultList();
-    
-    Result getTypedSingleResult();
-    
     List getResultList();
 
     Object getSingleResult();
@@ -46,7 +42,7 @@
     int executeUpdate();
 
     Query setMaxResults(int maxResult);
-    
+
     int getMaxResults();
 
     Query setFirstResult(int startPosition);
@@ -59,23 +55,19 @@
 
     Set<String> getSupportedHints();
 
-    <T> Query setParameter(Parameter<T> param, T value);
-
     Query setParameter(String name, Object value);
 
-    Query setParameter(String name, Date value,
-        TemporalType temporalType);
+    Query setParameter(String name, Date value, TemporalType temporalType);
+
+    Query setParameter(String name, Calendar value, TemporalType temporalType);
+
+    <T> Query setParameter(Parameter<T> param, T value);
 
-    Query setParameter(String name, Calendar value,
-        TemporalType temporalType);
-    
     Query setParameter(int position, Object value);
-    
-    Query setParameter(int position, Date value,
-        TemporalType temporalType);
 
-    Query setParameter(int position, Calendar value,
-        TemporalType temporalType);
+    Query setParameter(int position, Date value,  TemporalType temporalType);
+
+    Query setParameter(int position, Calendar value,  TemporalType temporalType);
 
     Set<Parameter<?>> getParameters();
 
@@ -85,12 +77,6 @@
 
     <T> T getParameterValue(Parameter<T> param);
 
-    <T> ResultItem<T> getResultItem(String alias, Class<T> type);
-
-    <T> ResultItem<T> getResultItem(int position, Class<T> type);
-
-    List<ResultItem<?>> getResultItems();
-
     Query setFlushMode(FlushModeType flushMode);
 
     FlushModeType getFlushMode();

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Tuple.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Tuple.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Tuple.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Tuple.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,42 @@
+/*
+ * 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.util.List;
+
+public interface Tuple {
+
+    <X> X get(TupleElement<X> tupleElement);
+
+    <X> X get(String alias, Class<X> type); 
+
+    <X> X get(int i, Class<X> type);
+
+    Object get(int i);
+
+    Object[] toArray();
+
+    List<TupleElement<?>> getElements();
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Tuple.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TupleElement.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TupleElement.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TupleElement.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TupleElement.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,32 @@
+/*
+ * 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;
+
+public interface TupleElement <X> {
+    
+    Class<X> getJavaType();
+
+    String getAlias();
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TupleElement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TypedQuery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TypedQuery.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TypedQuery.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TypedQuery.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,25 @@
+package javax.persistence;
+
+import java.util.List;
+
+/**
+ * Interface used to control the execution of typed queries.
+ */
+public interface TypedQuery<X> extends Query {
+    
+    List<X> getResultList();
+
+    X getSingleResult();
+
+    TypedQuery<X> setMaxResults(int maxResult);
+
+    TypedQuery<X> setFirstResult(int startPosition);
+
+    TypedQuery<X> setHint(String hintName, Object value);
+
+    <T> TypedQuery<X> setParameter(Parameter<T> param, T value);
+
+    TypedQuery<X> setFlushMode(FlushModeType flushMode);
+
+    TypedQuery<X> setLockMode(LockModeType lockMode);
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TypedQuery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/AbstractQuery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/AbstractQuery.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/AbstractQuery.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/AbstractQuery.java Wed Jun 17 17:30:47 2009
@@ -27,27 +27,30 @@
 
 import java.util.List;
 import java.util.Set;
-import javax.persistence.metamodel.Entity;
 
-public interface AbstractQuery {
+import javax.persistence.metamodel.EntityType;
 
-    <X> Root<X> from(Entity<X> entity);
+public interface AbstractQuery<T> {
+
+    <X> Root<X> from(EntityType<X> entity);
 
     <X> Root<X> from(Class<X> entityClass);
 
     Set<Root<?>> getRoots();
+    
+    AbstractQuery<T> where(Expression<Boolean> restriction);
 
-    AbstractQuery where(Expression<Boolean> restriction);
-
-    AbstractQuery where(Predicate... restrictions);
+    AbstractQuery<T> where(Predicate... restrictions);
 
-    AbstractQuery groupBy(Expression<?>... grouping);
+    AbstractQuery<T> groupBy(Expression<?>... grouping);
 
-    AbstractQuery having(Expression<Boolean> restriction);
+    AbstractQuery<T> having(Expression<Boolean> restriction);
 
-    AbstractQuery having(Predicate... restrictions);
+    AbstractQuery<T> having(Predicate... restrictions);
 
-    AbstractQuery distinct(boolean distinct);
+    AbstractQuery<T> distinct(boolean distinct);
+ 
+    Selection<T> getSelection();
 
     List<Expression<?>> getGroupList();
 
@@ -56,6 +59,6 @@
     Predicate getGroupRestriction();
 
     boolean isDistinct();
-
-    <U> Subquery<U> subquery(Class<U> type);
+    
+    <U> Subquery<U> subquery(Class<U> type);    
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CollectionJoin.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CollectionJoin.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CollectionJoin.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CollectionJoin.java Wed Jun 17 17:30:47 2009
@@ -26,9 +26,10 @@
 package javax.persistence.criteria;
 
 import java.util.Collection;
+import javax.persistence.metamodel.CollectionAttribute;
 
-public interface CollectionJoin<Z, E>
-    extends AbstractCollectionJoin<Z, Collection<E>, E> {
+public interface CollectionJoin<Z, E> 
+        extends PluralJoin<Z, Collection<E>, E> {
 
-    javax.persistence.metamodel.Collection<? super Z, E> getModel();
+    CollectionAttribute<? super Z, E> getModel();
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CriteriaQuery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CriteriaQuery.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CriteriaQuery.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/CriteriaQuery.java Wed Jun 17 17:30:47 2009
@@ -22,35 +22,34 @@
 // Community Process. In order to remain compliant with the specification
 // DO NOT add / change / or delete method signatures!
 //
-
 package javax.persistence.criteria;
 
 import java.util.List;
 import java.util.Set;
-import javax.persistence.Parameter;
-
-public interface CriteriaQuery extends AbstractQuery {
 
-    CriteriaQuery select(Selection<?>... selections);
+public interface CriteriaQuery<T> extends AbstractQuery<T> {
     
-    //override the return type only:
+    CriteriaQuery<T> select(Selection<T> selection);
 
-    CriteriaQuery where(Expression<Boolean> restriction);
+    CriteriaQuery<T> multiselect(Selection<?>... selections);
 
-    CriteriaQuery where(Predicate... restrictions);
+    CriteriaQuery<T> where(Expression<Boolean> restriction);
 
-    CriteriaQuery groupBy(Expression<?>... grouping);
+    CriteriaQuery<T> where(Predicate... restrictions);
 
-    CriteriaQuery having(Expression<Boolean> restriction);
+    CriteriaQuery<T> groupBy(Expression<?>... grouping);
 
-    CriteriaQuery having(Predicate... restrictions);
+    CriteriaQuery<T> having(Expression<Boolean> restriction);
 
-    CriteriaQuery orderBy(Order... o);
+    CriteriaQuery<T> having(Predicate... restrictions);
 
-    CriteriaQuery distinct(boolean distinct);
+    CriteriaQuery<T> orderBy(Order... o);
 
+    CriteriaQuery<T> distinct(boolean distinct);
+ 
     List<Selection<?>> getSelectionList();
-
+    
     List<Order> getOrderList();
-    Set<Parameter<?>> getParameters();
-}
+ 
+    Set<ParameterExpression<?>> getParameters();
+}
\ No newline at end of file

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Expression.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Expression.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Expression.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Expression.java Wed Jun 17 17:30:47 2009
@@ -22,12 +22,11 @@
 // Community Process. In order to remain compliant with the specification
 // DO NOT add / change / or delete method signatures!
 //
-
 package javax.persistence.criteria;
 
-public interface Expression<T> extends Selection<T> {
+import java.util.Collection;
 
-    Class<T> getJavaType();
+public interface Expression<T> extends Selection<T> {
 
     Predicate isNull();
 
@@ -35,5 +34,11 @@
 
     Predicate in(Object... values);
 
+    Predicate in(Expression<?>... values);
+
+    Predicate in(Collection<?> values);
+
+    Predicate in(Expression<Collection<?>> values);
+
     <X> Expression<X> as(Class<X> type);
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Fetch.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Fetch.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Fetch.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Fetch.java Wed Jun 17 17:30:47 2009
@@ -25,11 +25,11 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.metamodel.Member;
+import javax.persistence.metamodel.Attribute;
 
 public interface Fetch<Z, X> extends FetchParent<Z, X> {
 
-    Member<? extends Z, X> getMember();
+    Attribute<? extends Z, X> getAttribute();
 
     FetchParent<?, Z> getParent();
 

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/FetchParent.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/FetchParent.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/FetchParent.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/FetchParent.java Wed Jun 17 17:30:47 2009
@@ -25,25 +25,24 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.metamodel.AbstractCollection;
-import javax.persistence.metamodel.Attribute;
+import javax.persistence.metamodel.PluralAttribute;
+import javax.persistence.metamodel.SingularAttribute;
 
 public interface FetchParent<Z, X> {
 
     java.util.Set<Fetch<X, ?>> getFetches();
 
-    <Y> Fetch<X, Y> fetch(Attribute<? super X, Y> assoc);
+    <Y> Fetch<X, Y> fetch(SingularAttribute<? super X, Y> attribute);
 
-    <Y> Fetch<X, Y> fetch(Attribute<? super X, Y> assoc, JoinType jt);
-
-    <Y> Fetch<X, Y> fetch(AbstractCollection<? super X, ?, Y> assoc);
-
-    <Y> Fetch<X, Y> fetch(AbstractCollection<? super X, ?, Y> assoc,
-        JoinType jt);
+    <Y> Fetch<X, Y> fetch(SingularAttribute<? super X, Y> attribute, JoinType jt);
 
+    <Y> Fetch<X, Y> fetch(PluralAttribute<? super X, ?, Y> attribute);
+    
+    <Y> Fetch<X, Y> fetch(PluralAttribute<? super X, ?, Y> attribute, JoinType jt);
+    
     //String-based:
+    
+    <Y> Fetch<X, Y> fetch(String attributeName);
 
-    <Y> Fetch<X, Y> fetch(String assocName);
-
-    <Y> Fetch<X, Y> fetch(String assocName, JoinType jt);
+    <Y> Fetch<X, Y> fetch(String attributeName, JoinType jt);
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/From.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/From.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/From.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/From.java Wed Jun 17 17:30:47 2009
@@ -25,57 +25,55 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.metamodel.Attribute;
-import javax.persistence.metamodel.Collection;
-import javax.persistence.metamodel.List;
-import javax.persistence.metamodel.Map;
-import javax.persistence.metamodel.Set;
+import javax.persistence.metamodel.SingularAttribute;
+import javax.persistence.metamodel.CollectionAttribute;
+import javax.persistence.metamodel.ListAttribute;
+import javax.persistence.metamodel.MapAttribute;
+import javax.persistence.metamodel.SetAttribute;
 
 public interface From<Z, X> extends Path<X>, FetchParent<Z, X> {
 
     java.util.Set<Join<X, ?>> getJoins();
+    
+    <Y> Join<X, Y> join(SingularAttribute<? super X, Y> attribute);
 
-    <Y> Join<X, Y> join(Attribute<? super X, Y> attribute);
+    <Y> Join<X, Y> join(SingularAttribute<? super X, Y> attribute, JoinType jt);
 
-    <Y> Join<X, Y> join(Attribute<? super X, Y> attribute, JoinType jt);
+    <Y> CollectionJoin<X, Y> join(CollectionAttribute<? super X, Y> collection);
 
-    <Y> CollectionJoin<X, Y> join(Collection<? super X, Y> collection);
+    <Y> SetJoin<X, Y> join(SetAttribute<? super X, Y> set);
 
-    <Y> SetJoin<X, Y> join(Set<? super X, Y> set);
+    <Y> ListJoin<X, Y> join(ListAttribute<? super X, Y> list);
 
-    <Y> ListJoin<X, Y> join(List<? super X, Y> list);
+    <K, V> MapJoin<X, K, V> join(MapAttribute<? super X, K, V> map);
 
-    <K, V> MapJoin<X, K, V> join(Map<? super X, K, V> map);
+    <Y> CollectionJoin<X, Y> join(CollectionAttribute<? super X, Y> collection, JoinType jt);
 
-    <Y> CollectionJoin<X, Y> join(Collection<? super X, Y> collection,
-        JoinType jt);
+    <Y> SetJoin<X, Y> join(SetAttribute<? super X, Y> set, JoinType jt);
 
-    <Y> SetJoin<X, Y> join(Set<? super X, Y> set, JoinType jt);
-
-    <Y> ListJoin<X, Y> join(List<? super X, Y> list, JoinType jt);
-
-    <K, V> MapJoin<X, K, V> join(Map<? super X, K, V> map, JoinType jt);
+    <Y> ListJoin<X, Y> join(ListAttribute<? super X, Y> list, JoinType jt);
 
+    <K, V> MapJoin<X, K, V> join(MapAttribute<? super X, K, V> map, JoinType jt);
+    
     //String-based:
 
-    <W, Y> Join<W, Y> join(String attributeName);
+    <X, Y> Join<X, Y> join(String attributeName);   
 
-    <W, Y> CollectionJoin<W, Y> joinCollection(String attributeName);
+    <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName);   
 
-    <W, Y> SetJoin<W, Y> joinSet(String attributeName);
+    <X, Y> SetJoin<X, Y> joinSet(String attributeName); 
 
-    <W, Y> ListJoin<W, Y> joinList(String attributeName);
+    <X, Y> ListJoin<X, Y> joinList(String attributeName);       
 
-    <W, K, V> MapJoin<W, K, V> joinMap(String attributeName);
+    <X, K, V> MapJoin<X, K, V> joinMap(String attributeName);   
 
-    <W, Y> Join<W, Y> join(String attributeName, JoinType jt);
+    <X, Y> Join<X, Y> join(String attributeName, JoinType jt);  
 
-    <W, Y> CollectionJoin<W, Y> joinCollection(String attributeName,
-        JoinType jt);
+    <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName, JoinType jt);  
 
-    <W, Y> SetJoin<W, Y> joinSet(String attributeName, JoinType jt);
+    <X, Y> SetJoin<X, Y> joinSet(String attributeName, JoinType jt);    
 
-    <W, Y> ListJoin<W, Y> joinList(String attributeName, JoinType jt);
+    <X, Y> ListJoin<X, Y> joinList(String attributeName, JoinType jt);  
 
-    <W, K, V> MapJoin<W, K, V> joinMap(String attributeName, JoinType jt);
+    <X, K, V> MapJoin<X, K, V> joinMap(String attributeName, JoinType jt);  
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Join.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Join.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Join.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Join.java Wed Jun 17 17:30:47 2009
@@ -25,11 +25,11 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.metamodel.Member;
+import javax.persistence.metamodel.Attribute;
 
 public interface Join<Z, X> extends From<Z, X> {
 
-    Member<? extends Z, X> getMember();
+    Attribute<? super Z, ?> getAttribute();
 
     From<?, Z> getParent();
 

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ListJoin.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ListJoin.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ListJoin.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ListJoin.java Wed Jun 17 17:30:47 2009
@@ -26,11 +26,12 @@
 package javax.persistence.criteria;
 
 import java.util.List;
+import javax.persistence.metamodel.ListAttribute;
 
-public interface ListJoin<Z, E>
-    extends AbstractCollectionJoin<Z, List<E>, E> {
+public interface ListJoin<Z, E> 
+        extends PluralJoin<Z, List<E>, E> {
 
-    javax.persistence.metamodel.List<? super Z, E> getModel();
+    ListAttribute<? super Z, E> getModel();
 
     Expression<Integer> index();
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/MapJoin.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/MapJoin.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/MapJoin.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/MapJoin.java Wed Jun 17 17:30:47 2009
@@ -26,19 +26,20 @@
 package javax.persistence.criteria;
 
 import java.util.Map;
+import javax.persistence.metamodel.MapAttribute;
 
-public interface MapJoin<Z, K, V>
-    extends AbstractCollectionJoin<Z, Map<K, V>, V> {
-
-    javax.persistence.metamodel.Map<? super Z, K, V> getModel();
+public interface MapJoin<Z, K, V> 
+        extends PluralJoin<Z, Map<K, V>, V> {
 
+    MapAttribute<? super Z, K, V> getModel();
+    
     Join<Map<K, V>, K> joinKey();
 
     Join<Map<K, V>, K> joinKey(JoinType jt);
-
+    
     Path<K> key();
-
-    Path<V> value(); //Unnecessary - just returns this
-
+    
+    Path<V> value(); 
+    
     Expression<Map.Entry<K, V>> entry();
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Order.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Order.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Order.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Order.java Wed Jun 17 17:30:47 2009
@@ -27,9 +27,9 @@
 
 public interface Order {
 
-    void reverse();
+    Order reverse();
 
     boolean isAscending();
 
-    <T extends Comparable<T>> Expression<T> getExpression();
+   <T extends Comparable<T>> Expression<T> getExpression();
 }

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ParameterExpression.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ParameterExpression.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ParameterExpression.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ParameterExpression.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,30 @@
+/*
+ * 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.criteria;
+
+import javax.persistence.Parameter;
+
+public interface ParameterExpression<T> extends Parameter<T>, Expression<T> {    
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/ParameterExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Path.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Path.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Path.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Path.java Wed Jun 17 17:30:47 2009
@@ -25,27 +25,27 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.metamodel.AbstractCollection;
-import javax.persistence.metamodel.Attribute;
+import javax.persistence.metamodel.PluralAttribute;
+import javax.persistence.metamodel.SingularAttribute;
 import javax.persistence.metamodel.Bindable;
-import javax.persistence.metamodel.Map;
+import javax.persistence.metamodel.MapAttribute;
 
 public interface Path<X> extends Expression<X> {
 
-    Bindable<X> getModel();
-
+    Bindable<X> getModel(); 
+    
     Path<?> getParentPath();
+    
+    <Y> Path<Y> get(SingularAttribute<? super X, Y> attribute);
 
-    <Y> Path<Y> get(Attribute<? super X, Y> model);
-
-    <E, C extends java.util.Collection<E>> Expression<C>
-        get(AbstractCollection<X, C, E> collection);
+    <E, C extends java.util.Collection<E>> Expression<C> get(PluralAttribute<X, C, E> collection);
 
-    <K, V, M extends java.util.Map<K, V>> Expression<M> 
-        get(Map<X, K, V> collection);
+    <K, V, M extends java.util.Map<K, V>> Expression<M> get(MapAttribute<X, K, V> map);
 
     Expression<Class<? extends X>> type();
     
     //String-based:
-    <Y> Path<Y> get(String attName);
+    
+    <Y> Path<Y> get(String attributeName);
 }
+

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/PluralJoin.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/PluralJoin.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/PluralJoin.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/PluralJoin.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.criteria;
+
+import javax.persistence.metamodel.PluralAttribute;
+
+public interface PluralJoin<Z, C, E> extends Join<Z, E> {
+
+    PluralAttribute<? super Z, C, E> getModel();
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/PluralJoin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Predicate.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Predicate.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Predicate.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Predicate.java Wed Jun 17 17:30:47 2009
@@ -28,18 +28,18 @@
 import java.util.List;
 
 public interface Predicate extends Expression<Boolean> {
-
+    
     public static enum BooleanOperator {
         AND, OR
     }
-
+    
     BooleanOperator getOperator();
-
+    
     boolean isNegated();
 
     List<Expression<Boolean>> getExpressions();
-
-    Predicate add(Expression<Boolean> s);
-
+    
+    Predicate add(Expression<Boolean> exp);
+    
     Predicate negate();
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java Wed Jun 17 17:30:47 2009
@@ -30,120 +30,124 @@
 import java.util.Collection;
 import java.util.Map;
 import java.util.Set;
-import javax.persistence.Parameter;
+import javax.persistence.Tuple;
 
 public interface QueryBuilder {
 
-    CriteriaQuery create();
+    CriteriaQuery<Object> createQuery();
+
+    <T> CriteriaQuery<T> createQuery(Class<T> resultClass);
+
+    CriteriaQuery<Tuple> createTupleQuery();
+
+    
     //select new Foo(...) equivalent:
 
-    <Y> Selection<Y> select(Class<Y> result, Selection<?>... selections);
-    //ordering:
+    <Y> Selection<Y> construct(Class<Y> result, Selection<?>... selections);
 
-    Order asc(Expression<?> x);
 
-    Order desc(Expression<?> x);
 
-  //aggregate functions:
+    //ordering:
+    
+    Order asc(Expression<?> x);
 
+    Order desc(Expression<?> x);
+    
+    //aggregate functions:
+    
     <N extends Number> Expression<Double> avg(Expression<N> x);
 
     <N extends Number> Expression<N> sum(Expression<N> x);
-
+    
     <N extends Number> Expression<N> max(Expression<N> x);
-
+    
     <N extends Number> Expression<N> min(Expression<N> x);
 
     <X extends Comparable<X>> Expression<X> greatest(Expression<X> x);
-
+    
     <X extends Comparable<X>> Expression<X> least(Expression<X> x);
 
     Expression<Long> count(Expression<?> x);
 
     Expression<Long> countDistinct(Expression<?> x);
-    //subqueries:
 
+    //subqueries:
+    
     Predicate exists(Subquery<?> subquery);
-
+    
     <Y> Expression<Y> all(Subquery<Y> subquery);
-
+    
     <Y> Expression<Y> some(Subquery<Y> subquery);
-
+    
     <Y> Expression<Y> any(Subquery<Y> subquery);
-    //boolean functions:
 
+
+    //boolean functions:
+    
     Predicate and(Expression<Boolean> x, Expression<Boolean> y);
 
     Predicate or(Expression<Boolean> x, Expression<Boolean> y);
-
+    
     Predicate and(Predicate... restrictions);
 
     Predicate or(Predicate... restrictions);
 
     Predicate not(Expression<Boolean> restriction);
-
+    
     Predicate conjunction();
 
     Predicate disjunction();
+
+    
     //turn Expression<Boolean> into a Predicate
-    //useful for use with varargs methods
+    //useful for use with varargs methods   
+
     Predicate isTrue(Expression<Boolean> x);
-    
+
     Predicate isFalse(Expression<Boolean> x);
+    
     //equality:
-
+    
     Predicate equal(Expression<?> x, Expression<?> y);
 
     Predicate notEqual(Expression<?> x, Expression<?> y);
-
+    
     Predicate equal(Expression<?> x, Object y);
-
+    
     Predicate notEqual(Expression<?> x, Object y);
     
     //comparisons for generic (non-numeric) operands:
-    <Y extends Comparable<Y>> Predicate greaterThan(
-        Expression<? extends Y> x, Expression<? extends Y> y);
 
-    <Y extends Comparable<Y>> Predicate lessThan(
-        Expression<? extends Y> x, Expression<? extends Y> y);
+    <Y extends Comparable<Y>> Predicate greaterThan(Expression<? extends Y> x, Expression<? extends Y> y);
 
-    <Y extends Comparable<Y>> Predicate greaterThanOrEqualTo(
-        Expression<? extends Y> x, Expression<? extends Y> y);
+    <Y extends Comparable<Y>> Predicate lessThan(Expression<? extends Y> x, Expression<? extends Y> y);
     
-    <Y extends Comparable<Y>> Predicate lessThanOrEqualTo(
-        Expression<? extends Y> x, Expression<? extends Y> y);
+    <Y extends Comparable<Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y);
+    
+    <Y extends Comparable<Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y);
 
-    <Y extends Comparable<Y>> Predicate between(
-        Expression<? extends Y> v, Expression<? extends Y> x, 
-        Expression<? extends Y> y);
+    <Y extends Comparable<Y>> Predicate between(Expression<? extends Y> v, Expression<? extends Y> x, Expression<? extends Y> y);
+    
+    <Y extends Comparable<Y>> Predicate greaterThan(Expression<? extends Y> x, Y y);
 
-    <Y extends Comparable<Y>> Predicate greaterThan(
-        Expression<? extends Y> x, Y y);
+    <Y extends Comparable<Y>> Predicate lessThan(Expression<? extends Y> x, Y y);
 
-    <Y extends Comparable<Y>> Predicate lessThan(
-        Expression<? extends Y> x, Y y);
+    <Y extends Comparable<Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Y y);
 
-    <Y extends Comparable<Y>> Predicate greaterThanOrEqualTo(
-        Expression<? extends Y> x, Y y);
+    <Y extends Comparable<Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Y y);
 
-    <Y extends Comparable<Y>> Predicate lessThanOrEqualTo(
-        Expression<? extends Y> x, Y y);
-    
-    <Y extends Comparable<Y>> Predicate between(
-        Expression<? extends Y> v, Y x, Y y);
+    <Y extends Comparable<Y>> Predicate between(Expression<? extends Y> v, Y x, Y y);
     
+
     //comparisons for numeric operands:
-    Predicate gt(Expression<? extends Number> x, 
-        Expression<? extends Number> y);
+    
+    Predicate gt(Expression<? extends Number> x, Expression<? extends Number> y);
 
-    Predicate lt(Expression<? extends Number> x, 
-        Expression<? extends Number> y);
+    Predicate lt(Expression<? extends Number> x, Expression<? extends Number> y);
 
-    Predicate ge(Expression<? extends Number> x, 
-        Expression<? extends Number> y);
+    Predicate ge(Expression<? extends Number> x, Expression<? extends Number> y);
 
-    Predicate le(Expression<? extends Number> x, 
-        Expression<? extends Number> y);
+    Predicate le(Expression<? extends Number> x, Expression<? extends Number> y);
 
     Predicate gt(Expression<? extends Number> x, Number y);
 
@@ -152,21 +156,20 @@
     Predicate ge(Expression<? extends Number> x, Number y);
 
     Predicate le(Expression<? extends Number> x, Number y);
-    //numerical operations:
+    
 
+    //numerical operations:
+    
     <N extends Number> Expression<N> neg(Expression<N> x);
 
     <N extends Number> Expression<N> abs(Expression<N> x);
+    
+    <N extends Number> Expression<N> sum(Expression<? extends N> x, Expression<? extends N> y);
 
-    <N extends Number> Expression<N> sum(Expression<? extends N> x,
-        Expression<? extends N> y);
-
-    <N extends Number> Expression<N> prod(Expression<? extends N> x,
-        Expression<? extends N> y);
-
-    <N extends Number> Expression<N> diff(Expression<? extends N> x,
-        Expression<? extends N> y);
+    <N extends Number> Expression<N> prod(Expression<? extends N> x, Expression<? extends N> y);
 
+    <N extends Number> Expression<N> diff(Expression<? extends N> x, Expression<? extends N> y);
+    
     <N extends Number> Expression<N> sum(Expression<? extends N> x, N y);
 
     <N extends Number> Expression<N> prod(Expression<? extends N> x, N y);
@@ -178,23 +181,24 @@
     <N extends Number> Expression<N> prod(N x, Expression<? extends N> y);
 
     <N extends Number> Expression<N> diff(N x, Expression<? extends N> y);
-
-    Expression<Number> quot(Expression<? extends Number> x, 
-        Expression<? extends Number> y);
+    
+    Expression<Number> quot(Expression<? extends Number> x, Expression<? extends Number> y);
 
     Expression<Number> quot(Expression<? extends Number> x, Number y);
 
     Expression<Number> quot(Number x, Expression<? extends Number> y);
-
+    
     Expression<Integer> mod(Expression<Integer> x, Expression<Integer> y);
-
+    
     Expression<Integer> mod(Expression<Integer> x, Integer y);
 
     Expression<Integer> mod(Integer x, Expression<Integer> y);
 
     Expression<Double> sqrt(Expression<? extends Number> x);
 
+    
     //typecasts:
+    
     Expression<Long> toLong(Expression<? extends Number> number);
 
     Expression<Integer> toInteger(Expression<? extends Number> number);
@@ -206,125 +210,111 @@
     Expression<BigDecimal> toBigDecimal(Expression<? extends Number> number);
 
     Expression<BigInteger> toBigInteger(Expression<? extends Number> number);
-
+    
     Expression<String> toString(Expression<Character> character);
+    
     //literals:
 
     <T> Expression<T> literal(T value);
 
     //parameters:
-    <T> Parameter<T> parameter(Class<T> paramClass);
 
-    <T> Parameter<T> parameter(Class<T> paramClass, String name);
+    <T> ParameterExpression<T> parameter(Class<T> paramClass);
+
+    <T> ParameterExpression<T> parameter(Class<T> paramClass, String name);
 
     //collection operations:
+    
     <C extends Collection<?>> Predicate isEmpty(Expression<C> collection);
 
     <C extends Collection<?>> Predicate isNotEmpty(Expression<C> collection);
-
+    
     <C extends Collection<?>> Expression<Integer> size(C collection);
 
-    <C extends java.util.Collection<?>> Expression<Integer>
-        size(Expression<C> collection);
+    <C extends java.util.Collection<?>> Expression<Integer> size(Expression<C> collection);
 
-    <E, C extends Collection<E>> Predicate isMember(E elem, 
-        Expression<C> collection);
-    
-    <E, C extends Collection<E>> Predicate isNotMember(E elem, 
-        Expression<C> collection);
-
-    <E, C extends Collection<E>> Predicate isMember(Expression<E> elem, 
-        Expression<C> collection);
+    <E, C extends Collection<E>> Predicate isMember(E elem, Expression<C> collection);
 
-    <E, C extends Collection<E>> Predicate isNotMember(Expression<E> elem,
-        Expression<C> collection);
+    <E, C extends Collection<E>> Predicate isNotMember(E elem, Expression<C> collection);
+    
+    <E, C extends Collection<E>> Predicate isMember(Expression<E> elem, Expression<C> collection);
 
-    //get the values and keys collections of the Map, which may then
-    //be passed to size(), isMember(), isEmpty(), etc
+    <E, C extends Collection<E>> Predicate isNotMember(Expression<E> elem, Expression<C> collection);
+    
     <V, M extends Map<?, V>> Expression<Collection<V>> values(M map);
 
     <K, M extends Map<K, ?>> Expression<Set<K>> keys(M map);
-    //string functions:
 
+    
+    //string functions:
+    
     Predicate like(Expression<String> x, Expression<String> pattern);
-
-    Predicate like(Expression<String> x, Expression<String> pattern,
-        Expression<Character> escapeChar);
     
-    Predicate like(Expression<String> x, Expression<String> pattern,
-        char escapeChar);
-
+    Predicate like(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar);
+    
+    Predicate like(Expression<String> x, Expression<String> pattern, char escapeChar);
+    
     Predicate like(Expression<String> x, String pattern);
+    
+    Predicate like(Expression<String> x, String pattern, Expression<Character> escapeChar);
 
-    Predicate like(Expression<String> x, String pattern, 
-        Expression<Character> escapeChar);
-
-    Predicate like(Expression<String> x, String pattern, 
-        char escapeChar);
-
+    Predicate like(Expression<String> x, String pattern, char escapeChar);
+    
     Predicate notLike(Expression<String> x, Expression<String> pattern);
 
-    Predicate notLike(Expression<String> x, Expression<String> pattern,
-        Expression<Character> escapeChar);
-
-    Predicate notLike(Expression<String> x, Expression<String> pattern,
-        char escapeChar);
+    Predicate notLike(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar);
 
-    Predicate notLike(Expression<String> x, String pattern);
+    Predicate notLike(Expression<String> x, Expression<String> pattern, char escapeChar);
     
-    Predicate notLike(Expression<String> x, String pattern, 
-        Expression<Character> escapeChar);
+    Predicate notLike(Expression<String> x, String pattern);
 
-    Predicate notLike(Expression<String> x, String pattern, char escapeChar);
+    Predicate notLike(Expression<String> x, String pattern, Expression<Character> escapeChar);
     
-    Expression<String> concat(Expression<String> x, Expression<String> y);
+    Predicate notLike(Expression<String> x, String pattern, char escapeChar);
 
+    Expression<String> concat(Expression<String> x, Expression<String> y);
+    
     Expression<String> concat(Expression<String> x, String y);
 
     Expression<String> concat(String x, Expression<String> y);
-
-    Expression<String> substring(Expression<String> x, 
-        Expression<Integer> from);
-
+    
+    Expression<String> substring(Expression<String> x, Expression<Integer> from);
+    
     Expression<String> substring(Expression<String> x, int from);
 
-    Expression<String> substring(Expression<String> x, 
-        Expression<Integer> from, Expression<Integer> len);
-
+    Expression<String> substring(Expression<String> x, Expression<Integer> from, Expression<Integer> len);
+    
     Expression<String> substring(Expression<String> x, int from, int len);
     
     public static enum Trimspec { LEADING, TRAILING, BOTH }
-
+    
     Expression<String> trim(Expression<String> x);
-
+    
     Expression<String> trim(Trimspec ts, Expression<String> x);
 
     Expression<String> trim(Expression<Character> t, Expression<String> x);
 
-    Expression<String> trim(Trimspec ts, Expression<Character> t,
-        Expression<String> x);
-
+    Expression<String> trim(Trimspec ts, Expression<Character> t, Expression<String> x);
+    
     Expression<String> trim(char t, Expression<String> x);
-
+    
     Expression<String> trim(Trimspec ts, char t, Expression<String> x);
-
+    
     Expression<String> lower(Expression<String> x);
-
+    
     Expression<String> upper(Expression<String> x);
-
+    
     Expression<Integer> length(Expression<String> x);
+        
+    Expression<Integer> locate(Expression<String> x, Expression<String> pattern);
 
-    Expression<Integer> locate(Expression<String> x, 
-        Expression<String> pattern);
-
-    Expression<Integer> locate(Expression<String> x, 
-        Expression<String> pattern, Expression<Integer> from);
-
+    Expression<Integer> locate(Expression<String> x, Expression<String> pattern, Expression<Integer> from);
+    
     Expression<Integer> locate(Expression<String> x, String pattern);
 
-    Expression<Integer> locate(Expression<String> x, String pattern,
-        int from);
+    Expression<Integer> locate(Expression<String> x, String pattern, int from);
     
+
     // Date/time/timestamp functions:
 
     Expression<java.sql.Date> currentDate();
@@ -332,42 +322,46 @@
     Expression<java.sql.Timestamp> currentTimestamp();
 
     Expression<java.sql.Time> currentTime();
+    
 
     //in builders:
-
+    
     public static interface In<T> extends Predicate {
-        
-        Expression<T> getExpression();
 
+        Expression<T> getExpression();
+    
         In<T> value(T value);
 
         In<T> value(Expression<? extends T> value);
     }
-
+    
     <T> In<T> in(Expression<? extends T> expression);
     
     //coalesce, nullif:
-
-    <Y> Expression<Y> coalesce(Expression<? extends Y> x, 
-        Expression<? extends Y> y);
+    
+    <Y> Expression<Y> coalesce(Expression<? extends Y> x, Expression<? extends Y> y);
 
     <Y> Expression<Y> coalesce(Expression<? extends Y> x, Y y);
-
+    
     <Y> Expression<Y> nullif(Expression<Y> x, Expression<?> y);
+
     
     <Y> Expression<Y> nullif(Expression<Y> x, Y y);
 
+
     // coalesce builder:
 
     public static interface Coalesce<T> extends Expression<T> {
 
         Coalesce<T> value(T value);
-        
+
         Coalesce<T> value(Expression<? extends T> value);
     }
     
     <T> Coalesce<T> coalesce();
-  //case builders:
+
+
+    //case builders:
 
     public static interface SimpleCase<C,R> extends Expression<R> {
 
@@ -381,23 +375,23 @@
 
         Expression<R> otherwise(Expression<? extends R> result);
     }
-
-    <C, R> SimpleCase<C,R> selectCase(Expression<? extends C> expression);
     
+    <C, R> SimpleCase<C,R> selectCase(Expression<? extends C> expression);
+
+
     public static interface Case<R> extends Expression<R> {
 
         Case<R> when(Expression<Boolean> condition, R result);
 
-        Case<R> when(Expression<Boolean> condition, 
-            Expression<? extends R> result);
+        Case<R> when(Expression<Boolean> condition, Expression<? extends R> result);
 
         Expression<R> otherwise(R result);
 
         Expression<R> otherwise(Expression<? extends R> result);
     }
-
+    
     <R> Case<R> selectCase();
 
-    <T> Expression<T> function(String name, Class<T> type,
-        Expression<?>... args);
+    <T> Expression<T> function(String name, Class<T> type, Expression<?>... args);
+
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java Wed Jun 17 17:30:47 2009
@@ -25,9 +25,9 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.metamodel.Entity;
+import javax.persistence.metamodel.EntityType;
 
 public interface Root<X> extends From<X, X> {
 
-    Entity<X> getModel();
+    EntityType<X> getModel();
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java Wed Jun 17 17:30:47 2009
@@ -25,9 +25,9 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.ResultItem;
+import javax.persistence.TupleElement;
 
-public interface Selection<X> extends ResultItem<X> {
+public interface Selection<X> extends TupleElement<X> {
 
     void setAlias(String name);
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java Wed Jun 17 17:30:47 2009
@@ -26,9 +26,9 @@
 package javax.persistence.criteria;
 
 import java.util.Set;
+import javax.persistence.metamodel.SetAttribute;
 
-public interface SetJoin<Z, E>
-    extends AbstractCollectionJoin<Z, Set<E>, E> {
-    
-    javax.persistence.metamodel.Set<? super Z, E> getModel();
+public interface SetJoin<Z, E> extends PluralJoin<Z, Set<E>, E> {
+
+    SetAttribute<? super Z, E> getModel();
 }

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java Wed Jun 17 17:30:47 2009
@@ -25,19 +25,12 @@
 
 package javax.persistence.criteria;
 
-import javax.persistence.metamodel.Collection;
-import javax.persistence.metamodel.List;
-import javax.persistence.metamodel.Map;
-import javax.persistence.metamodel.Set;
-
-public interface Subquery<T> extends AbstractQuery, Expression<T> {
-
-    AbstractQuery getParent();
+public interface Subquery<T> extends AbstractQuery<T>, Expression<T> {
 
+    AbstractQuery<?> getParent();
+    
     Subquery<T> select(Expression<T> expression);
-
-    //override the return type only:
-
+    
     Subquery<T> where(Expression<Boolean> restriction);
 
     Subquery<T> where(Predicate... restrictions);
@@ -49,15 +42,14 @@
     Subquery<T> having(Predicate... restrictions);
 
     Subquery<T> distinct(boolean distinct);
-
+    
     Expression<T> getSelection();
-
+    
     <Y> Root<Y> correlate(Root<Y> parentRoot);
 
     <X, Y> Join<X, Y> correlate(Join<X, Y> parentJoin);
 
-    <X, Y> CollectionJoin<X, Y> correlate(
-        CollectionJoin<X, Y> parentCollection);
+    <X, Y> CollectionJoin<X, Y> correlate(CollectionJoin<X, Y> parentCollection);
 
     <X, Y> SetJoin<X, Y> correlate(SetJoin<X, Y> parentSet);
 

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java Wed Jun 17 17:30:47 2009
@@ -25,19 +25,24 @@
 
 package javax.persistence.metamodel;
 
-public interface Attribute<X, T> extends Member<X, T>, Bindable<T> {
+public interface Attribute<X, Y> {
 
-    public static enum Multiplicity {
-        MANY_TO_ONE, ONE_TO_ONE, EMBEDDED, BASIC
+    public static enum PersistentAttributeType {
+        MANY_TO_ONE, ONE_TO_ONE, BASIC, EMBEDDED,
+        MANY_TO_MANY, ONE_TO_MANY, ELEMENT_COLLECTION
     }
 
-    Multiplicity getMultiplicity();
+    String getName();
 
-    boolean isId();
+    PersistentAttributeType getPersistentAttributeType();
 
-    boolean isVersion();
+    ManagedType<X> getDeclaringType();
 
-    boolean isOptional();
+    Class<Y> getJavaType();
 
-    Type<T> getAttributeType();
+    java.lang.reflect.Member getJavaMember();
+
+    boolean isAssociation();
+
+    boolean isCollection();
 }

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/BasicType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/BasicType.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/BasicType.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/BasicType.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.metamodel;
+
+public interface BasicType<X> extends Type<X> {    
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/BasicType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java Wed Jun 17 17:30:47 2009
@@ -26,12 +26,12 @@
 package javax.persistence.metamodel;
 
 public interface Bindable<T> {
- 
-    public static enum BindableType {
-        ATTRIBUTE, COLLECTION, MANAGED_TYPE
+    
+    public static enum BindableType { 
+        SINGULAR_ATTRIBUTE, PLURAL_ATTRIBUTE, ENTITY_TYPE
     }
 
     BindableType getBindableType();
-
-    Class<T> getJavaType();
+    
+    Class<T> getBindableJavaType();
 }

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/CollectionAttribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/CollectionAttribute.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/CollectionAttribute.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/CollectionAttribute.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,31 @@
+/*
+ * 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.metamodel;
+
+public interface CollectionAttribute<X, E> 
+    extends PluralAttribute<X, java.util.Collection<E>, E> {
+    
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/CollectionAttribute.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EmbeddableType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EmbeddableType.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EmbeddableType.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EmbeddableType.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,30 @@
+/*
+ * 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.metamodel;
+
+public interface EmbeddableType<X> extends ManagedType<X> {
+    
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EmbeddableType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EntityType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EntityType.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EntityType.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EntityType.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.metamodel;
+
+public interface EntityType<X> 
+    extends IdentifiableType<X>, Bindable<X>{
+
+    String getName();
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/EntityType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java?rev=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java Wed Jun 17 17:30:47 2009
@@ -22,22 +22,25 @@
 // Community Process. In order to remain compliant with the specification
 // DO NOT add / change / or delete method signatures!
 //
-
 package javax.persistence.metamodel;
 
 public interface IdentifiableType<X> extends ManagedType<X> {
+    
+    <Y> SingularAttribute<? super X, Y> getId(Class<Y> type);
 
-    <Y> Attribute<? super X, Y> getId(Class<Y> type);
+    <Y> SingularAttribute<? super X, Y> getVersion(Class<Y> type);
 
-    <Y> Attribute<? super X, Y> getVersion(Class<Y> type);
+    <Y> SingularAttribute<X, Y> getDeclaredId(Class<Y> type);
 
-    <Y> Attribute<X, Y> getDeclaredId(Class<Y> type);
+    <Y> SingularAttribute<X, Y> getDeclaredVersion(Class<Y> type);
+    
+    IdentifiableType<? super X> getSupertype();
 
-    <Y> Attribute<X, Y> getDeclaredVersion(Class<Y> type);
+    boolean hasSingleIdAttribute();
 
-    IdentifiableType<? super X> getSupertype();
+    boolean hasVersionAttribute();
 
-    boolean hasIdAttribute();
+    java.util.Set<SingularAttribute<? super X, ?>> getIdClassAttributes();
 
     Type<?> getIdType();
 }

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ListAttribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ListAttribute.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ListAttribute.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ListAttribute.java Wed Jun 17 17:30:47 2009
@@ -0,0 +1,31 @@
+/*
+ * 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.metamodel;
+
+public interface ListAttribute<X, E> 
+    extends PluralAttribute<X, java.util.List<E>, E> {
+    
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ListAttribute.java
------------------------------------------------------------------------------
    svn:eol-style = native