jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1400338 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/api/ main/java/org/apache/jackrabbit/oak/plugins/memory/ main/java/org/apache/jackrabbit/oak/plugins/value/ test/resources/org/apache/jackrabbit/oak/query/
Date Fri, 19 Oct 2012 23:25:10 GMT
Author: mduerig
Date: Fri Oct 19 23:25:09 2012
New Revision: 1400338

URL: http://svn.apache.org/viewvc?rev=1400338&view=rev
Log:
OAK-380: Define conversion of property values
conversion for date values

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Type.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BinariesPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BooleansPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalsPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublePropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublesPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericsPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongsPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryPropertyBuilder.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/PropertyStates.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/StringsPropertyState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java
    jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql1.txt

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Type.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Type.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Type.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Type.java Fri Oct 19 23:25:09 2012
@@ -165,7 +165,7 @@ public final class Type<T> {
      * @throws IllegalStateException if {@code isArray} is false.
      */
     public Type<?> getBaseType() {
-        checkState(isArray(), "Not an array: " + this);
+        checkState(isArray(), "Not an array");
         return fromTag(tag, false);
     }
 
@@ -175,7 +175,7 @@ public final class Type<T> {
      * @throws IllegalStateException if {@code isArray} is true.
      */
     public Type<?> getArrayType() {
-        checkState(!isArray(), "Not a simply type: " + this);
+        checkState(!isArray(), "Not a simply type");
         return fromTag(tag, true);
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BinariesPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BinariesPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BinariesPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BinariesPropertyState.java Fri Oct 19 23:25:09 2012
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.memory;
 
-import java.util.List;
-
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
 import org.apache.jackrabbit.oak.api.Blob;
@@ -28,7 +26,7 @@ import static org.apache.jackrabbit.oak.
 
 public class BinariesPropertyState extends MultiPropertyState<Blob> {
 
-    protected BinariesPropertyState(String name, List<Blob> values) {
+    protected BinariesPropertyState(String name, Iterable<Blob> values) {
         super(name, values);
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BooleansPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BooleansPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BooleansPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BooleansPropertyState.java Fri Oct 19 23:25:09 2012
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.memory;
 
-import java.util.List;
-
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
 import org.apache.jackrabbit.oak.api.Type;
@@ -26,7 +24,7 @@ import org.apache.jackrabbit.oak.plugins
 import static org.apache.jackrabbit.oak.api.Type.BOOLEANS;
 
 public class BooleansPropertyState extends MultiPropertyState<Boolean> {
-    protected BooleansPropertyState(String name, List<Boolean> values) {
+    protected BooleansPropertyState(String name, Iterable<Boolean> values) {
         super(name, values);
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalPropertyState.java Fri Oct 19 23:25:09 2012
@@ -17,12 +17,11 @@
 package org.apache.jackrabbit.oak.plugins.memory;
 
 import java.math.BigDecimal;
-import java.util.Calendar;
 
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 
-import static org.apache.jackrabbit.oak.api.Type.*;
+import static org.apache.jackrabbit.oak.api.Type.DECIMAL;
 
 public class DecimalPropertyState extends SinglePropertyState {
     private final BigDecimal value;
@@ -49,8 +48,7 @@ public class DecimalPropertyState extend
 
     @Override
     protected String getDate() {
-        Calendar calendar = Conversions.convert(value).toDate();
-        return Conversions.convert(calendar).toString();
+        return Conversions.convert(value).toDate();
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalsPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalsPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalsPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalsPropertyState.java Fri Oct 19 23:25:09 2012
@@ -17,8 +17,6 @@
 package org.apache.jackrabbit.oak.plugins.memory;
 
 import java.math.BigDecimal;
-import java.util.Calendar;
-import java.util.List;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
@@ -29,7 +27,7 @@ import static org.apache.jackrabbit.oak.
 
 public class DecimalsPropertyState extends MultiPropertyState<BigDecimal> {
 
-    protected DecimalsPropertyState(String name, List<BigDecimal> values) {
+    protected DecimalsPropertyState(String name, Iterable<BigDecimal> values) {
         super(name, values);
     }
 
@@ -58,8 +56,7 @@ public class DecimalsPropertyState exten
         return Iterables.transform(values, new Function<BigDecimal, String>() {
             @Override
             public String apply(BigDecimal value) {
-                Calendar calendar = Conversions.convert(value).toDate();
-                return Conversions.convert(calendar).toString();
+                return Conversions.convert(value).toDate();
             }
         });
     }
@@ -71,8 +68,7 @@ public class DecimalsPropertyState exten
 
     @Override
     protected String getDate(int index) {
-        Calendar calendar = Conversions.convert(values.get(index)).toDate();
-        return Conversions.convert(calendar).toString();
+        return Conversions.convert(values.get(index)).toDate();
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublePropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublePropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublePropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublePropertyState.java Fri Oct 19 23:25:09 2012
@@ -19,7 +19,6 @@
 package org.apache.jackrabbit.oak.plugins.memory;
 
 import java.math.BigDecimal;
-import java.util.Calendar;
 
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
@@ -51,8 +50,7 @@ public class DoublePropertyState extends
 
     @Override
     protected String getDate() {
-        Calendar calendar = Conversions.convert(value).toDate();
-        return Conversions.convert(calendar).toString();
+        return Conversions.convert(value).toDate();
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublesPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublesPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublesPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoublesPropertyState.java Fri Oct 19 23:25:09 2012
@@ -19,8 +19,6 @@
 package org.apache.jackrabbit.oak.plugins.memory;
 
 import java.math.BigDecimal;
-import java.util.Calendar;
-import java.util.List;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
@@ -30,7 +28,7 @@ import org.apache.jackrabbit.oak.plugins
 import static org.apache.jackrabbit.oak.api.Type.DOUBLES;
 
 public class DoublesPropertyState extends MultiPropertyState<Double> {
-    protected DoublesPropertyState(String name, List<Double>values) {
+    protected DoublesPropertyState(String name, Iterable<Double>values) {
         super(name, values);
     }
 
@@ -59,8 +57,7 @@ public class DoublesPropertyState extend
         return Iterables.transform(values, new Function<Double, String>() {
             @Override
             public String apply(Double value) {
-                Calendar calendar = Conversions.convert(value).toDate();
-                return Conversions.convert(calendar).toString();
+                return Conversions.convert(value).toDate();
             }
         });
     }
@@ -71,9 +68,7 @@ public class DoublesPropertyState extend
 
     @Override
     protected String getDate(int index) {
-        Calendar calendar = Conversions.convert(values.get(index)).toDate();
-        return Conversions.convert(calendar).toString();
-    }
+        return Conversions.convert(values.get(index)).toDate();    }
 
     @Override
     protected Iterable<Long> getLongs() {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericPropertyState.java Fri Oct 19 23:25:09 2012
@@ -16,11 +16,7 @@
  */
 package org.apache.jackrabbit.oak.plugins.memory;
 
-import java.math.BigDecimal;
-import java.util.Calendar;
-
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.value.Conversions;
 
 import static com.google.common.base.Preconditions.checkArgument;
 
@@ -44,50 +40,6 @@ public class GenericPropertyState extend
     }
 
     @Override
-    protected long getLong() {
-        if (type == Type.DATE) {
-            Calendar calendar = Conversions.convert(value).toDate();
-            return Conversions.convert(calendar).toLong();
-        }
-        else {
-            return super.getLong();
-        }
-    }
-
-    @Override
-    protected double getDouble() {
-        if (type == Type.DATE) {
-            Calendar calendar = Conversions.convert(value).toDate();
-            return Conversions.convert(calendar).toDouble();
-        }
-        else {
-            return super.getDouble();
-        }
-    }
-
-    @Override
-    protected String getDate() {
-        if (type == Type.DATE) {
-            Calendar calendar = Conversions.convert(value).toDate();
-            return Conversions.convert(calendar).toString();
-        }
-        else {
-            return super.getDate();
-        }
-    }
-
-    @Override
-    protected BigDecimal getDecimal() {
-        if (type == Type.DATE) {
-            Calendar calendar = Conversions.convert(value).toDate();
-            return Conversions.convert(calendar).toDecimal();
-        }
-        else {
-            return super.getDecimal();
-        }
-    }
-
-    @Override
     public Type<?> getType() {
         return type;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericsPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericsPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericsPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericsPropertyState.java Fri Oct 19 23:25:09 2012
@@ -18,14 +18,7 @@
  */
 package org.apache.jackrabbit.oak.plugins.memory;
 
-import java.math.BigDecimal;
-import java.util.Calendar;
-import java.util.List;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.value.Conversions;
 
 import static com.google.common.base.Preconditions.checkArgument;
 
@@ -35,7 +28,7 @@ public class GenericsPropertyState exten
     /**
      * @throws IllegalArgumentException if {@code type.isArray()} is {@code false}
      */
-    protected GenericsPropertyState(String name, List<String> values, Type<?> type) {
+    protected GenericsPropertyState(String name, Iterable<String> values, Type<?> type) {
         super(name, values);
         checkArgument(type.isArray());
         this.type = type;
@@ -52,114 +45,6 @@ public class GenericsPropertyState exten
     }
 
     @Override
-    protected Iterable<Long> getLongs() {
-        if (type == Type.DATES) {
-            return Iterables.transform(values, new Function<String, Long>() {
-                @Override
-                public Long apply(String value) {
-                    Calendar calendar = Conversions.convert(value).toDate();
-                    return Conversions.convert(calendar).toLong();
-                }
-            });
-        }
-        else {
-            return super.getLongs();
-        }
-    }
-
-    @Override
-    protected long getLong(int index) {
-        if (type == Type.DATES) {
-            Calendar calendar = Conversions.convert(values.get(index)).toDate();
-            return Conversions.convert(calendar).toLong();
-        }
-        else {
-            return super.getLong(index);
-        }
-    }
-
-    @Override
-    protected Iterable<Double> getDoubles() {
-        if (type == Type.DATES) {
-            return Iterables.transform(values, new Function<String, Double>() {
-                @Override
-                public Double apply(String value) {
-                    Calendar calendar = Conversions.convert(value).toDate();
-                    return Conversions.convert(calendar).toDouble();
-                }
-            });
-        }
-        else {
-            return super.getDoubles();
-        }
-    }
-
-    @Override
-    protected double getDouble(int index) {
-        if (type == Type.DATES) {
-            Calendar calendar = Conversions.convert(values.get(index)).toDate();
-            return Conversions.convert(calendar).toDouble();
-        }
-        else {
-            return super.getDouble(index);
-        }
-    }
-
-    @Override
-    protected Iterable<String> getDates() {
-        if (type == Type.DATES) {
-            return Iterables.transform(values, new Function<String, String>() {
-                @Override
-                public String apply(String value) {
-                    Calendar calendar = Conversions.convert(value).toDate();
-                    return Conversions.convert(calendar).toString();
-                }
-            });
-        }
-        else {
-            return super.getDates();
-        }
-    }
-
-    @Override
-    protected String getDate(int index) {
-        if (type == Type.DATES) {
-            Calendar calendar = Conversions.convert(values.get(index)).toDate();
-            return Conversions.convert(calendar).toString();
-        }
-        else {
-            return super.getDate(index);
-        }
-    }
-
-    @Override
-    protected Iterable<BigDecimal> getDecimals() {
-        if (type == Type.DATES) {
-            return Iterables.transform(values, new Function<String, BigDecimal>() {
-                @Override
-                public BigDecimal apply(String value) {
-                    Calendar calendar = Conversions.convert(value).toDate();
-                    return Conversions.convert(calendar).toDecimal();
-                }
-            });
-        }
-        else {
-            return super.getDecimals();
-        }
-    }
-
-    @Override
-    protected BigDecimal getDecimal(int index) {
-        if (type == Type.DATES) {
-            Calendar calendar = Conversions.convert(values.get(index)).toDate();
-            return Conversions.convert(calendar).toDecimal();
-        }
-        else {
-            return super.getDecimal(index);
-        }
-    }
-
-    @Override
     public Type<?> getType() {
         return type;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongPropertyState.java Fri Oct 19 23:25:09 2012
@@ -24,14 +24,30 @@ import java.util.Calendar;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 
-import static org.apache.jackrabbit.oak.api.Type.LONG;
-
 public class LongPropertyState extends SinglePropertyState {
     private final long value;
+    private final Type<?> type;
 
-    protected LongPropertyState(String name, long value) {
+    private LongPropertyState(String name, long value, Type<?> type) {
         super(name);
         this.value = value;
+        this.type = type;
+    }
+
+    public static LongPropertyState createLongProperty(String name, long value) {
+        return new LongPropertyState(name, value, Type.LONG);
+    }
+
+    public static LongPropertyState createDateProperty(String name, long value) {
+        return new LongPropertyState(name, value, Type.DATE);
+    }
+
+    public static LongPropertyState createDateProperty(String name, Calendar value) {
+        return new LongPropertyState(name, Conversions.convert(value).toLong(), Type.DATE);
+    }
+
+    public static LongPropertyState createDateProperty(String name, String value) {
+        return createDateProperty(name, Conversions.convert(value).toCalendar());
     }
 
     @Override
@@ -51,17 +67,18 @@ public class LongPropertyState extends S
 
     @Override
     protected String getDate() {
-        Calendar calendar = Conversions.convert(value).toDate();
-        return Conversions.convert(calendar).toString();
+        return Conversions.convert(value).toDate();
     }
 
     @Override
     public String getString() {
-        return Conversions.convert(value).toString();
+        return type == Type.LONG
+            ? Conversions.convert(value).toString()
+            : getDate();
     }
 
     @Override
     public Type<?> getType() {
-        return LONG;
+        return type;
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongsPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongsPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongsPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongsPropertyState.java Fri Oct 19 23:25:09 2012
@@ -24,15 +24,40 @@ import java.util.List;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 
-import static org.apache.jackrabbit.oak.api.Type.LONGS;
-
 public class LongsPropertyState extends MultiPropertyState<Long> {
+    private final Type<?> type;
 
-    protected LongsPropertyState(String name, List<Long> values) {
+    private LongsPropertyState(String name, Iterable<Long> values, Type<?> type) {
         super(name, values);
+        this.type = type;
+    }
+
+    public static LongsPropertyState createLongsProperty(String name, Iterable<Long> values) {
+        return new LongsPropertyState(name, Lists.newArrayList(values), Type.LONGS);
+    }
+
+    public static LongsPropertyState createDatesPropertyFromLong(String name, Iterable<Long> values) {
+        return new LongsPropertyState(name, Lists.newArrayList(values), Type.DATES);
+    }
+
+    public static LongsPropertyState createDatesPropertyFromCalendar(String name, Iterable<Calendar> values) {
+        List<Long> dates = Lists.newArrayList();
+        for (Calendar v : values) {
+            dates.add(Conversions.convert(v).toLong());
+        }
+        return new LongsPropertyState(name, dates, Type.DATES);
+    }
+
+    public static LongsPropertyState createDatesProperty(String name, Iterable<String> values) {
+        List<Calendar> dates = Lists.newArrayList();
+        for (String v : values) {
+            dates.add(Conversions.convert(v).toCalendar());
+        }
+        return createDatesPropertyFromCalendar(name, dates);
     }
 
     @Override
@@ -65,8 +90,7 @@ public class LongsPropertyState extends 
         return Iterables.transform(values, new Function<Long, String>() {
             @Override
             public String apply(Long value) {
-                Calendar calendar = Conversions.convert(value).toDate();
-                return Conversions.convert(calendar).toString();
+                return Conversions.convert(value).toDate();
             }
         });
     }
@@ -78,8 +102,7 @@ public class LongsPropertyState extends 
 
     @Override
     protected String getDate(int index) {
-        Calendar calendar = Conversions.convert(values.get(index)).toDate();
-        return Conversions.convert(calendar).toString();
+        return Conversions.convert(values.get(index)).toDate();
     }
 
     @Override
@@ -94,21 +117,33 @@ public class LongsPropertyState extends 
 
     @Override
     protected Iterable<String> getStrings() {
-        return Iterables.transform(values, new Function<Long, String>() {
-            @Override
-            public String apply(Long value) {
-                return Conversions.convert(value).toString();
-            }
-        });
+        if (type == Type.DATES) {
+            return Iterables.transform(values, new Function<Long, String>() {
+                @Override
+                public String apply(Long value) {
+                    return Conversions.convert(value).toDate();
+                }
+            });
+        }
+        else {
+            return Iterables.transform(values, new Function<Long, String>() {
+                @Override
+                public String apply(Long value) {
+                    return Conversions.convert(value).toString();
+                }
+            });
+        }
     }
 
     @Override
     protected String getString(int index) {
-        return Conversions.convert(values.get(index)).toString();
+        return (type == Type.DATES)
+            ? getDate(index)
+            : Conversions.convert(values.get(index)).toString();
     }
 
     @Override
     public Type<?> getType() {
-        return LONGS;
+        return type;
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryPropertyBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryPropertyBuilder.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryPropertyBuilder.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryPropertyBuilder.java Fri Oct 19 23:25:09 2012
@@ -159,13 +159,14 @@ public class MemoryPropertyBuilder<T> im
                     return PropertyStates.longProperty(name, (Iterable<Long>) values);
                 case PropertyType.DOUBLE:
                     return PropertyStates.doubleProperty(name, (Iterable<Double>) values);
+                case PropertyType.DATE:
+                    return LongsPropertyState.createDatesProperty(name, (Iterable<String>) values);
                 case PropertyType.BOOLEAN:
                     return PropertyStates.booleanProperty(name, (Iterable<Boolean>) values);
                 case PropertyType.DECIMAL:
                     return PropertyStates.decimalProperty(name, (Iterable<BigDecimal>) values);
                 default:
-                    return new GenericsPropertyState(name, (List<String>) Lists.newArrayList(values),
-                            Type.fromTag(type.tag(), true));
+                    return new GenericsPropertyState(name, (Iterable<String>) values, Type.fromTag(type.tag(), true));
             }
         }
         else {
@@ -179,6 +180,8 @@ public class MemoryPropertyBuilder<T> im
                     return PropertyStates.longProperty(name, (Long) value);
                 case PropertyType.DOUBLE:
                     return PropertyStates.doubleProperty(name, (Double) value);
+                case PropertyType.DATE:
+                    return PropertyStates.dateProperty(name, (String) value);
                 case PropertyType.BOOLEAN:
                     return PropertyStates.booleanProperty(name, (Boolean) value);
                 case PropertyType.DECIMAL:

Modified: 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=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java Fri Oct 19 23:25:09 2012
@@ -19,7 +19,6 @@
 package org.apache.jackrabbit.oak.plugins.memory;
 
 import java.math.BigDecimal;
-import java.util.Calendar;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -27,6 +26,7 @@ import javax.jcr.PropertyType;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
 import org.apache.jackrabbit.oak.api.Blob;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
@@ -45,9 +45,9 @@ abstract class MultiPropertyState<T> ext
      * @param name  The name of the property state.
      * @param values  The values of the property state.
      */
-    protected MultiPropertyState(String name, List<T> values) {
+    protected MultiPropertyState(String name, Iterable<T> values) {
         super(name);
-        this.values = values;
+        this.values = Lists.newArrayList(values);
     }
 
     /**
@@ -106,8 +106,7 @@ abstract class MultiPropertyState<T> ext
         return Iterables.transform(getStrings(), new Function<String, String>() {
             @Override
             public String apply(String value) {
-                Calendar calendar = Conversions.convert(value).toDate();
-                return Conversions.convert(calendar).toString();
+                return Conversions.convert(value).toDate();
             }
         });
     }
@@ -165,8 +164,7 @@ abstract class MultiPropertyState<T> ext
      * @return  The value at the given {@code index} as {@code date}
      */
     protected String getDate(int index) {
-        Calendar calendar = Conversions.convert(getString(index)).toDate();
-        return Conversions.convert(calendar).toString();
+        return Conversions.convert(getString(index)).toDate();
     }
 
     /**
@@ -237,7 +235,7 @@ abstract class MultiPropertyState<T> ext
             case PropertyType.REFERENCE: return (T) getString(index);
             case PropertyType.WEAKREFERENCE: return (T) getString(index);
             case PropertyType.URI: return (T) getString(index);
-            case PropertyType.DECIMAL: return (T) getString(index);
+            case PropertyType.DECIMAL: return (T) getDecimal(index);
             default: throw new IllegalArgumentException("Invalid type:" + type);
         }
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStates.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStates.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStates.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStates.java Fri Oct 19 23:25:09 2012
@@ -19,6 +19,7 @@
 package org.apache.jackrabbit.oak.plugins.memory;
 
 import java.math.BigDecimal;
+import java.util.Calendar;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -37,8 +38,6 @@ import org.apache.jackrabbit.oak.kernel.
 import org.apache.jackrabbit.oak.kernel.TypeCodes;
 import org.apache.jackrabbit.oak.plugins.value.Conversions;
 
-import static org.apache.jackrabbit.oak.api.Type.DATE;
-import static org.apache.jackrabbit.oak.api.Type.DATES;
 import static org.apache.jackrabbit.oak.api.Type.NAME;
 import static org.apache.jackrabbit.oak.api.Type.NAMES;
 import static org.apache.jackrabbit.oak.api.Type.PATH;
@@ -78,6 +77,8 @@ public final class PropertyStates {
                 return longProperty(name, value.getLong());
             case PropertyType.DOUBLE:
                 return doubleProperty(name, value.getDouble());
+            case PropertyType.DATE:
+                return dateProperty(name, value.getLong());
             case PropertyType.BOOLEAN:
                 return booleanProperty(name, value.getBoolean());
             case PropertyType.DECIMAL:
@@ -131,6 +132,12 @@ public final class PropertyStates {
                     doubles.add(value.getDouble());
                 }
                 return doubleProperty(name, doubles);
+            case PropertyType.DATE:
+                List<Long> dates = Lists.newArrayList();
+                for (Value value : values) {
+                    dates.add(value.getLong());
+                }
+                return datePropertyFromLong(name, dates);
             case PropertyType.BOOLEAN:
                 List<Boolean> booleans = Lists.newArrayList();
                 for (Value value : values) {
@@ -163,17 +170,19 @@ public final class PropertyStates {
     public static PropertyState createProperty(String name, String value, int type) {
         switch (type) {
             case PropertyType.STRING:
-                return new StringPropertyState(name, value);
+                return stringProperty(name, value);
             case PropertyType.BINARY:
-                return new BinaryPropertyState(name, Conversions.convert(value).toBinary());
+                return binaryProperty(name, Conversions.convert(value).toBinary());
             case PropertyType.LONG:
-                return new LongPropertyState(name, Conversions.convert(value).toLong());
+                return longProperty(name, Conversions.convert(value).toLong());
             case PropertyType.DOUBLE:
-                return new DoublePropertyState(name, Conversions.convert(value).toDouble());
+                return doubleProperty(name, Conversions.convert(value).toDouble());
+            case PropertyType.DATE:
+                return dateProperty(name, value);
             case PropertyType.BOOLEAN:
-                return new BooleanPropertyState(name, Conversions.convert(value).toBoolean());
+                return booleanProperty(name, Conversions.convert(value).toBoolean());
             case PropertyType.DECIMAL:
-                return new DecimalPropertyState(name, Conversions.convert(value).toDecimal());
+                return decimalProperty(name, Conversions.convert(value).toDecimal());
             default:
                 return new GenericPropertyState(name, value, Type.fromTag(type, false));
         }
@@ -334,7 +343,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#LONG}
      */
     public static PropertyState longProperty(String name, long value) {
-        return new LongPropertyState(name, value);
+        return LongPropertyState.createLongProperty(name, value);
     }
 
     /**
@@ -355,7 +364,29 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#DATE}
      */
     public static PropertyState dateProperty(String name, String value) {
-        return new GenericPropertyState(name, value, DATE);
+        return LongPropertyState.createDateProperty(name, value);
+    }
+
+    /**
+     * Create a {@code PropertyState} from a date. No validation is performed
+     * on the string passed for {@code value}.
+     * @param name  The name of the property state
+     * @param value  The value of the property state
+     * @return  The new property state of type {@link Type#DATE}
+     */
+    public static PropertyState dateProperty(String name, long value) {
+        return LongPropertyState.createDateProperty(name, value);
+    }
+
+    /**
+     * Create a {@code PropertyState} from a date. No validation is performed
+     * on the string passed for {@code value}.
+     * @param name  The name of the property state
+     * @param value  The value of the property state
+     * @return  The new property state of type {@link Type#DATE}
+     */
+    public static PropertyState dateProperty(String name, Calendar value) {
+        return LongPropertyState.createDateProperty(name, value);
     }
 
     /**
@@ -440,7 +471,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#STRINGS}
      */
     public static PropertyState stringProperty(String name, Iterable<String> values) {
-        return new StringsPropertyState(name, Lists.newArrayList(values));
+        return new StringsPropertyState(name, values);
     }
 
     /**
@@ -450,7 +481,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#BINARIES}
      */
     public static PropertyState binaryPropertyFromBlob(String name, Iterable<Blob> values) {
-        return new BinariesPropertyState(name, Lists.newArrayList(values));
+        return new BinariesPropertyState(name, values);
     }
 
     /**
@@ -474,7 +505,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#LONGS}
      */
     public static PropertyState longProperty(String name, Iterable<Long> values) {
-        return new LongsPropertyState(name, Lists.newArrayList(values));
+        return LongsPropertyState.createLongsProperty(name, values);
     }
 
     /**
@@ -484,7 +515,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#DOUBLES}
      */
     public static PropertyState doubleProperty(String name, Iterable<Double> values) {
-        return new DoublesPropertyState(name, Lists.newArrayList(values));
+        return new DoublesPropertyState(name, values);
     }
 
     /**
@@ -495,7 +526,29 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#DATES}
      */
     public static PropertyState dateProperty(String name, Iterable<String> values) {
-        return new GenericsPropertyState(name, Lists.newArrayList(values), DATES);
+        return LongsPropertyState.createDatesProperty(name, values);
+    }
+
+    /**
+     * Create a multi valued {@code PropertyState} from a list of dates.
+     * No validation is performed on the strings passed for {@code values}.
+     * @param name  The name of the property state
+     * @param values  The values of the property state
+     * @return  The new property state of type {@link Type#DATES}
+     */
+    public static PropertyState datePropertyFromLong(String name, Iterable<Long> values) {
+        return LongsPropertyState.createDatesPropertyFromLong(name, values);
+    }
+
+    /**
+     * Create a multi valued {@code PropertyState} from a list of dates.
+     * No validation is performed on the strings passed for {@code values}.
+     * @param name  The name of the property state
+     * @param values  The values of the property state
+     * @return  The new property state of type {@link Type#DATES}
+     */
+    public static PropertyState datePropertyFromCalendar(String name, Iterable<Calendar> values) {
+        return LongsPropertyState.createDatesPropertyFromCalendar(name, values);
     }
 
     /**
@@ -505,7 +558,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#BOOLEANS}
      */
     public static PropertyState booleanProperty(String name, Iterable<Boolean> values) {
-        return new BooleansPropertyState(name, Lists.newArrayList(values));
+        return new BooleansPropertyState(name, values);
     }
 
     /**
@@ -516,7 +569,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#NAMES}
      */
     public static PropertyState nameProperty(String name, Iterable<String> values) {
-        return new GenericsPropertyState(name, Lists.newArrayList(values), NAMES);
+        return new GenericsPropertyState(name, values, NAMES);
     }
 
     /**
@@ -527,7 +580,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#PATHS}
      */
     public static PropertyState pathProperty(String name, Iterable<String> values) {
-        return new GenericsPropertyState(name, Lists.newArrayList(values), PATHS);
+        return new GenericsPropertyState(name, values, PATHS);
     }
 
     /**
@@ -538,7 +591,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#REFERENCES}
      */
     public static PropertyState referenceProperty(String name, Iterable<String> values) {
-        return new GenericsPropertyState(name, Lists.newArrayList(values), REFERENCES);
+        return new GenericsPropertyState(name, values, REFERENCES);
     }
 
     /**
@@ -549,7 +602,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#WEAKREFERENCES}
      */
     public static PropertyState weakreferenceProperty(String name, Iterable<String> values) {
-        return new GenericsPropertyState(name, Lists.newArrayList(values), WEAKREFERENCES);
+        return new GenericsPropertyState(name, values, WEAKREFERENCES);
     }
 
     /**
@@ -560,7 +613,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#URIS}
      */
     public static PropertyState uriProperty(String name, Iterable<String> values) {
-        return new GenericsPropertyState(name, Lists.newArrayList(values), URIS);
+        return new GenericsPropertyState(name, values, URIS);
     }
 
     /**
@@ -570,7 +623,7 @@ public final class PropertyStates {
      * @return  The new property state of type {@link Type#DECIMALS}
      */
     public static PropertyState decimalProperty(String name, Iterable<BigDecimal> values) {
-        return new DecimalsPropertyState(name, Lists.newArrayList(values));
+        return new DecimalsPropertyState(name, values);
     }
 
     /**

Modified: 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=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/SinglePropertyState.java Fri Oct 19 23:25:09 2012
@@ -19,7 +19,6 @@
 package org.apache.jackrabbit.oak.plugins.memory;
 
 import java.math.BigDecimal;
-import java.util.Calendar;
 
 import javax.annotation.Nonnull;
 import javax.jcr.PropertyType;
@@ -76,8 +75,7 @@ abstract class SinglePropertyState exten
      * @return  date value converted by {@code Conversions.convert(String)}
      */
     protected String getDate() {
-        Calendar calendar = Conversions.convert(getString()).toDate();
-        return Conversions.convert(calendar).toString();
+        return Conversions.convert(getString()).toDate();
     }
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/StringsPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/StringsPropertyState.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/StringsPropertyState.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/StringsPropertyState.java Fri Oct 19 23:25:09 2012
@@ -18,12 +18,10 @@
  */
 package org.apache.jackrabbit.oak.plugins.memory;
 
-import java.util.List;
-
 import org.apache.jackrabbit.oak.api.Type;
 
 public class StringsPropertyState extends MultiPropertyState<String> {
-    protected StringsPropertyState(String name, List<String> values) {
+    protected StringsPropertyState(String name, Iterable<String> values) {
         super(name, values);
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/Conversions.java Fri Oct 19 23:25:09 2012
@@ -86,17 +86,26 @@ public final class Conversions {
         /**
          * Convert to date. This default implementation is based on {@code ISO8601.parse(String)}.
          * @return  date representation of the converted value
-         * @throws IllegalStateException  if the string cannot be parsed into a date
+         * @throws IllegalArgumentException  if the string cannot be parsed into a date
          */
-        public Calendar toDate() {
+        public Calendar toCalendar() {
             Calendar date = ISO8601.parse(toString());
             if (date == null) {
-                throw new IllegalStateException("Not a date string: " + toString());
+                throw new IllegalArgumentException("Not a date string: " + toString());
             }
             return date;
         }
 
         /**
+         * Convert to date. This default implementation is based on {@code ISO8601.parse(String)}.
+         * @return  date representation of the converted value
+         * @throws IllegalArgumentException  if the string cannot be parsed into a date
+         */
+        public String toDate() {
+            return convert(toCalendar()).toString();
+        }
+
+        /**
          * Convert to boolean. This default implementation is based on {@code Boolean.parseBoolean(String)}.
          * @return  boolean representation of the converted value
          */
@@ -187,7 +196,7 @@ public final class Conversions {
             }
 
             @Override
-            public Calendar toDate() {
+            public Calendar toCalendar() {
                 Calendar date = Calendar.getInstance(TimeZone.getTimeZone("GMT+00:00"));
                 date.setTimeInMillis(value);
                 return date;
@@ -228,7 +237,7 @@ public final class Conversions {
             }
 
             @Override
-            public Calendar toDate() {
+            public Calendar toCalendar() {
                 Calendar date = Calendar.getInstance(TimeZone.getTimeZone("GMT+00:00"));
                 date.setTimeInMillis(toLong());
                 return date;
@@ -266,7 +275,7 @@ public final class Conversions {
             }
 
             @Override
-            public Calendar toDate() {
+            public Calendar toCalendar() {
                 return value;
             }
 
@@ -323,7 +332,7 @@ public final class Conversions {
             }
 
             @Override
-            public Calendar toDate() {
+            public Calendar toCalendar() {
                 Calendar date = Calendar.getInstance(TimeZone.getTimeZone("GMT+00:00"));
                 date.setTimeInMillis(toLong());
                 return date;

Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql1.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql1.txt?rev=1400338&r1=1400337&r2=1400338&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql1.txt (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql1.txt Fri Oct 19 23:25:09 2012
@@ -27,7 +27,7 @@
 
 sql1 select prop1 from nt:unstructured where prop1 is not null order by prop1 asc
 
-sql1 select * from nt:base where jcr:path like '/testroot/%' and birth > timestamp '1976-01-01t00:00:00.000+01:00'
+sql1 select * from nt:base where jcr:path like '/testroot/%' and birth > timestamp '1976-01-01T00:00:00.000+01:00'
 
 sql1 select * from nt:base where jcr:path like '/testroot/%' and value like 'foo\_bar' escape '\'
 



Mime
View raw message