Enum Class ConnectionPropertyType

java.lang.Object
java.lang.Enum<ConnectionPropertyType>
org.firebirdsql.jaybird.props.def.ConnectionPropertyType
All Implemented Interfaces:
Serializable, Comparable<ConnectionPropertyType>, Constable

public enum ConnectionPropertyType extends Enum<ConnectionPropertyType>
Basic connection property types supported by Jaybird.
Since:
5
Author:
Mark Rotteveel
  • Enum Constant Details

  • Method Details

    • values

      public static ConnectionPropertyType[] 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 ConnectionPropertyType 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
    • getDefaultParameterType

      public final DpbType getDefaultParameterType()
    • toType

      @InternalApi public abstract Object toType(String stringValue)
      Convert a string to a value of this property type.
      Parameters:
      stringValue - String value
      Returns:
      Appropriate value of this type
      Throws:
      IllegalArgumentException - For conversion errors
    • toType

      @InternalApi public abstract Object toType(Integer intValue)
      Convert an integer to a value of this property type.
      Parameters:
      intValue - integer value
      Returns:
      Appropriate value of this type
      Throws:
      IllegalArgumentException - For conversion errors
    • toType

      @InternalApi public abstract Object toType(Boolean booleanValue)
      Convert a boolean to a value of this property type.
      Parameters:
      booleanValue - boolean value
      Returns:
      Appropriate value of this type
      Throws:
      IllegalArgumentException - For conversion errors
    • asInteger

      @InternalApi public abstract Integer asInteger(Object value)
      Convert a value of this property type to integer.
      Parameters:
      value - value of this property type
      Returns:
      Integer equivalent
      Throws:
      ClassCastException - if value is not of this type
    • asString

      @InternalApi public String asString(Object value)
      Convert a value of this property type to string.
      Parameters:
      value - value of this property type
      Returns:
      String equivalent
    • asBoolean

      @InternalApi public abstract Boolean asBoolean(Object value)
      Convert a value of this property type to boolean.
      Parameters:
      value - value of this property type
      Returns:
      Boolean equivalent
      Throws:
      ClassCastException - if value is not of this type