geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r822523 - in /geronimo/server/trunk/plugins/openjpa2: geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/ geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/ openjpa2/src/main/history/ per...
Date Tue, 06 Oct 2009 21:44:40 GMT
Author: dwoods
Date: Tue Oct  6 21:44:39 2009
New Revision: 822523

URL: http://svn.apache.org/viewvc?rev=822523&view=rev
Log:
openjpa2 plugins build, but still have unimplemented methods to finish

Modified:
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/NoTxQueryWrapper.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManager.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManagerFactory.java
    geronimo/server/trunk/plugins/openjpa2/openjpa2/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/openjpa2/persistence-jpa20-deployer/src/main/history/dependencies.xml

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
Tue Oct  6 21:44:39 2009
@@ -18,6 +18,7 @@
 package org.apache.geronimo.persistence;
 
 import java.util.Map;
+import java.util.Set;
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
@@ -25,6 +26,10 @@
 import javax.persistence.FlushModeType;
 import javax.persistence.LockModeType;
 import javax.persistence.Query;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.QueryBuilder;
+import javax.persistence.metamodel.Metamodel;
 
 /**
  * @version $Rev$ $Date$
@@ -45,92 +50,234 @@
         return entityManagerRegistry.getEntityManager(entityManagerFactory, entityManagerProperties);
     }
 
+    @Override
     public void persist(Object o) {
         getEntityManager().persist(o);
     }
 
+    @Override
     public <T>T merge(T t) {
         return getEntityManager().merge(t);
     }
 
+    @Override
     public void remove(Object o) {
         getEntityManager().remove(o);
     }
 
+    @Override
     public <T>T find(Class<T> aClass, Object o) {
         return getEntityManager().find(aClass, o);
     }
 
+    @Override
     public <T>T getReference(Class<T> aClass, Object o) {
         return getEntityManager().getReference(aClass, o);
     }
 
+    @Override
     public void flush() {
         getEntityManager().flush();
     }
 
+    @Override
     public void setFlushMode(FlushModeType flushModeType) {
         getEntityManager().setFlushMode(flushModeType);
     }
 
+    @Override
     public FlushModeType getFlushMode() {
         return getEntityManager().getFlushMode();
     }
 
+    @Override
     public void lock(Object o, LockModeType lockModeType) {
         getEntityManager().lock(o, lockModeType);
     }
 
+    @Override
     public void refresh(Object o) {
         getEntityManager().refresh(o);
     }
 
+    @Override
     public void clear() {
         getEntityManager().clear();
     }
 
+    @Override
     public boolean contains(Object o) {
         return getEntityManager().contains(o);
     }
 
+    @Override
     public Query createQuery(String s) {
         return getEntityManager().createQuery(s);
     }
 
+    @Override
     public Query createNamedQuery(String s) {
         return getEntityManager().createNamedQuery(s);
     }
 
+    @Override
     public Query createNativeQuery(String s) {
         return getEntityManager().createNativeQuery(s);
     }
 
+    @Override
     public Query createNativeQuery(String s, Class aClass) {
         return getEntityManager().createNativeQuery(s, aClass);
     }
 
+    @Override
     public Query createNativeQuery(String s, String s1) {
         return getEntityManager().createNativeQuery(s, s1);
     }
 
+    @Override
     public void close() {
         throw new IllegalStateException("You cannot call close on a Container Managed Entity
Manager");
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public EntityTransaction getTransaction() {
         throw new IllegalStateException("You cannot call getTransaction on a container managed
EntityManager");
     }
 
+    @Override
     public void joinTransaction() {
         throw new IllegalStateException("You cannot call joinTransaction on a container managed
EntityManager");
     }
 
+    @Override
     public Object getDelegate() {
         return getEntityManager().getDelegate();
     }
 
+    /**
+     * JPA2 added methods
+     */
+    @Override
+    public Metamodel getMetamodel() {
+        return getEntityManager().getMetamodel();
+    }
+
+    @Override
+    public QueryBuilder getQueryBuilder() {
+        return getEntityManager().getQueryBuilder();
+    }
+
+    @Override
+    public EntityManagerFactory getEntityManagerFactory() {
+        return getEntityManager().getEntityManagerFactory();
+    }
+
+    @Override
+    public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void detach(Object entity) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        LockModeType lockMode) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        LockModeType lockMode, Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public LockModeType getLockMode(Object entity) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> getProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Set<String> getSupportedProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void lock(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setProperty(String propertyName, Object value) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> cls) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }
+

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
Tue Oct  6 21:44:39 2009
@@ -18,8 +18,11 @@
 package org.apache.geronimo.persistence;
 
 import java.util.Map;
