Package org.firebirdsql.gds.ng
Enum StatementState
- java.lang.Object
- 
- java.lang.Enum<StatementState>
- 
- org.firebirdsql.gds.ng.StatementState
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<StatementState>
 
 public enum StatementState extends java.lang.Enum<StatementState> Statement states forFbStatementimplementations- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description ALLOCATEDStatement has been allocated or unprepared.CLOSEDStatement is closed or has been de-allocated.CLOSINGA statement is being closed, this is an ephemeral state that should only last as long as releasing resources on the database takes.CURSOR_OPENStatement has been executed, cursor is still open.ERRORLast statement execute or prepare resulted in an error.EXECUTINGA statement is being executed, this is an ephemeral state that should only last as long as the execute call to the database takes.NEWStatement is new and no statement handle has been allocated on the server.PREPAREDStatement has been prepared.PREPARINGStatement 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 SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisCursorOpen()Can a cursor be open in the current state?booleanisValidTransition(StatementState toState)Is the transition totoStatevalid from this state.java.util.Set<StatementState>validTransitionSet()static StatementStatevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static StatementState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
NEWpublic static final StatementState NEW Statement is new and no statement handle has been allocated on the server.
 - 
CLOSINGpublic static final StatementState CLOSING A statement is being closed, this is an ephemeral state that should only last as long as releasing resources on the database takes.
 - 
CLOSEDpublic static final StatementState CLOSED Statement is closed or has been de-allocated.
 - 
ALLOCATEDpublic static final StatementState ALLOCATED Statement has been allocated or unprepared.
 - 
PREPARINGpublic static final StatementState 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.
 - 
PREPAREDpublic static final StatementState PREPARED Statement has been prepared.
 - 
EXECUTINGpublic static final StatementState 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_OPENpublic static final StatementState CURSOR_OPEN Statement has been executed, cursor is still open.
 - 
ERRORpublic static final StatementState ERROR Last statement execute or prepare resulted in an error.
 
- 
 - 
Method Detail- 
valuespublic static StatementState[] 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 (StatementState c : StatementState.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static StatementState 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
 
 - 
isCursorOpenpublic boolean isCursorOpen() Can a cursor be open in the current state?- Returns:
- truea cursor can be open in this state
 
 - 
isValidTransitionpublic final boolean isValidTransition(StatementState toState) Is the transition totoStatevalid from this state.- Parameters:
- toState- The next state
- Returns:
- truetransition is valid
 
 - 
validTransitionSetpublic final java.util.Set<StatementState> validTransitionSet() - Returns:
- Set of valid transitions from this state
 
 
- 
 
-