db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r577820 - in /db/jdo/trunk: api2-legacy/src/java/javax/jdo/ api2/src/java/javax/jdo/
Date Thu, 20 Sep 2007 17:16:06 GMT
Author: clr
Date: Thu Sep 20 10:16:05 2007
New Revision: 577820

URL: http://svn.apache.org/viewvc?rev=577820&view=rev
Log:
JDO-522 Add properties and methods for CopyOnAttach

Modified:
    db/jdo/trunk/api2-legacy/src/java/javax/jdo/Constants.java
    db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManager.java
    db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManagerFactory.java
    db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java
    db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java

Modified: db/jdo/trunk/api2-legacy/src/java/javax/jdo/Constants.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2-legacy/src/java/javax/jdo/Constants.java?rev=577820&r1=577819&r2=577820&view=diff
==============================================================================
--- db/jdo/trunk/api2-legacy/src/java/javax/jdo/Constants.java (original)
+++ db/jdo/trunk/api2-legacy/src/java/javax/jdo/Constants.java Thu Sep 20 10:16:05 2007
@@ -225,6 +225,14 @@
     static String PMF_ATTRIBUTE_DETACH_ALL_ON_COMMIT
         = "detach-all-on-commit";
     /**
+     * The name of the persistence manager factory element's
+     * "copy-on-attach" attribute.
+     *
+     * @since 2.1
+     */
+    static String PMF_ATTRIBUTE_COPY_ON_ATTACH
+        = "copy-on-attach";
+    /**
      * The name of the persistence manager factory element's "mapping"
      * attribute.
      *
@@ -595,6 +603,14 @@
     static String PROPERTY_DETACH_ALL_ON_COMMIT
         = "javax.jdo.option.DetachAllOnCommit";
     /**
+     * "javax.jdo.option.CopyOnAttach"
+     *
+     * @see PersistenceManagerFactory#getCopyOnAttach()
+     * @since 2.1
+     */
+    static String PROPERTY_COPY_ON_ATTACH
+        = "javax.jdo.option.CopyOnAttach";
+    /**
      * "javax.jdo.option.ConnectionDriverName"
      *
      * @see PersistenceManagerFactory#getConnectionDriverName()
@@ -719,7 +735,7 @@
      *
      * @since 2.1
      */
-        static String PROPERTY_SERVER_TIME_ZONE_ID
+    static String PROPERTY_SERVER_TIME_ZONE_ID
         = "javax.jdo.option.ServerTimeZoneID";
 
     /**

Modified: db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManager.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManager.java?rev=577820&r1=577819&r2=577820&view=diff
==============================================================================
--- db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManager.java (original)
+++ db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManager.java Thu Sep 20 10:16:05
2007
@@ -912,6 +912,27 @@
     */
    void setDetachAllOnCommit(boolean flag);
    
+   /** Gets the copyOnAttach setting.
+    * @see #setCopyOnAttach(boolean)
+    * @since 2.1
+    * @return the copyOnAttach setting.
+    */
+   boolean getCopyOnAttach();
+
+   /** Sets the copyOnAttach setting.
+    *
+    * <P>CopyOnAttach set to <code>true</code> specifies that during
+    * makePersistent, copies are made of detached parameter instances. 
+    * With this flag set to <code>false</code>, detached parameter
+    * instances are attached directly and change their state from
+    * detached-clean to persistent-clean or from detached-dirty to
+    * persistent-dirty.
+    *
+    * @see #getCopyOnAttach()
+    * @since 2.1
+    */
+   void setCopyOnAttach(boolean flag);
+   
     /**
      * Detach the specified instance from the <code>PersistenceManager</code>.
      * The flags for detachment (DETACH_LOAD_FIELDS and DETACH_UNLOAD_FIELDS)

Modified: db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManagerFactory.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManagerFactory.java?rev=577820&r1=577819&r2=577820&view=diff
==============================================================================
--- db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManagerFactory.java (original)
+++ db/jdo/trunk/api2-legacy/src/java/javax/jdo/PersistenceManagerFactory.java Thu Sep 20
10:16:05 2007
@@ -356,6 +356,31 @@
      */
     void setDetachAllOnCommit(boolean flag);
 
+   /** Gets the default copyOnAttach setting for all
+    * <code>PersistenceManager</code> instances obtained from this
+    * factory.
+    * @see #setCopyOnAttach(boolean)
+    * @since 2.1
+    * @return the copyOnAttach setting.
+    */
+   boolean getCopyOnAttach();
+
+   /** Sets the default copyOnAttach setting for all
+    * <code>PersistenceManager</code> instances obtained from this
+    * factory.
+    *
+    * <P>CopyOnAttach set to <code>true</code> specifies that during
+    * makePersistent, copies are made of detached parameter instances. 
+    * With this flag set to <code>false</code>, detached parameter
+    * instances are attached directly and change their state from
+    * detached-clean to persistent-clean or from detached-dirty to
+    * persistent-dirty.
+    *
+    * @see #getCopyOnAttach()
+    * @since 2.1
+    */
+   void setCopyOnAttach(boolean flag);
+   
     /**
      * Sets the name of this PersistenceManagerFactory.
      * @since 2.1

Modified: db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java?rev=577820&r1=577819&r2=577820&view=diff
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java (original)
+++ db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java Thu Sep 20 10:16:05 2007
@@ -912,6 +912,27 @@
     */
    void setDetachAllOnCommit(boolean flag);
    
+   /** Gets the copyOnAttach setting.
+    * @see #setCopyOnAttach(boolean)
+    * @since 2.1
+    * @return the copyOnAttach setting.
+    */
+   boolean getCopyOnAttach();
+
+   /** Sets the copyOnAttach setting.
+    *
+    * <P>CopyOnAttach set to <code>true</code> specifies that during
+    * makePersistent, copies are made of detached parameter instances. 
+    * With this flag set to <code>false</code>, detached parameter
+    * instances are attached directly and change their state from
+    * detached-clean to persistent-clean or from detached-dirty to
+    * persistent-dirty.
+    *
+    * @see #getCopyOnAttach()
+    * @since 2.1
+    */
+   void setCopyOnAttach(boolean flag);
+   
     /**
      * Detach the specified instance from the <code>PersistenceManager</code>.
      * The flags for detachment (DETACH_LOAD_FIELDS and DETACH_UNLOAD_FIELDS)

Modified: db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java?rev=577820&r1=577819&r2=577820&view=diff
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java (original)
+++ db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java Thu Sep 20 10:16:05
2007
@@ -356,6 +356,31 @@
      */
     void setDetachAllOnCommit(boolean flag);
 
+   /** Gets the default copyOnAttach setting for all
+    * <code>PersistenceManager</code> instances obtained from this
+    * factory.
+    * @see #setCopyOnAttach(boolean)
+    * @since 2.1
+    * @return the copyOnAttach setting.
+    */
+   boolean getCopyOnAttach();
+
+   /** Sets the default copyOnAttach setting for all
+    * <code>PersistenceManager</code> instances obtained from this
+    * factory.
+    *
+    * <P>CopyOnAttach set to <code>true</code> specifies that during
+    * makePersistent, copies are made of detached parameter instances. 
+    * With this flag set to <code>false</code>, detached parameter
+    * instances are attached directly and change their state from
+    * detached-clean to persistent-clean or from detached-dirty to
+    * persistent-dirty.
+    *
+    * @see #getCopyOnAttach()
+    * @since 2.1
+    */
+   void setCopyOnAttach(boolean flag);
+   
     /**
      * Sets the name of this PersistenceManagerFactory.
      * @since 2.1



Mime
View raw message