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

svn commit: r793637 - /geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Persistence.java

Author: dwoods
Date: Mon Jul 13 17:39:03 2009
New Revision: 793637

URL: http://svn.apache.org/viewvc?rev=793637&view=rev
Log:
GERONIMO-4410 Add dummy impl of getPersistenceUtil() for OPENJPA-1076 so we can progress with Bean Validation testing

Modified:
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Persistence.java

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Persistence.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Persistence.java?rev=793637&r1=793636&r2=793637&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Persistence.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Persistence.java Mon Jul 13 17:39:03 2009
@@ -179,10 +179,22 @@
     }
     
     /*
-    * Return the PersistenceUtil instance
+    * @return PersistenceUtil instance
     */
-    public PersistenceUtil getPersistenceUtil() {
-        // TODO: must implement this method as required by JSR-317
-        return null;
+    public static PersistenceUtil getPersistenceUtil() {
+        // TODO: OPENJPA-1076 - Required by JSR-317.  
+        // Dummy impl for Bean Validation testing.
+        return new PersistenceUtil() {
+
+            public boolean isLoaded(Object entity, String attributeName) {
+                // TODO Auto-generated dummy method stub
+                return true;
+            }
+
+            public boolean isLoaded(Object entity) {
+                // TODO Auto-generated dummy method stub
+                return true;
+            }
+        };
     }
 }