org.firebirdsql.gds.ng

## Enum StatementType

- java.lang.Object
- - java.lang.Enum<StatementType>
  - - org.firebirdsql.gds.ng.StatementType

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

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

Firebird statement types.

Author:
  Mark Rotteveel

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`COMMIT`
`DDL`
`DELETE`
`GET_SEGMENT`
`INSERT`
`NONE`
`PUT_SEGMENT`
`ROLLBACK`
`SAVE_POINT`
`SELECT`
`SELECT_FOR_UPDATE`
`SET_GENERATOR`
`START_TRANSACTION`
`STORED_PROCEDURE`
`UPDATE`

### Method Summary

Methods
`int` `getStatementTypeCode()`
`boolean` `isTypeWithCursor()` Indicates whether this statement type has a cursor.
`boolean` `isTypeWithSingletonResult()` Indicates whether this statement type will produce a singleton result.
`boolean` `isTypeWithUpdateCounts()` Indicates whether this statement type can produce update counts.
`static StatementType` `valueOf(int statementTypeCode)` Gets the enum value matching statementTypeCode.
`static StatementType` `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static StatementType[]` `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

#### NONE

    public static final StatementType NONE

#### SELECT

    public static final StatementType SELECT

#### INSERT

    public static final StatementType INSERT

#### UPDATE

    public static final StatementType UPDATE

#### DELETE

    public static final StatementType DELETE

#### DDL

    public static final StatementType DDL

#### GET_SEGMENT

    public static final StatementType GET_SEGMENT

#### PUT_SEGMENT

    public static final StatementType PUT_SEGMENT

#### STORED_PROCEDURE

    public static final StatementType STORED_PROCEDURE

#### START_TRANSACTION

    public static final StatementType START_TRANSACTION

#### COMMIT

    public static final StatementType COMMIT

#### ROLLBACK

    public static final StatementType ROLLBACK

#### SELECT_FOR_UPDATE

    public static final StatementType SELECT_FOR_UPDATE

#### SET_GENERATOR

    public static final StatementType SET_GENERATOR

#### SAVE_POINT

    public static final StatementType SAVE_POINT

### Method Detail

#### values

    public static StatementType[] 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 (StatementType c : StatementType.values())
        System.out.println(c);

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

#### valueOf

    public static StatementType 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

#### getStatementTypeCode

    public int getStatementTypeCode()

Returns:
  Firebird statement type code

#### isTypeWithCursor

    public boolean isTypeWithCursor()

Indicates whether this statement type has a cursor.

Implementation assumes that this is the same for all Firebird versions.

Returns:
  `true` statement type has a cursor.

#### isTypeWithSingletonResult

    public boolean isTypeWithSingletonResult()

Indicates whether this statement type will produce a singleton result.

Implementation assumes that this is the same for all Firebird versions.

Returns:
  `true` statement type will produce a singleton result.

#### isTypeWithUpdateCounts

    public boolean isTypeWithUpdateCounts()

Indicates whether this statement type can produce update counts.

Note that in some cases (eg a select) the update count might not be available immediately.

Returns:
  `true` of this statement type produces an update count.

#### valueOf

    public static StatementType valueOf(int statementTypeCode)

Gets the enum value matching statementTypeCode.

Parameters:
  `statementTypeCode` - Firebird statement type code
Returns:
  StatementType value matching statementTypeCode
Throws:
  `java.lang.IllegalArgumentException` - If the statementTypeCode matches no enum value