|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.triactive.jdo.store.adapter.SqlState
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:
DatabaseAdapter
Nested Class Summary | |
static class |
SqlState.ClassCode
Contains constants for known SQLSTATE class codes. |
Constructor Summary | |
SqlState(java.lang.String s)
Constructs a SqlState object from the specified SQLSTATE string. |
Method Summary | |
java.lang.String |
classCode()
Returns the class code for this SQLSTATE. |
boolean |
isStandard()
Indicates whether or not this SQLSTATE value is defined by the international SQL standard. |
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. |
java.lang.String |
subclassCode()
Returns the subclass code for this SQLSTATE. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SqlState(java.lang.String s) throws java.lang.IllegalArgumentException
s
- A 5-character SQLSTATE string.
java.lang.IllegalArgumentException
- if s is not a valid 5-character SQLSTATE string.Method Detail |
public final java.lang.String classCode()
public final java.lang.String subclassCode()
public final boolean isStandard()
true
if this is a standard SQLSTATE value,
false
otherwise.public boolean isWorthRetrying()
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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |