org.firebirdsql.jaybird.props.def

## Enum ConnectionPropertyType

- java.lang.Object
- - java.lang.Enum<ConnectionPropertyType>
  - - org.firebirdsql.jaybird.props.def.ConnectionPropertyType

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ConnectionPropertyType>

      public enum ConnectionPropertyType
      extends java.lang.Enum<ConnectionPropertyType>

  Basic connection property types supported by Jaybird.
  Since:
    5
  Author:
    Mark Rotteveel

- - ### Enum Constant Summary

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

  - ### Method Summary

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

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

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

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

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

- - ### Enum Constant Detail

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

    - #### values

          public static ConnectionPropertyType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (ConnectionPropertyType c : ConnectionPropertyType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static ConnectionPropertyType valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getDefaultParameterType

          public final DpbType getDefaultParameterType()

    - #### toType

          @InternalApi
          public abstract java.lang.Object toType(java.lang.String stringValue)

      Convert a string to a value of this property type.
      Parameters:
        `stringValue` - String value
      Returns:
        Appropriate value of this type
      Throws:
        `java.lang.IllegalArgumentException` - For conversion errors

    - #### toType

          @InternalApi
          public abstract java.lang.Object toType(java.lang.Integer intValue)

      Convert an integer to a value of this property type.
      Parameters:
        `intValue` - integer value
      Returns:
        Appropriate value of this type
      Throws:
        `java.lang.IllegalArgumentException` - For conversion errors

    - #### toType

          @InternalApi
          public abstract java.lang.Object toType(java.lang.Boolean booleanValue)

      Convert a boolean to a value of this property type.
      Parameters:
        `booleanValue` - boolean value
      Returns:
        Appropriate value of this type
      Throws:
        `java.lang.IllegalArgumentException` - For conversion errors

    - #### asInteger

          @InternalApi
          public abstract java.lang.Integer asInteger(java.lang.Object value)

      Convert a value of this property type to integer.
      Parameters:
        `value` - value of this property type
      Returns:
        Integer equivalent
      Throws:
        `java.lang.ClassCastException` - if `value` is not of this type

    - #### asString

          @InternalApi
          public java.lang.String asString(java.lang.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 java.lang.Boolean asBoolean(java.lang.Object value)

      Convert a value of this property type to boolean.
      Parameters:
        `value` - value of this property type
      Returns:
        Boolean equivalent
      Throws:
        `java.lang.ClassCastException` - if `value` is not of this type

Copyright © 2001-2025 Jaybird (Firebird JDBC) team. All rights reserved.