openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dez...@apache.org
Subject svn commit: r802213 - /openjpa/branches/1.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
Date Fri, 07 Aug 2009 21:32:17 GMT
Author: dezzio
Date: Fri Aug  7 21:32:16 2009
New Revision: 802213

URL: http://svn.apache.org/viewvc?rev=802213&view=rev
Log:
OpenJPA-1133, merged change to test framework, from trunk, rev 658197

Modified:
    openjpa/branches/1.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java

Modified: openjpa/branches/1.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java?rev=802213&r1=802212&r2=802213&view=diff
==============================================================================
--- openjpa/branches/1.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
(original)
+++ openjpa/branches/1.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
Fri Aug  7 21:32:16 2009
@@ -68,9 +68,31 @@
         }
     }
     
+    /**
+     * Get the class mapping for a given entity
+     * 
+     * @param name The Entity's name.
+     * 
+     * @return If the entity is a known type the ClassMapping for the Entity
+     *         will be returned. Otherwise null
+     */
     protected ClassMapping getMapping(String name) {
         return (ClassMapping) emf.getConfiguration()
                 .getMetaDataRepositoryInstance().getMetaData(name,
                         getClass().getClassLoader(), true);
     }
+    
+    /**
+     * Get the class mapping for a given entity
+     * 
+     * @param entityClass an entity class.
+     * 
+     * @return If the entity is a known type the ClassMapping for the Entity
+     *         will be returned. Otherwise null
+     */
+    protected ClassMapping getMapping(Class<?> entityClass) {
+        return (ClassMapping) emf.getConfiguration()
+                .getMetaDataRepositoryInstance().getMetaData(entityClass,
+                        getClass().getClassLoader(), true);
+    }
 }



Mime
View raw message