Enum Class VariableDataType

java.lang.Object
java.lang.Enum<VariableDataType>
org.deltafi.common.types.VariableDataType
All Implemented Interfaces:
Serializable, Comparable<VariableDataType>, Constable

public enum VariableDataType extends Enum<VariableDataType>
  • Enum Constant Details

  • Method Details

    • values

      public static VariableDataType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VariableDataType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • formatString

      public String formatString(String value)
      Format the value in a way that it can be mapped to json
      Parameters:
      value - to format
      Returns:
      formatted string that can be converted to json
    • validateValue

      public String validateValue(String value)
      Verify that the value can be converted to the data type
      Parameters:
      value - to verify
      Returns:
      null if there are no issues or an error message if the value is invalid
    • convertValue

      public Object convertValue(String value)
    • readStringAsMap

      public static Map<Object,Object> readStringAsMap(String value)
      Read a list of key value pairs into a Map where keys are delimited from values by colons and pairs are delimited by commas
      Parameters:
      value - string to convert to map
      Returns:
      map representation of the given string
    • readStringAsList

      public static List<String> readStringAsList(String value)
      Takes in a comma seperated list in a string and splits it into a list of strings. Each value will be trimmed, empty values are dropped from the list
      Parameters:
      value - string containing a comma separated
      Returns:
      value split into a list