cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r431602 - in /incubator/cayenne/main/trunk/core/cayenne-jpa/src: main/java/org/apache/cayenne/jpa/ main/java/org/apache/cayenne/jpa/cspi/ main/java/org/apache/cayenne/jpa/spi/ test/java/org/apache/cayenne/jpa/ test/java/org/apache/cayenne/j...
Date Tue, 15 Aug 2006 13:55:33 GMT
Author: aadamchik
Date: Tue Aug 15 06:55:32 2006
New Revision: 431602

URL: http://svn.apache.org/viewvc?rev=431602&view=rev
Log:
bringing Cayenne provider up to date with the latest G. JPA jar

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/JpaEntityManager.java
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityManager.java
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaPersistenceProvider.java
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/spi/JpaPersistenceProvider.java
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/MockJpaEntityManager.java
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/spi/MockPersistenceProvider.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/JpaEntityManager.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/JpaEntityManager.java?rev=431602&r1=431601&r2=431602&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/JpaEntityManager.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/JpaEntityManager.java
Tue Aug 15 06:55:32 2006
@@ -23,6 +23,7 @@
 import javax.persistence.EntityNotFoundException;
 import javax.persistence.EntityTransaction;
 import javax.persistence.FlushModeType;
+import javax.persistence.LockModeType;
 import javax.persistence.PersistenceContextType;
 import javax.persistence.PersistenceException;
 import javax.persistence.Query;
@@ -55,6 +56,11 @@
         this.factory = factory;
         this.open = true;
     }
+
+    /**
+     * Set the lock mode for an entity object contained in the persistence context.
+     */
+    public abstract void lock(Object entity, LockModeType lockMode);
 
     /**
      * Close an application-managed EntityManager. After an EntityManager has been closed,

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityManager.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityManager.java?rev=431602&r1=431601&r2=431602&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityManager.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityManager.java
Tue Aug 15 06:55:32 2006
@@ -22,6 +22,7 @@
 import java.util.Map;
 
 import javax.persistence.EntityTransaction;
+import javax.persistence.LockModeType;
 import javax.persistence.PersistenceException;
 import javax.persistence.Query;
 
@@ -115,6 +116,11 @@
     @Override
     public void joinTransaction() {
         // TODO: andrus, 7/24/2006 - noop
+    }
+    
+    @Override
+    public void lock(Object entity, LockModeType lockMode) {
+        // TODO: andrus, 8/15/2006 - noop
     }
 
     protected void checkEntityType(Object entity) throws IllegalArgumentException {

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaPersistenceProvider.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaPersistenceProvider.java?rev=431602&r1=431601&r2=431602&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaPersistenceProvider.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaPersistenceProvider.java
Tue Aug 15 06:55:32 2006
@@ -17,7 +17,6 @@
  *  under the License.
  ****************************************************************/
 
-
 package org.apache.cayenne.jpa.cspi;
 
 import java.io.InputStream;
@@ -106,7 +105,7 @@
     @Override
     // TODO: andrus, 07/24/2006 - extract properties from the second map parameter as well
     // as PUI.
-    public synchronized EntityManagerFactory createContainerManagerFactory(
+    public synchronized EntityManagerFactory createContainerEntityManagerFactory(
             PersistenceUnitInfo info,
             Map map) {
         String name = info.getPersistenceUnitName();

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/spi/JpaPersistenceProvider.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/spi/JpaPersistenceProvider.java?rev=431602&r1=431601&r2=431602&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/spi/JpaPersistenceProvider.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/spi/JpaPersistenceProvider.java
Tue Aug 15 06:55:32 2006
@@ -17,7 +17,6 @@
  *  under the License.
  ****************************************************************/
 
-
 package org.apache.cayenne.jpa.spi;
 
 import java.util.Map;
@@ -139,7 +138,7 @@
             return null;
         }
 
-        return createContainerManagerFactory(ui, map);
+        return createContainerEntityManagerFactory(ui, map);
     }
 
     /**
@@ -178,7 +177,7 @@
      * @param map a map of integration=level properties for use by the persistence
      *            provider. May be null if no properties are specified.
      */
-    public abstract EntityManagerFactory createContainerManagerFactory(
+    public abstract EntityManagerFactory createContainerEntityManagerFactory(
             PersistenceUnitInfo info,
             Map map);
 

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/MockJpaEntityManager.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/MockJpaEntityManager.java?rev=431602&r1=431601&r2=431602&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/MockJpaEntityManager.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/MockJpaEntityManager.java
Tue Aug 15 06:55:32 2006
@@ -21,12 +21,17 @@
 package org.apache.cayenne.jpa;
 
 import javax.persistence.EntityTransaction;
+import javax.persistence.LockModeType;
 import javax.persistence.Query;
 
 public class MockJpaEntityManager extends JpaEntityManager {
 
     public MockJpaEntityManager(JpaEntityManagerFactory factory) {
         super(factory);
+    }
+    
+    @Override
+    public void lock(Object entity, LockModeType lockMode) {
     }
     
     @Override

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/spi/MockPersistenceProvider.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/spi/MockPersistenceProvider.java?rev=431602&r1=431601&r2=431602&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/spi/MockPersistenceProvider.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/test/java/org/apache/cayenne/jpa/spi/MockPersistenceProvider.java
Tue Aug 15 06:55:32 2006
@@ -17,7 +17,6 @@
  *  under the License.
  ****************************************************************/
 
-
 package org.apache.cayenne.jpa.spi;
 
 import java.util.Map;
@@ -46,9 +45,9 @@
                 : null;
     }
 
-    public EntityManagerFactory createContainerManagerFactory(
+    public EntityManagerFactory createContainerEntityManagerFactory(
             PersistenceUnitInfo info,
-            Map parameters) {
+            Map map) {
         return unitName != null && unitName.equals(info.getPersistenceUnitName())
                 ? new MockEntityManagerFactory(info.getPersistenceUnitName(), info)
                 : null;



Mime
View raw message