openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1683942 - in /openjpa/branches/openjpa_jpa-2.1: ./ openjpa-integration/tck/ openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/ openjpa-jest/ openjpa-persistence-jdbc/src/test/java/org/apache/o...
Date Sat, 06 Jun 2015 19:19:12 GMT
Author: rmannibucau
Date: Sat Jun  6 19:19:11 2015
New Revision: 1683942

URL: http://svn.apache.org/r1683942
Log:
upgrading API (throwing exception for all new methods) to JPA 2.1

Modified:
    openjpa/branches/openjpa_jpa-2.1/openjpa-integration/tck/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider1.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider2.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-jest/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/NonstandardMappingEntity.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaBuilderImpl.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/Joins.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/SubqueryImpl.java
    openjpa/branches/openjpa_jpa-2.1/openjpa-project/assembly.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-project/bin-assembly.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-slice/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-fetch-statistics/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/sqlActionDropSchema/pom.xml
    openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml
    openjpa/branches/openjpa_jpa-2.1/pom.xml
    openjpa/branches/openjpa_jpa-2.1/scripts/mmg.bat

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-integration/tck/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-integration/tck/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-integration/tck/pom.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-integration/tck/pom.xml Sat Jun  6 19:19:11 2015
@@ -458,7 +458,7 @@ databaseName=${db.name}
         <dependencies>
           <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
             <scope>compile</scope>
           </dependency>
           <dependency>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider1.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider1.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider1.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider1.java
Sat Jun  6 19:19:11 2015
@@ -32,6 +32,16 @@ public class DummyProvider1 implements P
         return null;
     }
 
+    @Override
+    public void generateSchema(PersistenceUnitInfo info, Map map) {
+        // no-op
+    }
+
+    @Override
+    public boolean generateSchema(String persistenceUnitName, Map map) {
+        return false;
+    }
+
     public EntityManagerFactory createEntityManagerFactory(String s, Map map) {
         return null;
     }

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider2.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider2.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider2.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/persistence/provider/DummyProvider2.java
Sat Jun  6 19:19:11 2015
@@ -32,6 +32,16 @@ public class DummyProvider2 implements P
         return null;
     }
 
+    @Override
+    public void generateSchema(PersistenceUnitInfo info, Map map) {
+        // no-op
+    }
+
+    @Override
+    public boolean generateSchema(String persistenceUnitName, Map map) {
+        return false;
+    }
+
     public EntityManagerFactory createEntityManagerFactory(String s, Map map) {
         return null;
     }

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-jest/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-jest/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-jest/pom.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-jest/pom.xml Sat Jun  6 19:19:11 2015
@@ -44,7 +44,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.openjpa</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/NonstandardMappingEntity.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/NonstandardMappingEntity.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/NonstandardMappingEntity.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/NonstandardMappingEntity.java
Sat Jun  6 19:19:11 2015
@@ -28,6 +28,8 @@ import javax.persistence.*;
 import org.apache.openjpa.jdbc.meta.strats.*;
 import org.apache.openjpa.persistence.*;
 import org.apache.openjpa.persistence.jdbc.*;
+import org.apache.openjpa.persistence.jdbc.ForeignKey;
+import org.apache.openjpa.persistence.jdbc.Index;
 import org.apache.openjpa.persistence.jdbc.OrderColumn;
 
 

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/pom.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/pom.xml Sat Jun  6 19:19:11 2015
@@ -44,7 +44,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
Sat Jun  6 19:19:11 2015
@@ -25,9 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
-import javax.persistence.Cache;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.PersistenceUnitUtil;
+import javax.persistence.*;
 import javax.persistence.spi.LoadState;
 
 import org.apache.commons.lang.StringUtils;
@@ -150,7 +148,7 @@ public class EntityManagerFactoryImpl
     }
 
     public OpenJPAEntityManagerSPI createEntityManager() {
-        return createEntityManager(null);
+        return createEntityManager((Map) null);
     }
 
     /**
@@ -242,7 +240,17 @@ public class EntityManagerFactoryImpl
         }
         return em;
     }
-    
+
+    @Override
+    public EntityManager createEntityManager(SynchronizationType synchronizationType) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public EntityManager createEntityManager(SynchronizationType synchronizationType, Map
map) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     /**
      * Create a new entity manager around the given broker.
      */
