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/15 21:56:21 UTC

svn commit: r794384 - /geronimo/specs/branches/geronimo-jpa_2.0_spec-1.0-EA3/src/main/java/javax/persistence/Persistence.java

Author: dwoods
Date: Wed Jul 15 19:56:21 2009
New Revision: 794384

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

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

Modified: geronimo/specs/branches/geronimo-jpa_2.0_spec-1.0-EA3/src/main/java/javax/persistence/Persistence.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-jpa_2.0_spec-1.0-EA3/src/main/java/javax/persistence/Persistence.java?rev=794384&r1=794383&r2=794384&view=diff
==============================================================================
--- geronimo/specs/branches/geronimo-jpa_2.0_spec-1.0-EA3/src/main/java/javax/persistence/Persistence.java (original)
+++ geronimo/specs/branches/geronimo-jpa_2.0_spec-1.0-EA3/src/main/java/javax/persistence/Persistence.java Wed Jul 15 19:56:21 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;
+            }
+        };
     }
 }