db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r373122 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/NamedRootsMap.java
Date Sat, 28 Jan 2006 10:18:16 GMT
Author: arminw
Date: Sat Jan 28 02:18:12 2006
New Revision: 373122

URL: http://svn.apache.org/viewcvs?rev=373122&view=rev
Log:
add new method to optimize commit calls

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/NamedRootsMap.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/NamedRootsMap.java
URL: http://svn.apache.org/viewcvs/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/NamedRootsMap.java?rev=373122&r1=373121&r2=373122&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/NamedRootsMap.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/NamedRootsMap.java Sat Jan
28 02:18:12 2006
@@ -77,6 +77,16 @@
     }
 
     /**
+     * Returns <em>true</em> if this class manage objects
+     * to persist/delete in datastore.
+     */
+    public boolean needsCommit()
+    {
+        return (insertMap != null && insertMap.size() > 0)
+            || (deletionMap != null && deletionMap.size() > 0);
+    }
+
+    /**
      * Have to be performed after the "normal" objects be written
      * to DB and before method {@link #performInsert()}.
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message