Package org.apache.jackrabbit.oak.query
Class ValueConverter
- java.lang.Object
-
- org.apache.jackrabbit.oak.query.ValueConverter
-
public class ValueConverter extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canConvert(int sourceType, int targetType)
static PropertyValue
convert(@NotNull PropertyValue value, int targetType, @Nullable NamePathMapper mapper)
Converts the given value to a value of the specified target type.
-
-
-
Method Detail
-
canConvert
public static boolean canConvert(int sourceType, int targetType)
-
convert
public static PropertyValue convert(@NotNull @NotNull PropertyValue value, int targetType, @Nullable @Nullable NamePathMapper mapper)
Converts the given value to a value of the specified target type. The conversion is performed according to the rules described in "3.6.4 Property Type Conversion" in the JCR 2.0 specification.- Parameters:
value
- the value to converttargetType
- the target property typemapper
- the name mapper ornull
if no name/path mapping is required.- Returns:
- the converted value
- Throws:
java.lang.IllegalArgumentException
- if mapping is illegal
-
-