+import java.util.Set;
 
 import javax.persistence.*;
+import javax.persistence.criteria.*;
+import javax.persistence.metamodel.*;
 import javax.persistence.TransactionRequiredException;
 import javax.transaction.*;
 import org.apache.geronimo.transaction.manager.TransactionImpl;
@@ -77,6 +80,7 @@
     }
 
 
+    @Override
     public void persist(Object o) {
         EntityManager entityManager = getEntityManager(true);
         if (entityManager != null) {
@@ -91,6 +95,7 @@
         }
     }
 
+    @Override
     public <T> T merge(T t) {
         EntityManager entityManager = getEntityManager(true);
         if (entityManager != null) {
@@ -105,6 +110,7 @@
         }
     }
 
+    @Override
     public void remove(Object o) {
         EntityManager entityManager = getEntityManager(true);
         if (entityManager != null) {
@@ -119,6 +125,7 @@
         }
     }
 
+    @Override
     public <T> T find(Class<T> aClass, Object o) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -133,6 +140,7 @@
         }
     }
 
+    @Override
     public <T> T getReference(Class<T> aClass, Object o) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -147,6 +155,7 @@
         }
     }
 
+    @Override
     public void flush() {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -161,6 +170,7 @@
         }
     }
 
+    @Override
     public void setFlushMode(FlushModeType flushModeType) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -175,6 +185,7 @@
         }
     }
 
+    @Override
     public FlushModeType getFlushMode() {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -189,6 +200,7 @@
         }
     }
 
+    @Override
     public void lock(Object o, LockModeType lockModeType) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -203,6 +215,7 @@
         }
     }
 
+    @Override
     public void refresh(Object o) {
         EntityManager entityManager = getEntityManager(true);
         if (entityManager != null) {
@@ -217,6 +230,7 @@
         }
     }
 
+    @Override
     public void clear() {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -231,6 +245,7 @@
         }
     }
 
+    @Override
     public boolean contains(Object o) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -245,6 +260,7 @@
         }
     }
 
+    @Override
     public Query createQuery(String s) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -255,6 +271,7 @@
         }
     }
 
+    @Override
     public Query createNamedQuery(String s) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -265,6 +282,7 @@
         }
     }
 
+    @Override
     public Query createNativeQuery(String s) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -275,6 +293,7 @@
         }
     }
 
+    @Override
     public Query createNativeQuery(String s, Class aClass) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -285,6 +304,7 @@
         }
     }
 
+    @Override
     public Query createNativeQuery(String s, String s1) {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -295,22 +315,27 @@
         }
     }
 
+    @Override
     public void close() {
         throw new IllegalStateException("You cannot call close on a Container Managed Entity
Manager");
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public EntityTransaction getTransaction() {
         throw new IllegalStateException("You cannot call getTransaction on a container managed
EntityManager");
     }
 
+    @Override
     public void joinTransaction() {
         throw new IllegalStateException("You cannot call joinTransaction on a container managed
EntityManager");
     }
 
+    @Override
     public Object getDelegate() {
         EntityManager entityManager = getEntityManager(false);
         if (entityManager != null) {
@@ -350,4 +375,143 @@
             close();
         }
     }
+
+    /**
+     * JPA2 added methods
+     */
+    @Override
+    public Metamodel getMetamodel() {
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.getMetamodel();
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.getMetamodel();
+            } finally {
+                entityManager.close();
+            }
+        }
+    }
+
+    @Override
+    public QueryBuilder getQueryBuilder() {
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.getQueryBuilder();
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.getQueryBuilder();
+            } finally {
+                entityManager.close();
+            }
+        }
+    }
+
+    @Override
+    public EntityManagerFactory getEntityManagerFactory() {
+        return entityManagerFactory;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void detach(Object entity) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        LockModeType lockMode) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        LockModeType lockMode, Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public LockModeType getLockMode(Object entity) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> getProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Set<String> getSupportedProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void lock(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setProperty(String propertyName, Object value) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> cls) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
Tue Oct  6 21:44:39 2009
@@ -17,10 +17,14 @@
 
 package org.apache.geronimo.persistence;
 
+import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.ejb.EJBException;
 import javax.persistence.*;
