db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r291898 - in /incubator/jdo/trunk: api20/src/java/javax/jdo/PersistenceManager.java runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
Date Tue, 27 Sep 2005 10:47:42 GMT
Author: clr
Date: Tue Sep 27 03:47:32 2005
New Revision: 291898

URL: http://svn.apache.org/viewcvs?rev=291898&view=rev
Log:
JDO-150 Add new method retrieve(Object, boolean); update javadoc for retrieveAll with FGOnly
parameter

Modified:
    incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManager.java
    incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
    incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java

Modified: incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManager.java?rev=291898&r1=291897&r2=291898&view=diff
==============================================================================
--- incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManager.java (original)
+++ incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManager.java Tue Sep 27 03:47:32
2005
@@ -571,7 +571,7 @@
      * @see #makeNontransactional(Object pc)
      */
     void makeNontransactionalAll (Collection pcs);
-    
+
     /** Retrieve field values of an instance from the store.  This tells
      * the <code>PersistenceManager</code> that the application intends to use
the
      * instance, and its field values must be retrieved.
@@ -581,6 +581,17 @@
      */
     void retrieve (Object pc);
     
+    /** Retrieve field values of an instance from the store.  This tells
+     * the <code>PersistenceManager</code> that the application intends to use
the
+     * instance, and its field values must be retrieved.
+     * <P>The <code>PersistenceManager</code> might use policy information
about the
+     * class to retrieve associated instances.
+     * @param pc the instance
+     * @param FGOnly whether to only retrieve the fields in the current fetch group
+     * @since 2.0
+     */
+    void retrieve (Object pc, boolean FGOnly);
+    
     /** Retrieve field values of instances from the store.  This tells
      * the <code>PersistenceManager</code> that the application intends to use
the
      * instances, and all field values must be retrieved.
@@ -593,15 +604,15 @@
     /** Retrieve field values of instances from the store.  This tells
      * the <code>PersistenceManager</code> that the application intends to use
the
      * instances, and their field values should be retrieved.  The fields
-     * in the default fetch group must be retrieved, and the implementation
-     * might retrieve more fields than the default fetch group.
+     * in the current fetch group must be retrieved, and the implementation
+     * might retrieve more fields than the current fetch group.
      * <P>The <code>PersistenceManager</code> might use policy information
about the
      * class to retrieve associated instances.
      * @param pcs the instances
-     * @param DFGOnly whether to retrieve only the default fetch group fields
+     * @param FGOnly whether to retrieve only the fields in the current fetch group
      * @since 1.0.1
      */
-    void retrieveAll (Collection pcs, boolean DFGOnly);
+    void retrieveAll (Collection pcs, boolean FGOnly);
     
     /** Retrieve field values of instances from the store.  This tells
      * the <code>PersistenceManager</code> that the application intends to use
the
@@ -615,15 +626,15 @@
     /** Retrieve field values of instances from the store.  This tells
      * the <code>PersistenceManager</code> that the application intends to use
the
      * instances, and their field values should be retrieved.  The fields
-     * in the default fetch group must be retrieved, and the implementation
-     * might retrieve more fields than the default fetch group.
+     * in the current fetch group must be retrieved, and the implementation
+     * might retrieve more fields than the current fetch group.
      * <P>The <code>PersistenceManager</code> might use policy information
about the
      * class to retrieve associated instances.
      * @param pcs the instances
-     * @param DFGOnly whether to retrieve only the default fetch group fields
+     * @param FGOnly whether to retrieve only the fields in the current fetch group
      * @since 1.0.1
      */
-    void retrieveAll (Object[] pcs, boolean DFGOnly);
+    void retrieveAll (Object[] pcs, boolean FGOnly);
            
     /** The application can manage the <code>PersistenceManager</code> instances
      * more easily by having an application object associated with each

Modified: incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java?rev=291898&r1=291897&r2=291898&view=diff
==============================================================================
--- incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
(original)
+++ incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
Tue Sep 27 03:47:32 2005
@@ -1177,6 +1177,20 @@
         retrieveInternal(pc, false);
     }
     
+    /** Retrieve field values of an instance from the store.  
+     * <P>The <code>PersistenceManager</code> might use policy information

+     * about the class to retrieve associated instances.
+     * @param pc the instance
+     * @param FGOnly whether to retrieve only the fields in the fetch plan
+     */
+    public void retrieve(Object pc, boolean FGOnly) {
+        if (debugging())
+            debug("retrieve, FGOnly: " + FGOnly); // NOI18N
+
+        assertIsOpen();
+        retrieveInternal(pc, FGOnly);
+    }
+    
     /** Retrieve field values of instances from the store.  This tells
      * the <code>PersistenceManager</code> that the application intends to use
the
      * instances, and all field values must be retrieved.
@@ -1196,15 +1210,15 @@
      * <P>The <code>PersistenceManager</code> might use policy information
about the
      * class to retrieve associated instances.
      * @param pcs the instances
-     * @param DFGOnly whether to retrieve only the default fetch group fields
+     * @param FGOnly whether to retrieve only the fields in the fetch plan
      * @since 1.0.1
      */
