jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1360723 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: kernel/ plugins/memory/ query/ast/
Date Thu, 12 Jul 2012 15:23:07 GMT
Author: jukka
Date: Thu Jul 12 15:23:06 2012
New Revision: 1360723

URL: http://svn.apache.org/viewvc?rev=1360723&view=rev
Log:
OAK-184: Allow PropertyState.getValues() to work on single-valued properties

Use separate internal representations for single- and multi-valued properties.

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java
      - copied, changed from r1360710, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/PropertyStateImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java
Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/PropertyStateImpl.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LengthImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LowerCaseImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/UpperCaseImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Thu Jul 12 15:23:06 2012
@@ -18,6 +18,9 @@
  */
 package org.apache.jackrabbit.oak.kernel;
 
+import static org.apache.jackrabbit.oak.kernel.CoreValueMapper.fromJsopReader;
+import static org.apache.jackrabbit.oak.kernel.CoreValueMapper.listFromJsopReader;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -33,6 +36,8 @@ import org.apache.jackrabbit.mk.json.Jso
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry;
+import org.apache.jackrabbit.oak.plugins.memory.MultiPropertyState;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.spi.state.AbstractNodeState;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -111,10 +116,11 @@ final class KernelNodeState extends Abst
                     }
                     childNodes.put(name, new KernelNodeState(kernel, childPath, revision));
                 } else if (reader.matches('[')) {
-                    properties.put(name, new PropertyStateImpl(name, CoreValueMapper.listFromJsopReader(reader,
kernel)));
+                    List<CoreValue> values = listFromJsopReader(reader, kernel);
+                    properties.put(name, new MultiPropertyState(name, values));
                 } else {
-                    CoreValue cv = CoreValueMapper.fromJsopReader(reader, kernel);
-                    properties.put(name, new PropertyStateImpl(name, cv));
+                    CoreValue cv = fromJsopReader(reader, kernel);
+                    properties.put(name, new SinglePropertyState(name, cv));
                 }
             } while (reader.matches(','));
             reader.read('}');

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java
(from r1360710, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/PropertyStateImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/PropertyStateImpl.java&r1=1360710&r2=1360723&rev=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/PropertyStateImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java
Thu Jul 12 15:23:06 2012
@@ -16,40 +16,27 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.jackrabbit.oak.kernel;
+package org.apache.jackrabbit.oak.plugins.memory;
 
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.memory.MemoryValueFactory;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-public class PropertyStateImpl implements PropertyState {
+import javax.annotation.Nonnull;
 
-    private final String name;
-
-    private final boolean array;
-
-    private final CoreValue[] values;
+/**
+ * Property state that contains an empty array of values. Used as a base
+ * class for {@link SinglePropertyState} and {@link MultiPropertyState}.
+ */
+class EmptyPropertyState implements PropertyState {
 
-    public PropertyStateImpl(String name, CoreValue value) {
-        assert name != null && value != null;
-        this.name = name;
-        this.array = false;
-        this.values = new CoreValue[] { value };
-    }
+    private final String name;
 
-    public PropertyStateImpl(String name, List<CoreValue> values) {
-        assert name != null && values != null;
+    public EmptyPropertyState(String name) {
+        assert name != null;
         this.name = name;
-        this.array = true;
-        this.values = values.toArray(new CoreValue[values.size()]);
-    }
-
-    public PropertyStateImpl(String name, String value) {
-        this(name, MemoryValueFactory.INSTANCE.createValue(value));
     }
 
     @Override
@@ -59,23 +46,23 @@ public class PropertyStateImpl implement
 
     @Override
     public boolean isArray() {
-        return array;
+        return true;
     }
 
     @Override
+    @Nonnull
     public CoreValue getValue() {
-        if (array) {
-            throw new IllegalStateException("Not a single valued property");
-        }
-        return values[0];
+        throw new IllegalStateException("Not a single valued property");
     }
 
     @Override
+    @Nonnull
     public List<CoreValue> getValues() {
-        return Collections.unmodifiableList(Arrays.asList(values));
+        return Collections.emptyList();
     }
 
-    //------------------------------------------------------------< Object >----
+    //------------------------------------------------------------< Object >--
+
     /**
      * Checks whether the given object is equal to this one. Two property
      * states are considered equal if both their names and encoded values
@@ -110,12 +97,16 @@ public class PropertyStateImpl implement
      */
     @Override
     public int hashCode() {
-        return getName().hashCode();
+        return name.hashCode();
     }
 
     @Override
     public String toString() {
-        return getName() + '=' + (isArray() ? getValues() : getValue());
+        if (isArray()) {
+            return getName() + '=' + getValues();
+        } else {
+            return getName() + '=' + getValues();
+        }
     }
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java
Thu Jul 12 15:23:06 2012
@@ -18,7 +18,6 @@ package org.apache.jackrabbit.oak.plugin
 
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeStateBuilder;
 
@@ -113,14 +112,16 @@ class MemoryNodeStateBuilder implements 
 
     @Override
     public void setProperty(String name, CoreValue value) {
-        PropertyState property = new PropertyStateImpl(name, value);
-        properties.put(name, property);
+        properties.put(name, new SinglePropertyState(name, value));
     }
 
     @Override
     public void setProperty(String name, List<CoreValue> values) {
-        PropertyState property = new PropertyStateImpl(name, values);
-        properties.put(name, property);
+        if (values.isEmpty()) {
+            properties.put(name, new EmptyPropertyState(name));
+        } else {
+            properties.put(name, new MultiPropertyState(name, values));
+        }
     }
 
     @Override

Added: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java?rev=1360723&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java
(added)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java
Thu Jul 12 15:23:06 2012
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.memory;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+import org.apache.jackrabbit.oak.api.CoreValue;
+
+/**
+ * Multi-valued property state.
+ */
+public class MultiPropertyState extends EmptyPropertyState {
+
+    private final List<CoreValue> values;
+
+    public MultiPropertyState(String name, List<CoreValue> values) {
+        super(name);
+        assert values != null;
+        this.values = Collections.unmodifiableList(
+                new ArrayList<CoreValue>(values));
+    }
+
+    @Override
+    @Nonnull
+    public List<CoreValue> getValues() {
+        return values;
+    }
+
+}

Added: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java?rev=1360723&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java
(added)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java
Thu Jul 12 15:23:06 2012
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.memory;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+import org.apache.jackrabbit.oak.api.CoreValue;
+
+/**
+ * Single-valued property state.
+ */
+public class SinglePropertyState extends EmptyPropertyState {
+
+    private final CoreValue value;
+
+    public SinglePropertyState(String name, CoreValue value) {
+        super(name);
+        assert value != null;
+        this.value = value;
+    }
+
+    @Override
+    public boolean isArray() {
+        return false;
+    }
+
+    @Override
+    @Nonnull
+    public CoreValue getValue() {
+        return value;
+    }
+
+    @Override
+    @Nonnull
+    public List<CoreValue> getValues() {
+        return Collections.singletonList(value);
+    }
+
+}

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
Thu Jul 12 15:23:06 2012
@@ -20,7 +20,7 @@ package org.apache.jackrabbit.oak.query.
 
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 
 public class ColumnImpl extends AstElement {
 
@@ -68,7 +68,7 @@ public class ColumnImpl extends AstEleme
                 return null;
             }
             CoreValue v = query.getValueFactory().createValue(p);
-            return new PropertyStateImpl(SelectorImpl.PATH, v);
+            return new SinglePropertyState(SelectorImpl.PATH, v);
         }
         return selector.currentProperty(propertyName);
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LengthImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LengthImpl.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LengthImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LengthImpl.java
Thu Jul 12 15:23:06 2012
@@ -21,7 +21,7 @@ package org.apache.jackrabbit.oak.query.
 import javax.jcr.PropertyType;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 
 public class LengthImpl extends DynamicOperandImpl {
@@ -55,7 +55,7 @@ public class LengthImpl extends DynamicO
         if (!p.isArray()) {
             long length = p.getValue().length();
             CoreValue v = query.getValueFactory().createValue(length);
-            return new PropertyStateImpl("LENGTH", v);
+            return new SinglePropertyState("LENGTH", v);
         }
         // TODO what is the expected result for LENGTH(multiValueProperty)?
         throw new IllegalArgumentException("LENGTH(x) on multi-valued property is not supported");

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LowerCaseImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LowerCaseImpl.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LowerCaseImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LowerCaseImpl.java
Thu Jul 12 15:23:06 2012
@@ -20,7 +20,7 @@ package org.apache.jackrabbit.oak.query.
 
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 
 public class LowerCaseImpl extends DynamicOperandImpl {
@@ -55,7 +55,7 @@ public class LowerCaseImpl extends Dynam
         // currently throws an exception
         String value = p.getValue().getString();
         CoreValue v = query.getValueFactory().createValue(value.toLowerCase());
-        return new PropertyStateImpl(p.getName(), v);
+        return new SinglePropertyState(p.getName(), v);
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
Thu Jul 12 15:23:06 2012
@@ -21,7 +21,7 @@ package org.apache.jackrabbit.oak.query.
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 
 public class NodeLocalNameImpl extends DynamicOperandImpl {
@@ -61,7 +61,7 @@ public class NodeLocalNameImpl extends D
         // TODO LOCALNAME: evaluation of local name might not be correct
         String localName = colon < 0 ? name : name.substring(colon + 1);
         CoreValue v = query.getValueFactory().createValue(localName);
-        return new PropertyStateImpl("LOCALNAME", v);
+        return new SinglePropertyState("LOCALNAME", v);
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
Thu Jul 12 15:23:06 2012
@@ -22,7 +22,7 @@ import javax.jcr.PropertyType;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.commons.PathUtils;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 
 public class NodeNameImpl extends DynamicOperandImpl {
@@ -63,7 +63,7 @@ public class NodeNameImpl extends Dynami
         // normalize paths (./name > name)
         path = getOakPath(path);
         CoreValue v2 = query.getValueFactory().createValue(path, PropertyType.NAME);
-        return new PropertyStateImpl("NAME", v2);
+        return new SinglePropertyState("NAME", v2);
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
Thu Jul 12 15:23:06 2012
@@ -22,7 +22,7 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.query.Query;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 import org.apache.jackrabbit.oak.spi.Cursor;
@@ -141,7 +141,7 @@ public class SelectorImpl extends Source
                 return null;
             }
             CoreValue v = query.getValueFactory().createValue(local);
-            return new PropertyStateImpl(PATH, v);
+            return new SinglePropertyState(PATH, v);
         }
         String path = currentPath();
         if (path == null) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/UpperCaseImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/UpperCaseImpl.java?rev=1360723&r1=1360722&r2=1360723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/UpperCaseImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/UpperCaseImpl.java
Thu Jul 12 15:23:06 2012
@@ -20,7 +20,7 @@ package org.apache.jackrabbit.oak.query.
 
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.kernel.PropertyStateImpl;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 
 public class UpperCaseImpl extends DynamicOperandImpl {
@@ -55,7 +55,7 @@ public class UpperCaseImpl extends Dynam
         // currently throws an exception
         String value = p.getValue().getString();
         CoreValue v = query.getValueFactory().createValue(value.toUpperCase());
-        return new PropertyStateImpl(p.getName(), v);
+        return new SinglePropertyState(p.getName(), v);
     }
 
     @Override



Mime
View raw message