+import javax.persistence.criteria.*;
+import javax.persistence.metamodel.*;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 
 /**
@@ -58,90 +62,112 @@
 
     }
 
+    @Override
     public EntityManager getEntityManager() {
         return entityManager;
     }
 
+    @Override
     public void persist(Object o) {
         entityManager.persist(o);
     }
 
+    @Override
     public <T> T merge(T t) {
         return entityManager.merge(t);
     }
 
+    @Override
     public void remove(Object o) {
         entityManager.remove(o);
     }
 
+    @Override
     public <T> T find(Class<T> aClass, Object o) {
         return entityManager.find(aClass, o);
     }
 
+    @Override
     public <T> T getReference(Class<T> aClass, Object o) {
         return entityManager.getReference(aClass, o);
     }
 
+    @Override
     public void flush() {
         entityManager.flush();
     }
 
+    @Override
     public void setFlushMode(FlushModeType flushModeType) {
         entityManager.setFlushMode(flushModeType);
     }
 
+    @Override
     public FlushModeType getFlushMode() {
         return entityManager.getFlushMode();
     }
 
+    @Override
     public void lock(Object o, LockModeType lockModeType) {
         entityManager.lock(o, lockModeType);
     }
 
+    @Override
     public void refresh(Object o) {
         entityManager.refresh(o);
     }
 
+    @Override
     public void clear() {
         entityManager.clear();
     }
 
+    @Override
     public boolean contains(Object o) {
         return entityManager.contains(o);
     }
 
+    @Override
     public Query createQuery(String s) {
         return entityManager.createQuery(s);
     }
 
+    @Override
     public Query createNamedQuery(String s) {
         return entityManager.createNamedQuery(s);
     }
 
+    @Override
     public Query createNativeQuery(String s) {
         return entityManager.createNativeQuery(s);
     }
 
+    @Override
     public Query createNativeQuery(String s, Class aClass) {
         return entityManager.createNativeQuery(s, aClass);
     }
 
+    @Override
     public Query createNativeQuery(String s, String s1) {
         return entityManager.createNativeQuery(s, s1);
     }
 
+    @Override
     public void close() {
         //a no-op
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public EntityTransaction getTransaction() {
         throw new IllegalStateException("You cannot call getTransaction on a container managed
EntityManager");
     }
 
+    @Override
     public void joinTransaction() {
         //This checks section 5.6.3.1, throwing an EJBException if there is already a PersistenceContext.
         if (transactionManager.getResource(persistenceUnit) != null) {
@@ -151,14 +177,138 @@
         entityManager.joinTransaction();
     }
 
+    @Override
     public Object getDelegate() {
         return entityManager.getDelegate();
     }
 
+    @Override
     public void beforeCompletion() {
     }
 
+    @Override
     public void afterCompletion(int i) {
         //close is a no-op
     }
+
+    /**
+     * JPA2 added methods
+     */
+    @Override
+    public Metamodel getMetamodel() {
+        return entityManager.getMetamodel();
+    }
+
+    @Override
+    public QueryBuilder getQueryBuilder() {
+        return entityManager.getQueryBuilder();
+    }
+
+    @Override
+    public EntityManagerFactory getEntityManagerFactory() {
+        return entityManager.getEntityManagerFactory();
+    }
+
+    @Override
+    public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void detach(Object entity) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        LockModeType lockMode) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey,
+        LockModeType lockMode, Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public LockModeType getLockMode(Object entity) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> getProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Set<String> getSupportedProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void lock(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setProperty(String propertyName, Object value) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> cls) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }
+

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/NoTxQueryWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/NoTxQueryWrapper.java?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/NoTxQueryWrapper.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/NoTxQueryWrapper.java
Tue Oct  6 21:44:39 2009
@@ -19,11 +19,15 @@
 
 import javax.persistence.EntityManager;
 import javax.persistence.FlushModeType;
+import javax.persistence.LockModeType;
+import javax.persistence.Parameter;
 import javax.persistence.Query;
 import javax.persistence.TemporalType;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * The JtaQuery is a wrapper around a query and and entity manager that automatically closes
the entity managers
@@ -111,4 +115,109 @@
         query.setParameter(i, calendar, temporalType);
         return this;
     }