@@ -354,6 +362,24 @@ public class EntityManagerFactoryImpl
         return this;
     }
 
+    @Override
+    public void addNamedQuery(String name, Query query) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> cls) {
+        if (cls.isInstance(this)) {
+            return cls.cast(this);
+        }
+        throw new javax.persistence.PersistenceException(this + " is not a " + cls);
+    }
+
+    @Override
+    public <T> void addNamedEntityGraph(String graphName, EntityGraph<T> entityGraph)
{
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     /**
      * Get the identifier for the specified entity.  If not managed by any
      * of the em's in this PU or not persistence capable, return null.

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
Sat Jun  6 19:19:11 2015
@@ -36,18 +36,23 @@ import java.util.Collection;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.IdentityHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 import javax.persistence.CacheRetrieveMode;
 import javax.persistence.CacheStoreMode;
+import javax.persistence.EntityGraph;
 import javax.persistence.EntityManager;
 import javax.persistence.FlushModeType;
 import javax.persistence.LockModeType;
 import javax.persistence.PessimisticLockScope;
 import javax.persistence.Query;
+import javax.persistence.StoredProcedureQuery;
 import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaDelete;
 import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.CriteriaUpdate;
 import javax.persistence.criteria.ParameterExpression;
 import javax.persistence.metamodel.Metamodel;
 
@@ -560,6 +565,12 @@ public class EntityManagerImpl
                 ("no-managed-trans"), null, null, false);
     }
 
+    @Override
+    public boolean isJoinedToTransaction() {
+        // throw new UnsupportedOperationException("JPA 2.1");
+        return false;
+    }
+
     public void begin() {
         _broker.begin();
     }
@@ -1066,6 +1077,26 @@ public class EntityManagerImpl
         return newQueryImpl(kernelQuery, null);
     }
 
+    @Override
+    public StoredProcedureQuery createNamedStoredProcedureQuery(String name) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public StoredProcedureQuery createStoredProcedureQuery(String procedureName) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public StoredProcedureQuery createStoredProcedureQuery(String procedureName, Class...
resultClasses) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public StoredProcedureQuery createStoredProcedureQuery(String procedureName, String...
resultSetMappings) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     protected <T> QueryImpl<T> newQueryImpl(org.apache.openjpa.kernel.Query kernelQuery,
QueryMetaData qmd) {
         return new QueryImpl<T>(this, _ret, kernelQuery, qmd);
     }
@@ -1622,7 +1653,17 @@ public class EntityManagerImpl
         }
         return facadeQuery;
     }
-    
+
+    @Override
+    public Query createQuery(CriteriaUpdate updateQuery) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public Query createQuery(CriteriaDelete deleteQuery) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     public OpenJPAQuery createDynamicQuery(
         org.apache.openjpa.persistence.query.QueryDefinition qdef) {
         String jpql = _emf.getDynamicQueryBuilder().toJPQL(qdef);
@@ -1779,6 +1820,26 @@ public class EntityManagerImpl
         return _emf.getMetamodel();
     }
 
+    @Override
+    public <T> EntityGraph<T> createEntityGraph(Class<T> rootType) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public EntityGraph<?> createEntityGraph(String graphName) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public EntityGraph<?>   getEntityGraph(String graphName) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <T> List<EntityGraph<? super T>> getEntityGraphs(Class<T>
entityClass) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     /**
      * Sets the given property to the given value, reflectively.
      * 

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
Sat Jun  6 19:19:11 2015
@@ -220,6 +220,16 @@ public class PersistenceProviderImpl
         }
     }
 
+    @Override
+    public void generateSchema(PersistenceUnitInfo info, Map map) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public boolean generateSchema(String persistenceUnitName, Map map) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     public void setPersistenceEnvironmentInfo(OpenJPAConfiguration conf, PersistenceUnitInfo
pui) {
         // OPENJPA-1460 Fix scope visibility of orm.xml when it is packaged in both ear file
and war file
         if (conf instanceof OpenJPAConfigurationImpl) {

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
Sat Jun  6 19:19:11 2015
@@ -129,7 +129,15 @@ public class StoreCacheImpl
     public void evictAll() {
         _cache.clear();
     }
-    
+
+    @Override
+    public <T> T unwrap(Class<T> cls) {
+        if (cls.isInstance(this)) {
+            return cls.cast(this);
+        }
+        throw new javax.persistence.PersistenceException(cls.getName() + " not supported");
+    }
+
     public CacheStatistics getStatistics() {
     	return (_cache == null) ? null : _cache.getStatistics();
     }

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaBuilderImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaBuilderImpl.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaBuilderImpl.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaBuilderImpl.java
Sat Jun  6 19:19:11 2015
@@ -29,13 +29,22 @@ import java.util.Map;
 import java.util.Set;
 
 import javax.persistence.Tuple;
+import javax.persistence.criteria.CollectionJoin;
 import javax.persistence.criteria.CompoundSelection;
+import javax.persistence.criteria.CriteriaDelete;
+import javax.persistence.criteria.CriteriaUpdate;
 import javax.persistence.criteria.Expression;
 import javax.persistence.criteria.From;
+import javax.persistence.criteria.Join;
+import javax.persistence.criteria.ListJoin;
+import javax.persistence.criteria.MapJoin;
 import javax.persistence.criteria.Order;
 import javax.persistence.criteria.ParameterExpression;
+import javax.persistence.criteria.Path;
 import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
 import javax.persistence.criteria.Selection;
+import javax.persistence.criteria.SetJoin;
 import javax.persistence.criteria.Subquery;
 import javax.persistence.criteria.Predicate.BooleanOperator;
 import javax.persistence.metamodel.Attribute;
@@ -108,6 +117,16 @@ public class CriteriaBuilderImpl impleme
         return new CriteriaQueryImpl<Tuple>(_model, Tuple.class);
     }
 
+    @Override
+    public <T> CriteriaUpdate<T> createCriteriaUpdate(Class<T> targetEntity)
{
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <T> CriteriaDelete<T> createCriteriaDelete(Class<T> targetEntity)
{
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     public Object parse(String ql, ExpressionStoreQuery query) {
         throw new AbstractMethodError();
     }
@@ -252,6 +271,41 @@ public class CriteriaBuilderImpl impleme
         return new Expressions.DatabaseFunction(name, type, args);
     }
 
+    @Override
+    public <X, T, V extends T> Join<X, V> treat(Join<X, T> join, Class<V>
type) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <X, T, E extends T> CollectionJoin<X, E> treat(CollectionJoin<X,
T> join, Class<E> type) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <X, T, E extends T> SetJoin<X, E> treat(SetJoin<X, T> join,
Class<E> type) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <X, T, E extends T> ListJoin<X, E> treat(ListJoin<X, T> join,
Class<E> type) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <X, K, T, V extends T> MapJoin<X, K, V> treat(MapJoin<X, K, T>
join, Class<V> type) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <X, T extends X> Path<T> treat(Path<X> path, Class<T>
type) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
+    @Override
+    public <X, T extends X> Root<T> treat(Root<X> root, Class<T>
type) {
+        throw new UnsupportedOperationException("JPA 2.1");
+    }
+
     public Predicate ge(Expression<? extends Number> x,
         Expression<? extends Number> y) {
         return new Expressions.GreaterThanEqual(x,y);

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/Joins.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/Joins.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/Joins.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/Joins.java
Sat Jun  6 19:19:11 2015
@@ -29,6 +29,7 @@ import javax.persistence.criteria.ListJo
 import javax.persistence.criteria.MapJoin;
 import javax.persistence.criteria.Path;
 import javax.persistence.criteria.PluralJoin;
+import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.SetJoin;
 import javax.persistence.metamodel.Attribute;
 import javax.persistence.metamodel.CollectionAttribute;
@@ -138,7 +139,22 @@ abstract class Joins {
         public Member<? extends Z, X> getMember() {
             return (Member<? extends Z, X>) _member;
         }
-        
+
+        @Override
+        public Join<Z, X> on(Expression<Boolean> restriction) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public Join<Z, X> on(Predicate... restrictions) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public Predicate getOn() {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
         /**
          * Return the metamodel attribute corresponding to the join.
          * @return metamodel attribute type corresponding to the join
@@ -495,7 +511,22 @@ abstract class Joins {
         public Collection(FromImpl<?,Z> parent, Members.CollectionAttributeImpl<?
super Z, E> member, JoinType jt) {
             super(parent, member, jt);
         }
-        
+
+        @Override
+        public CollectionJoin<Z, E> on(Expression<Boolean> restriction) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public CollectionJoin<Z, E> on(Predicate... restrictions) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public Predicate getOn() {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
         public CollectionAttribute<? super Z, E> getModel() {
             return (CollectionAttribute<? super Z, E>)_member;
         }
@@ -512,7 +543,22 @@ abstract class Joins {
         public Set(FromImpl<?,Z> parent, Members.SetAttributeImpl<? super Z, E>
member, JoinType jt) {
             super(parent, member, jt);
         }
-        
+
+        @Override
+        public SetJoin<Z, E> on(Expression<Boolean> restriction) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public SetJoin<Z, E> on(Predicate... restrictions) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public Predicate getOn() {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
         public SetAttribute<? super Z, E> getModel() {
             return (SetAttribute<? super Z, E>)_member;
         }
@@ -531,7 +577,22 @@ abstract class Joins {
         public List(FromImpl<?,Z> parent, Members.ListAttributeImpl<? super Z, E>
member, JoinType jt) {
             super(parent, member, jt);
         }
-        
+
+        @Override
+        public ListJoin<Z, E> on(Expression<Boolean> restriction) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public ListJoin<Z, E> on(Predicate... restrictions) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public Predicate getOn() {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
         public ListAttribute<? super Z, E> getModel() {
             return (ListAttribute<? super Z, E>)_member;
         }
@@ -556,7 +617,22 @@ abstract class Joins {
         public Map(FromImpl<?,Z> parent, Members.MapAttributeImpl<? super Z, K,V>
member, JoinType jt) {
             super(parent, member, jt);
         }
-        
+
+        @Override
+        public MapJoin<Z, K, V> on(Expression<Boolean> restriction) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public MapJoin<Z, K, V> on(Predicate... restrictions) {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
+        @Override
+        public Predicate getOn() {
+            throw new UnsupportedOperationException("JPA 2.1");
+        }
+
         public MapAttribute<? super Z, K,V> getModel() {
             return (MapAttribute<? super Z, K,V>) _member;
         }

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/SubqueryImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/SubqueryImpl.java?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/SubqueryImpl.java
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/SubqueryImpl.java
Sat Jun  6 19:19:11 2015
@@ -27,6 +27,7 @@ import java.util.concurrent.CopyOnWriteA
 
 import javax.persistence.criteria.AbstractQuery;
 import javax.persistence.criteria.CollectionJoin;
+import javax.persistence.criteria.CommonAbstractCriteria;
 import javax.persistence.criteria.Expression;
 import javax.persistence.criteria.Join;
 import javax.persistence.criteria.ListJoin;
@@ -94,7 +95,12 @@ class SubqueryImpl<T> extends Expression
     public AbstractQuery<?> getParent() {
         return _parent;
     }
-    
+
+    @Override
+    public CommonAbstractCriteria getContainingQuery() {
+        return getParent();
+    }
+
     /**
      * Gets the captive query to which this subquery delegates.
      */

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-project/assembly.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-project/assembly.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-project/assembly.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-project/assembly.xml Sat Jun  6 19:19:11 2015
@@ -140,7 +140,7 @@
                 <include>commons-dbcp:commons-dbcp</include>
 
                 <include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
-                <include>org.apache.geronimo.specs:geronimo-jpa_2.0_spec</include>
+                <include>org.apache.geronimo.specs:geronimo-jpa_2.1_spec</include>
                 <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
                 <include>org.apache.geronimo.specs:geronimo-validation_1.0_spec</include>
                 <include>org.apache.bval:org.apache.bval.bundle</include>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-project/bin-assembly.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-project/bin-assembly.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-project/bin-assembly.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-project/bin-assembly.xml Sat Jun  6 19:19:11
2015
@@ -79,7 +79,7 @@
                 <include>commons-dbcp:commons-dbcp</include>
 
                 <include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
-                <include>org.apache.geronimo.specs:geronimo-jpa_2.0_spec</include>
+                <include>org.apache.geronimo.specs:geronimo-jpa_2.1_spec</include>
                 <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
                 <include>org.apache.geronimo.specs:geronimo-validation_1.0_spec</include>
                 <include>org.apache.bval:org.apache.bval.bundle</include>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-slice/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-slice/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-slice/pom.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-slice/pom.xml Sat Jun  6 19:19:11 2015
@@ -49,7 +49,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-fetch-statistics/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-fetch-statistics/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-fetch-statistics/pom.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-fetch-statistics/pom.xml Sat Jun
 6 19:19:11 2015
@@ -30,7 +30,7 @@
 	<dependencies>
 		<dependency>
 			<groupId>org.apache.geronimo.specs</groupId>
-			<artifactId>geronimo-jpa_2.0_spec</artifactId>
+			<artifactId>geronimo-jpa_2.1_spec</artifactId>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/pom.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/pom.xml Sat Jun  6
19:19:11 2015
@@ -109,7 +109,7 @@
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml
Sat Jun  6 19:19:11 2015
@@ -37,7 +37,7 @@
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml
Sat Jun  6 19:19:11 2015
@@ -43,7 +43,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
Sat Jun  6 19:19:11 2015
@@ -36,7 +36,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/sqlActionDropSchema/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/sqlActionDropSchema/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/sqlActionDropSchema/pom.xml
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/sqlActionDropSchema/pom.xml
Sat Jun  6 19:19:11 2015
@@ -36,7 +36,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml
(original)
+++ openjpa/branches/openjpa_jpa-2.1/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml
Sat Jun  6 19:19:11 2015
@@ -36,7 +36,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <artifactId>geronimo-jpa_2.1_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/pom.xml?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/pom.xml (original)
+++ openjpa/branches/openjpa_jpa-2.1/pom.xml Sat Jun  6 19:19:11 2015
@@ -523,8 +523,8 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>
-                <artifactId>geronimo-jpa_2.0_spec</artifactId>
-                <version>1.1</version>
+                <artifactId>geronimo-jpa_2.1_spec</artifactId>
+                <version>1.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>

Modified: openjpa/branches/openjpa_jpa-2.1/scripts/mmg.bat
URL: http://svn.apache.org/viewvc/openjpa/branches/openjpa_jpa-2.1/scripts/mmg.bat?rev=1683942&r1=1683941&r2=1683942&view=diff
==============================================================================
--- openjpa/branches/openjpa_jpa-2.1/scripts/mmg.bat (original)
+++ openjpa/branches/openjpa_jpa-2.1/scripts/mmg.bat Sat Jun  6 19:19:11 2015
@@ -40,7 +40,7 @@ set JAVAC=%JAVA_HOME%\bin\javac
 @rem Compiler classpath shown for a typical OpenJPA development environment in Windows. 
 @rem The essential aspect is openjpa libraries must be in the compiler's classpath.
 set M_REPO="%USERPROFILE%\.m2\repository"
-set SPEC=geronimo-jpa_2.0_spec
+set SPEC=geronimo-jpa_2.1_spec
 set VERSION=1.0-EA9-SNAPSHOT
 set JPA_LIB=%M_REPO%\org\apache\geronimo\specs\%SPEC%\%VERSION%\%SPEC%-%VERSION%.jar
 



Mime
View raw message