- All Implemented Interfaces:
Serializable
,Comparable<StatementState>
,Constable
Statement states for
FbStatement
implementations- Since:
- 3.0
- 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 ConstantsEnum ConstantDescriptionStatement has been allocated or unprepared.Statement is closed or has been de-allocated.A statement is being closed, this is an ephemeral state that should only last as long as releasing resources on the database takes.Statement has been executed, cursor is still open.Last statement execute or prepare resulted in an error.A statement is being executed, this is an ephemeral state that should only last as long as the execute call to the database takes.Statement is new and no statement handle has been allocated on the server.Statement has been prepared.Statement is preparing a new statement text, this is an ephemeral state that should only last as long as the prepare call to the database takes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Can a cursor be open in the current state?final boolean
isValidTransition
(StatementState toState) Is the transition totoState
valid from this state.final Set<StatementState>
static StatementState
Returns the enum constant of this class with the specified name.static StatementState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NEW
Statement is new and no statement handle has been allocated on the server. -
CLOSING
A statement is being closed, this is an ephemeral state that should only last as long as releasing resources on the database takes. -
CLOSED
Statement is closed or has been de-allocated. -
ALLOCATED
Statement has been allocated or unprepared. -
PREPARING
Statement is preparing a new statement text, this is an ephemeral state that should only last as long as the prepare call to the database takes. -
PREPARED
Statement has been prepared. -
EXECUTING
A statement is being executed, this is an ephemeral state that should only last as long as the execute call to the database takes. -
CURSOR_OPEN
Statement has been executed, cursor is still open. -
ERROR
Last statement execute or prepare resulted in an error.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
isCursorOpen
public boolean isCursorOpen()Can a cursor be open in the current state?- Returns:
true
a cursor can be open in this state
-
isValidTransition
Is the transition totoState
valid from this state.- Parameters:
toState
- The next state- Returns:
true
transition is valid
-
validTransitionSet
- Returns:
- Set of valid transitions from this state
-