Enum Class TextTypes.StringConversion

java.lang.Object
java.lang.Enum<TextTypes.StringConversion>
com.pervasive.datarush.schema.TextTypes.StringConversion
All Implemented Interfaces:
Serializable, Comparable<TextTypes.StringConversion>, java.lang.constant.Constable
Enclosing class:
TextTypes

public static enum TextTypes.StringConversion extends Enum<TextTypes.StringConversion>
Enumerates the possible conversions for string-valued text types.
  • Enum Constant Details

    • RAW

      public static final TextTypes.StringConversion RAW
      Leading and trailing whitespace is preserved.
    • NULLABLE_RAW

      public static final TextTypes.StringConversion NULLABLE_RAW
      Leading and trailing whitespace is preserved and the empty string is parsed as a null value.
    • TRIMMED

      public static final TextTypes.StringConversion TRIMMED
      Leading and trailing whitespace is removed.
    • NULLABLE_TRIMMED

      public static final TextTypes.StringConversion NULLABLE_TRIMMED
      Leading and trailing whitespace is removed and the empty string is parsed as a null value.
  • Method Details

    • values

      public static TextTypes.StringConversion[] 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 TextTypes.StringConversion 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
    • isTrimmed

      public boolean isTrimmed()
      Indicates whether the conversion trims leading and trailing whitespace.
      Returns:
      true if the conversion will trim whitespace, otherwise false.
    • isNullable

      public boolean isNullable()
      Indicates whether the empty string is converted to a null value or preserved as the empty string.
      Returns:
      true if the conversion translates the empty string, otherwise false.
    • getConversion

      public static TextTypes.StringConversion getConversion(boolean trimWhitespace, boolean nullable)
      Gets the conversion with the specified properties.
      Parameters:
      trimWhitespace - whether the conversion should trim whitespace
      nullable - whether the conversion translates the empty string to null
      Returns:
      the appropriate conversion