Package org.apache.jackrabbit.oak.query
Class ValueConverter
java.lang.Object
org.apache.jackrabbit.oak.query.ValueConverter
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
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:
IllegalArgumentException
- if mapping is illegal
-