geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r793637 - /geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Persistence.java
Date Mon, 13 Jul 2009 17:39:03 GMT
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;
+            }
+        };
     }
 }



Mime
View raw message