db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r551318 - /db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
Date Wed, 27 Jun 2007 20:45:35 GMT
Author: clr
Date: Wed Jun 27 13:45:35 2007
New Revision: 551318

URL: http://svn.apache.org/viewvc?view=rev&rev=551318
Log:
Update for JDO 2.1. Add method getServerDate to PersistenceManagerWrapper.java

Modified:
    db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java

Modified: db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java?view=diff&rev=551318&r1=551317&r2=551318
==============================================================================
--- db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
(original)
+++ db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
Wed Jun 27 13:45:35 2007
@@ -1145,6 +1145,26 @@
     }
 
     /**
+     * Get the Date as seen by the server. 
+     * Clients using this method can order their operations according to 
+     * a single time source. Implementations use the setting of the 
+     * server time zone to prepare a Date instance that represents 
+     * UTC time on the server. 
+     * @return a Date instance corresponding to the UTC Date 
+     * as seen by the server
+     * @since 2.1
+     */
+    public Date getServerDate() {
+        if (isValid) { 
+            return pm.getServerDate();
+        } else { 
+            throw new JDOFatalUserException(msg.msg(
+                "EXC_PersistenceManagerClosed"));// NOI18N
+        } 
+        
+    }
+    
+    /**
      * Returns PersistenceManagerInternal associated with this wrapper.
      * This method should be accessed by the PersistenceManagerInternal
      * only.



Mime
View raw message