Module org.firebirdsql.jaybird
Package org.firebirdsql.jaybird.props.def

# 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

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `BOOLEAN`
  `INT`
  `STRING`
  `TRANSACTION_ISOLATION`
  Maps between transaction isolation level names and JDBC transaction isolation level codes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract Boolean`
  `asBoolean(Object value)`
  Convert a value of this property type to boolean.
  `abstract Integer`
  `asInteger(Object value)`
  Convert a value of this property type to integer.
  `String`
  `asString(Object value)`
  Convert a value of this property type to string.
  `final DpbType`
  `getDefaultParameterType()`
  `abstract Object`
  `toType(Boolean booleanValue)`
  Convert a boolean to a value of this property type.
  `abstract Object`
  `toType(Integer intValue)`
  Convert an integer to a value of this property type.
  `abstract Object`
  `toType(String stringValue)`
  Convert a string to a value of this property type.
  `static ConnectionPropertyType`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ConnectionPropertyType[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### STRING

    public static final ConnectionPropertyType STRING

  - ### INT

    public static final ConnectionPropertyType INT

  - ### BOOLEAN

    public static final ConnectionPropertyType BOOLEAN

  - ### TRANSACTION_ISOLATION

    @InternalApi public static final ConnectionPropertyType TRANSACTION_ISOLATION
    Maps between transaction isolation level names and JDBC transaction isolation level codes. For internal use only.

- ## 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