[exo-jcr-commits] exo-jcr SVN: r795 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 20 09:25:20 EST 2009


Author: skabashnyuk
Date: 2009-11-20 09:25:20 -0500 (Fri, 20 Nov 2009)
New Revision: 795

Modified:
   jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexModificationsBuilder.java
Log:
EXOJCR-241 : Lock's handling

Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexModificationsBuilder.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexModificationsBuilder.java	2009-11-20 14:15:28 UTC (rev 794)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexModificationsBuilder.java	2009-11-20 14:25:20 UTC (rev 795)
@@ -119,15 +119,16 @@
       if (fqn.size() == 2)
       {
          String uuid = parseUUID(fqn);
-         if (!isNode(fqn))
+         if (isProperty(fqn))
          {
             PropertyData property = (PropertyData)command.getValue();
             uuid = property.getParentIdentifier();
+
+            if (!addedNodes.contains(uuid))
+            {
+               updateNodes.add(uuid);
+            }
          }
-         if (!addedNodes.contains(uuid))
-         {
-            updateNodes.add(uuid);
-         }
 
       }
       return null;
@@ -189,6 +190,18 @@
    /**
     * 
     * @param fqn
+    * @return true if fqn is the path to the node, false if fqn is the path to the property.
+    */
+   private boolean isProperty(Fqn<String> fqn)
+   {
+      String items = (String)fqn.get(0);
+      String s = items.toString();
+      return s.equals(JBossCacheStorage.PROPS);
+   }
+
+   /**
+    * 
+    * @param fqn
     * @return Return uuid of item from fqn
     */
    private String parseUUID(Fqn<String> fqn)



More information about the exo-jcr-commits mailing list