+
+    /**
+     * JPA2 added methods
+     */
+    @Override
+    public <T> T unwrap(Class<T> cls) {
+        return query.unwrap(cls);
+    }
+
+    @Override
+    public int getFirstResult() {
+        return query.getFirstResult();
+    }
+
+    @Override
+    public FlushModeType getFlushMode() {
+        return query.getFlushMode();
+    }
+
+    @Override
+    public Map<String, Object> getHints() {
+        return query.getHints();
+    }
+
+    @Override
+    public LockModeType getLockMode() {
+        return query.getLockMode();
+    }
+
+    @Override
+    public int getMaxResults() {
+        return query.getMaxResults();
+    }
+
+    @Override
+    public Parameter<?> getParameter(String name) {
+        return query.getParameter(name);
+    }
+
+    @Override
+    public Parameter<?> getParameter(int position) {
+        return query.getParameter(position);
+    }
+
+    @Override
+    public <T> Parameter<T> getParameter(String name, Class<T> type) {
+        return query.getParameter(name, type);
+    }
+
+    @Override
+    public <T> Parameter<T> getParameter(int position, Class<T> type) {
+        return query.getParameter(position, type);
+    }
+
+    @Override
+    public <T> T getParameterValue(Parameter<T> param) {
+        return query.getParameterValue(param);
+    }
+
+    @Override
+    public Object getParameterValue(String name) {
+        return query.getParameterValue(name);
+    }
+
+    @Override
+    public Object getParameterValue(int position) {
+        return query.getParameterValue(position);
+    }
+
+    @Override
+    public Set<Parameter<?>> getParameters() {
+        return query.getParameters();
+    }
+
+    @Override
+    public Set<String> getSupportedHints() {
+        return query.getSupportedHints();
+    }
+
+    @Override
+    public boolean isBound(Parameter<?> param) {
+        return query.isBound(param);
+    }
+
+    @Override
+    public Query setLockMode(LockModeType lockMode) {
+        return query.setLockMode(lockMode);
+    }
+
+    @Override
+    public <T> Query setParameter(Parameter<T> param, T value) {
+        return query.setParameter(param, value);
+    }
+
+    @Override
+    public Query setParameter(Parameter<Calendar> param, Calendar value, TemporalType
temporalType) {
+        return query.setParameter(param, value, temporalType);
+    }
+
+    @Override
+    public Query setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
{
+        return query.setParameter(param, value, temporalType);
+    }
+
 }
+

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Tue Oct  6 21:44:39 2009
@@ -36,6 +36,8 @@
 import javax.persistence.spi.PersistenceProvider;
 import javax.persistence.spi.PersistenceUnitInfo;
 import javax.persistence.spi.PersistenceUnitTransactionType;
+import javax.persistence.spi.SharedCacheMode;
+import javax.persistence.spi.ValidationMode;
 import javax.resource.ResourceException;
 import javax.sql.DataSource;
 
@@ -265,60 +267,74 @@
             this.tempClassLoader = new TemporaryClassLoader(classLoader); 
         }
 
+        @Override
         public String getPersistenceUnitName() {
             return persistenceUnitName;
         }
 
+        @Override
         public String getPersistenceProviderClassName() {
             return persistenceProviderClassName;
         }
 
+        @Override
         public PersistenceUnitTransactionType getTransactionType() {
             return persistenceUnitTransactionType;
         }
 
+        @Override
         public DataSource getJtaDataSource() {
             return jtaDataSource;
         }
 
+        @Override
         public DataSource getNonJtaDataSource() {
             return nonJtaDataSource;
         }
 
+        @Override
         public List<String> getMappingFileNames() {
             return mappingFileNames;
         }
 
+        @Override
         public List<URL> getJarFileUrls() {
             return jarFileUrls;
         }
 
+        @Override
         public URL getPersistenceUnitRootUrl() {
             return persistenceUnitRootUrl;
         }
 
+        @Override
         public List<String> getManagedClassNames() {
             return managedClassNames;
         }
 
+        @Override
         public boolean excludeUnlistedClasses() {
             return excludeUnlistedClassesValue;
         }
 
+        @Override
         public Properties getProperties() {
             return properties;
         }
 
+        @Override
         public ClassLoader getClassLoader() {
             return classLoader;
         }
 
+        @Override
         public void addTransformer(ClassTransformer classTransformer) {
             TransformerWrapper transformer = new TransformerWrapper(classTransformer, classLoader);
             transformers.add(transformer);
             TransformerAgent.addTransformer(transformer);
         }
 
+        @Override
         public ClassLoader getNewTempClassLoader() {
             return tempClassLoader;
         }
@@ -329,6 +345,27 @@
             }
         }
 