-    public void retrieveAll (Object[] pcs, boolean DFGOnly) {
+    public void retrieveAll (Object[] pcs, boolean FGOnly) {
         if (debugging())
-            debug("retrieveAll, DFGOnly: " + DFGOnly); // NOI18N
+            debug("retrieveAll, FGOnly: " + FGOnly); // NOI18N
 
         assertIsOpen();
-        retrieveAllInternal(pcs, DFGOnly);
+        retrieveAllInternal(pcs, FGOnly);
     }
 
            
@@ -1227,15 +1241,15 @@
      * <P>The <code>PersistenceManager</code> might use policy information
about the
      * class to retrieve associated instances.
      * @param pcs the instances
-     * @param DFGOnly whether to retrieve only the default fetch group fields
+     * @param FGOnly whether to retrieve only the fields in the fetch plan
      * @since 1.0.1
      */
-    public void retrieveAll (Collection pcs, boolean DFGOnly) {
+    public void retrieveAll (Collection pcs, boolean FGOnly) {
         if (debugging())
-            debug("retrieveAll, DFGOnly: " + DFGOnly); // NOI18N
+            debug("retrieveAll, DFGOnly: " + FGOnly); // NOI18N
 
         assertIsOpen();
-        retrieveAllInternal(pcs.toArray(), DFGOnly);
+        retrieveAllInternal(pcs.toArray(), FGOnly);
     }
 
     //

Modified: incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java?rev=291898&r1=291897&r2=291898&view=diff
==============================================================================
--- incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
(original)
+++ incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
Tue Sep 27 03:47:32 2005
@@ -740,11 +740,10 @@
         } 
    }
     
-    /** Retrieve an instance from the store.  This is only a hint to
-     * the PersistenceManager that the application intends to use the
-     * instance, and its field values should be retrieved.
+    /** Retrieve all field values of an instance from the store. 
      * <P>The PersistenceManager might use policy information about the
      * class to retrieve associated instances.
+     * @param pc the instance to retrieve
      */
     public void retrieve(Object pc) {
         if (isValid) { 
@@ -755,6 +754,25 @@
         } 
     }
     
+    /** Retrieve field values of an instance from the store. If the FGOnly
+     * flag is false, retrieve all field values. If the FGOnly flag is true,
+     * retrieve only fields defined in the fetch plan.
+     * <P>The PersistenceManager might use policy information about the
+     * class to retrieve associated instances.
+     * @param pc the instance to retrieve
+     * @param FGOnly whether to retrieve only the fetch group fields defined
+     * in the fetch plan
+     * @since 2.0
+     */
+    public void retrieve(Object pc, boolean FGOnly) {
+        if (isValid) { 
+            pm.retrieve(pc, FGOnly);
+        } else { 
+            throw new JDOFatalUserException(msg.msg(
+                "EXC_PersistenceManagerClosed"));// NOI18N
+        } 
+    }
+    
     /** Retrieve field values of instances from the store.  This tells
      * the <code>PersistenceManager</code> that the application intends to use
the
      * instances, and all field values must be retrieved.
@@ -779,12 +797,13 @@
      * <P>The <code>PersistenceManager</code> might use policy information
about the
      * class to retrieve associated instances.
      * @param pcs the instances
-     * @param DFGOnly whether to retrieve only the default fetch group fields
+     * @param FGOnly whether to retrieve only the fetch group fields defined
+     * in the fetch plan
      * @since 1.0.1
      */
-    public void retrieveAll (Object[] pcs, boolean DFGOnly) {
+    public void retrieveAll (Object[] pcs, boolean FGOnly) {
         if (isValid) { 
-            pm.retrieveAll(pcs, DFGOnly);
+            pm.retrieveAll(pcs, FGOnly);
         } else { 
             throw new JDOFatalUserException(msg.msg(
                 "EXC_PersistenceManagerClosed"));// NOI18N
@@ -815,12 +834,13 @@
      * <P>The <code>PersistenceManager</code> might use policy information
about the
      * class to retrieve associated instances.
      * @param pcs the instances
-     * @param DFGOnly whether to retrieve only the default fetch group fields
+     * @param FGOnly whether to retrieve only the fetch group fields defined
+     * in the fetch plan
      * @since 1.0.1
      */
-    public void retrieveAll (Collection pcs, boolean DFGOnly) {
+    public void retrieveAll (Collection pcs, boolean FGOnly) {
         if (isValid) {
-            pm.retrieveAll(pcs, DFGOnly);
+            pm.retrieveAll(pcs, FGOnly);
         } else {
             throw new JDOFatalUserException(msg.msg(
                 "EXC_PersistenceManagerClosed"));// NOI18N



Mime
View raw message