Class ValueConverter

java.lang.Object
org.apache.jackrabbit.oak.query.ValueConverter

public class ValueConverter extends Object
  • 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 convert
      targetType - the target property type
      mapper - the name mapper or null if no name/path mapping is required.
      Returns:
      the converted value
      Throws:
      IllegalArgumentException - if mapping is illegal