[exo-jcr-commits] exo-jcr SVN: r1462 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Jan 18 08:11:09 EST 2010


Author: nzamosenchuk
Date: 2010-01-18 08:11:08 -0500 (Mon, 18 Jan 2010)
New Revision: 1462

Modified:
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-391: Add child lists with a single cache.put()

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java	2010-01-18 12:32:09 UTC (rev 1461)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java	2010-01-18 13:11:08 UTC (rev 1462)
@@ -53,7 +53,6 @@
 import java.util.Set;
 
 import javax.jcr.RepositoryException;
-import javax.transaction.RollbackException;
 import javax.transaction.TransactionManager;
 
 /**
@@ -438,10 +437,13 @@
          if (childs.size() > 0)
          {
             // add all new
+            Set<Object> set = new HashSet<Object>();
             for (NodeData child : childs)
             {
-               putNode(child, ModifyChildOption.FORCE_MODIFY);
+               putNode(child, ModifyChildOption.NOT_MODIFY);
+               set.add(child.getIdentifier());
             }
+            cache.put(makeChildListFqn(childNodesList, parent.getIdentifier()), ITEM_LIST, set);
          }
          else
          {
@@ -468,10 +470,13 @@
          if (childs.size() > 0)
          {
             // add all new
+            Set<Object> set = new HashSet<Object>();
             for (PropertyData child : childs)
             {
-               putProperty(child, ModifyChildOption.FORCE_MODIFY);
+               putProperty(child, ModifyChildOption.NOT_MODIFY);
+               set.add(child.getIdentifier());
             }
+            cache.put(makeChildListFqn(childPropsList, parent.getIdentifier()), ITEM_LIST, set);
          }
          else
          {



More information about the exo-jcr-commits mailing list