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

# Enum Class DpbType

java.lang.Object
java.lang.Enum<DpbType>
org.firebirdsql.jaybird.props.DpbType

All Implemented Interfaces:
  `Serializable`, `Comparable<DpbType>`, `Constable`

public enum DpbType extends Enum<DpbType>
Identifies the database (or service attach) parameter buffer type of a connection property.

In general, there is a 1-on-1 correspondence with `ConnectionPropertyType`, but in some cases mapping might be different (current expectation: boolean connection properties that map to either a single item or a 0 / 1 value).

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
`BYTE`
Parameter value as a byte.
`INT`
Parameter value is an integer.
`NONE`
Parameter is not sent at all (primarily to have a null-safe value for connection properties that should not be sent to the server).
`SINGLE`
Parameter value is not sent (just presence or absence of the parameter item), corresponding value must be a `Boolean`.
`STRING`
Parameter value is a string.

## Method Summary

Modifier and Type
Method
Description
`abstract void`
`addValue(ParameterBuffer pb, int pbItem, Object value, ConnectionPropertyType type)`
Populate the parameter buffer `pb` with `pbItem` and `value`.
`static DpbType`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static DpbType[]`
`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 DpbType STRING
Parameter value is a string.

### INT

public static final DpbType INT
Parameter value is an integer.

### BYTE

public static final DpbType BYTE
Parameter value as a byte.

### SINGLE

public static final DpbType SINGLE
Parameter value is not sent (just presence or absence of the parameter item), corresponding value must be a `Boolean`.

### NONE

public static final DpbType NONE
Parameter is not sent at all (primarily to have a null-safe value for connection properties that should not be sent to the server).

## Method Details

### values

public static DpbType[] 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 DpbType 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

### addValue

public abstract void addValue(ParameterBuffer pb, int pbItem, Object value, ConnectionPropertyType type)
Populate the parameter buffer `pb` with `pbItem` and `value`.

Parameters:
  `pb` - Parameter buffer
  `pbItem` - Parameter buffer item
  `value` - Value
  `type` - Connection property type