+        /**
+         * JPA2 added methods
+         */
+        @Override
+        public String getPersistenceXMLSchemaVersion() {
+            // TODO Auto-generated method stub
+            return null;
+        }
+
+        @Override
+        public SharedCacheMode getSharedCacheMode() {
+            // TODO Auto-generated method stub
+            return null;
+        }
+
+        @Override
+        public ValidationMode getValidationMode() {
+            // TODO Auto-generated method stub
+            return null;
+        }
+
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManager.java?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManager.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManager.java
Tue Oct  6 21:44:39 2009
@@ -18,12 +18,18 @@
 package org.apache.geronimo.persistence.mockjpa;
 
 import java.util.Map;
+import java.util.Set;
 
 import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
 import javax.persistence.FlushModeType;
 import javax.persistence.LockModeType;
 import javax.persistence.Query;
 import javax.persistence.EntityTransaction;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.QueryBuilder;
+import javax.persistence.metamodel.Metamodel;
 
 /**
  * @version $Rev$ $Date$
@@ -146,4 +152,112 @@
     public boolean isJoined() {
         return joined;
     }
+
+    /**
+     * JPA2 added methods
+     */
+    @Override
+    public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
{
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
+        return null;
+    }
+
+    @Override
+    public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass)
{
+        return null;
+    }
+
+    @Override
+    public void detach(Object entity) {
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey, Map<String,
Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode)
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode,
Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public EntityManagerFactory getEntityManagerFactory() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public LockModeType getLockMode(Object entity) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Metamodel getMetamodel() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public QueryBuilder getQueryBuilder() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Set<String> getSupportedProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void lock(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void refresh(Object entity, LockModeType lockMode,
+        Map<String, Object> properties) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setProperty(String propertyName, Object value) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> cls) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManagerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManagerFactory.java?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManagerFactory.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/mockjpa/MockEntityManagerFactory.java
Tue Oct  6 21:44:39 2009
@@ -18,9 +18,14 @@
 package org.apache.geronimo.persistence.mockjpa;
 
 import java.util.Map;
+import java.util.Set;
 
+import javax.persistence.Cache;
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.EntityManager;
+import javax.persistence.PersistenceUnitUtil;
+import javax.persistence.criteria.QueryBuilder;
+import javax.persistence.metamodel.Metamodel;
 
 /**
  * @version $Rev$ $Date$
@@ -50,4 +55,43 @@
     public boolean isOpen() {
         return open;
     }
+
+    /**
+     * JPA2 added methods
+     */
+    @Override
+    public Cache getCache() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Metamodel getMetamodel() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PersistenceUnitUtil getPersistenceUnitUtil() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> getProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public QueryBuilder getQueryBuilder() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Set<String> getSupportedProperties() {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: geronimo/server/trunk/plugins/openjpa2/openjpa2/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/openjpa2/src/main/history/dependencies.xml?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/openjpa2/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/openjpa2/openjpa2/src/main/history/dependencies.xml Tue
Oct  6 21:44:39 2009
@@ -2,7 +2,7 @@
 <plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
     <module-id>
         <groupId>org.apache.geronimo.configs</groupId>
-        <artifactId>openjpa</artifactId>
+        <artifactId>openjpa2</artifactId>
         <version>3.0-SNAPSHOT</version>
         <type>car</type>
     </module-id>
@@ -28,7 +28,7 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.modules</groupId>
-        <artifactId>geronimo-openjpa</artifactId>
+        <artifactId>geronimo-openjpa2</artifactId>
         <type>jar</type>
     </dependency>
     <dependency>

Modified: geronimo/server/trunk/plugins/openjpa2/persistence-jpa20-deployer/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/persistence-jpa20-deployer/src/main/history/dependencies.xml?rev=822523&r1=822522&r2=822523&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/persistence-jpa20-deployer/src/main/history/dependencies.xml
(original)
+++ geronimo/server/trunk/plugins/openjpa2/persistence-jpa20-deployer/src/main/history/dependencies.xml
Tue Oct  6 21:44:39 2009
@@ -2,7 +2,7 @@
 <plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
     <module-id>
         <groupId>org.apache.geronimo.configs</groupId>
-        <artifactId>persistence-jpa10-deployer</artifactId>
+        <artifactId>persistence-jpa20-deployer</artifactId>
         <version>3.0-SNAPSHOT</version>
         <type>car</type>
     </module-id>
@@ -18,7 +18,12 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.modules</groupId>
-        <artifactId>geronimo-persistence-jpa10-builder</artifactId>
+        <artifactId>geronimo-persistence-jpa20-builder</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.modules</groupId>
+        <artifactId>geronimo-persistence-jpa20</artifactId>
         <type>jar</type>
     </dependency>
 </plugin-artifact>



Mime
View raw message