| java.lang.Object com.triactive.jdo.store.SQLState
All known Subclasses: com.triactive.jdo.store.PostgreSQLSQLState,
SQLState | public class SQLState (Code) | | A SQLSTATE diagnostic code.
SQLSTATE is a 5-character string that some JDBC drivers return in their
SQLExceptions to indicate status in a vendor-independent way.
SQLSTATE can contain only digits and capital letters.
The first two characters of SQLSTATE indicate a class; the following three
characters indicate a subclass.
Class codes are unique, but subclass codes are not; the meaning of a subclass
code depends on the class code that accompanies it.
The initial character of the class and subclass indicates the source document
that defines that return condition:
-
Class codes starting with 0-4 or A-H mean that the result condition is
defined in the International Standard (or, for class 'HZ', in ISO RDA).
In this case, subclass codes for conditions specified in the same standard
also start with 0-4 or A-H.
The meaning of all other subclass codes is implementation-defined.
-
Class codes starting with 5-9 or I-Z denote implementation-specific
conditions.
In this case, subclass codes can start with any character.
The meaning of all subclass codes is implementation-defined, except that
implementations may not define '000' but return '000' when there is no
subclass information.
author: Mike Martin version: $Revision: 1.1 $ See Also: DatabaseAdapter |
Inner Class :public static class ClassCode | |
Constructor Summary | |
public | SQLState(String s) Constructs a SQLState object from the specified SQLSTATE string. |
Method Summary | |
final public String | classCode() Returns the class code for this SQLSTATE. | final public boolean | isStandard() Indicates whether or not this SQLSTATE value is defined by the
international SQL standard. | public boolean | isWorthRetrying() Indicates whether or not this SQLSTATE represents an error whose cause
may be transient, meaning the operation or transaction may succeed if
retried. | final public String | subclassCode() Returns the subclass code for this SQLSTATE. |
classCode | final public String classCode()(Code) | | Returns the class code for this SQLSTATE.
This is the first two characters.
|
isStandard | final public boolean isStandard()(Code) | | Indicates whether or not this SQLSTATE value is defined by the
international SQL standard.
true if this is a standard SQLSTATE value,false otherwise. |
isWorthRetrying | public boolean isWorthRetrying()(Code) | | Indicates whether or not this SQLSTATE represents an error whose cause
may be transient, meaning the operation or transaction may succeed if
retried.
The implementation in this class errs on the side of declaring things
retryable, meaning it returns false only for recognized values that are
known not to be worth retrying.
Subclasses may override this method in vendor-specific ways.
true if the error may be transient,false if a retry is known to be pointless. |
subclassCode | final public String subclassCode()(Code) | | Returns the subclass code for this SQLSTATE.
This is the last three characters.
|
|
|