r9813 - helma/helma/trunk/src/helma/objectmodel/db

[email protected] Wed, 27 May 2009 13:08:14 +0200 (CEST)
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090527110814.C99D23D0E3@mia>
Author: hannes
Date: 2009-05-27 13:08:14 +0200 (Wed, 27 May 2009)
New Revision: 9813

Modified:
   helma/helma/trunk/src/helma/objectmodel/db/Node.java
   helma/helma/trunk/src/helma/objectmodel/db/SubnodeList.java
Log:
Add SubnodeList.markAsChanged() method, fix SubnodeList class javadoc.

Details at http://dev.helma.org/trac/helma/changeset/9813

Modified: helma/helma/trunk/src/helma/objectmodel/db/Node.java
===================================================================
--- helma/helma/trunk/src/helma/objectmodel/db/Node.java	2009-05-20 10:23:36 UTC (rev 9812)
+++ helma/helma/trunk/src/helma/objectmodel/db/Node.java	2009-05-27 11:08:14 UTC (rev 9813)
@@ -365,7 +365,7 @@
      */
     public void markSubnodesChanged() {
         if (subnodes != null) {
-            subnodes.lastSubnodeChange += 1;
+            subnodes.markAsChanged();
         }
     }
 

Modified: helma/helma/trunk/src/helma/objectmodel/db/SubnodeList.java
===================================================================
--- helma/helma/trunk/src/helma/objectmodel/db/SubnodeList.java	2009-05-20 10:23:36 UTC (rev 9812)
+++ helma/helma/trunk/src/helma/objectmodel/db/SubnodeList.java	2009-05-27 11:08:14 UTC (rev 9813)
@@ -21,7 +21,7 @@
 import java.io.Serializable;
 
 /**
- * A subclass of ArrayList that adds an addSorted(Object) method to
+ * Container implementation for subnode collections.
  */
 public class SubnodeList implements Serializable {
 
@@ -169,6 +169,10 @@
                 checkSum : checkSum + rel.otherType.getLastDataChange();
     }
 
+    protected synchronized void markAsChanged() {
+        lastSubnodeChange += 1;
+    }
+
     protected boolean hasRelationalNodes() {
         DbMapping dbmap = getSubnodeMapping();
         return (dbmap != null && dbmap.isRelational()