Class PartitionDataTypeUtils


  • public class PartitionDataTypeUtils
    extends Object
    Utility methods for partition extractor.
    • Field Detail

      • CONVERTATION_FAILURE

        public static final Object CONVERTATION_FAILURE
        Convertation failure marker.
    • Method Detail

      • convert

        public static Object convert​(Object arg,
                                     PartitionParameterType targetType)
        Convert argument to the given type.
        Parameters:
        arg - Argument.
        targetType - Type.
        Returns:
        Converted argument or CONVERTATION_FAILURE if convertation failed.
      • stringToUUID

        public static Object stringToUUID​(String s)
        Utility method that helps to convert String to UUID. Given method is more fault tolerant than more common UUID.fromString(). For example it supports String represendation of UUID-without-hyphens conversion, that is not supported by mentioned above UUID.fromString().
        Parameters:
        s - String to
        Returns:
        UUID or CONVERTATION_FAILURE if convertation failed.