com.metamatrix.jdbc.api
Class SQLStates

java.lang.Object
  extended by com.metamatrix.jdbc.api.SQLStates

public class SQLStates
extends java.lang.Object

Utility class containing 1) SQL state constants used to represent MetaMatrix JDBC error state code, and 2) utility methods to check whether a SQL state belongs to a particular class of exception states.

Since:
4.3

Nested Class Summary
static class SQLStates.SQLStateClass
           
 
Field Summary
static SQLStates.SQLStateClass CLASS_CONNECTION_EXCEPTION
          Identifies the SQLState class Connection Exception (08).
static SQLStates.SQLStateClass CLASS_INVALID_AUTHORIZATION_SPECIFICATION
          Identifies the SQLState class Invalid Authorization Specification (28).
static SQLStates.SQLStateClass CLASS_USAGE_ERROR
           
static java.lang.String CONNECTION_EXCEPTION_CONNECTION_DOES_NOT_EXIST
          Connection does not exist (SQL-99 08003)
static java.lang.String CONNECTION_EXCEPTION_CONNECTION_FAILURE
          Connection failure (SQL-99 08006)
static java.lang.String CONNECTION_EXCEPTION_CONNECTION_NAME_IN_USE
          Connection name in use (SQL-99 08002)
static java.lang.String CONNECTION_EXCEPTION_NO_SUBCLASS
          Connection Exception with no subclass (SQL-99 08000)
static java.lang.String CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION
          SQL-client unable to establish SQL-connection (SQL-99 08001)
static java.lang.String CONNECTION_EXCEPTION_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION
          SQL-server rejected establishment of SQL-connection (SQL-99 08004)
static java.lang.String CONNECTION_EXCEPTION_STALE_CONNECTION
          Connection is stale and should no longer be used.
static java.lang.String CONNECTION_EXCEPTION_TRANSACTION_RESOLUTION_UNKNOWN
          Transaction resolution unknown (SQL-99 08007)
static java.lang.String DEFAULT
          External routine exception.
static java.lang.String INVALID_AUTHORIZATION_SPECIFICATION_NO_SUBCLASS
          Invalid authorization specification with no subclass (SQL-99 28000)
static java.lang.String SUCESS
           
static java.lang.String USAGE_ERROR
          General query execution error
static java.lang.String VIRTUAL_PROCEDURE_ERROR
          Error raised by ERROR instruction in virtual procedure.
 
Constructor Summary
SQLStates()
           
 
Method Summary
static boolean belongsToClass(java.lang.String sqlStateCode, SQLStates.SQLStateClass sqlStateClass)
           
static SQLStates.SQLStateClass getClass(java.lang.String sqlStateCode)
           
static boolean isSystemErrorState(java.lang.String sqlStateCode)
           
static boolean isUsageErrorState(java.lang.String sqlStateCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_CONNECTION_EXCEPTION

public static final SQLStates.SQLStateClass CLASS_CONNECTION_EXCEPTION
Identifies the SQLState class Connection Exception (08).


CONNECTION_EXCEPTION_NO_SUBCLASS

public static final java.lang.String CONNECTION_EXCEPTION_NO_SUBCLASS
Connection Exception with no subclass (SQL-99 08000)

See Also:
Constant Field Values

CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION

public static final java.lang.String CONNECTION_EXCEPTION_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION
SQL-client unable to establish SQL-connection (SQL-99 08001)

See Also:
Constant Field Values

CONNECTION_EXCEPTION_CONNECTION_NAME_IN_USE

public static final java.lang.String CONNECTION_EXCEPTION_CONNECTION_NAME_IN_USE
Connection name in use (SQL-99 08002)

See Also:
Constant Field Values

CONNECTION_EXCEPTION_CONNECTION_DOES_NOT_EXIST

public static final java.lang.String CONNECTION_EXCEPTION_CONNECTION_DOES_NOT_EXIST
Connection does not exist (SQL-99 08003)

See Also:
Constant Field Values

CONNECTION_EXCEPTION_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION

public static final java.lang.String CONNECTION_EXCEPTION_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION
SQL-server rejected establishment of SQL-connection (SQL-99 08004)

See Also:
Constant Field Values

CONNECTION_EXCEPTION_CONNECTION_FAILURE

public static final java.lang.String CONNECTION_EXCEPTION_CONNECTION_FAILURE
Connection failure (SQL-99 08006)

See Also:
Constant Field Values

CONNECTION_EXCEPTION_TRANSACTION_RESOLUTION_UNKNOWN

public static final java.lang.String CONNECTION_EXCEPTION_TRANSACTION_RESOLUTION_UNKNOWN
Transaction resolution unknown (SQL-99 08007)

See Also:
Constant Field Values

CONNECTION_EXCEPTION_STALE_CONNECTION

public static final java.lang.String CONNECTION_EXCEPTION_STALE_CONNECTION
Connection is stale and should no longer be used. (08S01)

The SQLState subclass S01 is an implementation-specified condition and conforms to the subclass DataDirect uses for SocketExceptions.

See Also:
Constant Field Values

CLASS_INVALID_AUTHORIZATION_SPECIFICATION

public static final SQLStates.SQLStateClass CLASS_INVALID_AUTHORIZATION_SPECIFICATION
Identifies the SQLState class Invalid Authorization Specification (28).


INVALID_AUTHORIZATION_SPECIFICATION_NO_SUBCLASS

public static final java.lang.String INVALID_AUTHORIZATION_SPECIFICATION_NO_SUBCLASS
Invalid authorization specification with no subclass (SQL-99 28000)

See Also:
Constant Field Values

DEFAULT

public static final java.lang.String DEFAULT
External routine exception. This is the default unknown code

See Also:
Constant Field Values

SUCESS

public static final java.lang.String SUCESS
See Also:
Constant Field Values

CLASS_USAGE_ERROR

public static final SQLStates.SQLStateClass CLASS_USAGE_ERROR

USAGE_ERROR

public static final java.lang.String USAGE_ERROR
General query execution error

See Also:
Constant Field Values

VIRTUAL_PROCEDURE_ERROR

public static final java.lang.String VIRTUAL_PROCEDURE_ERROR
Error raised by ERROR instruction in virtual procedure.

See Also:
Constant Field Values
Constructor Detail

SQLStates

public SQLStates()
Method Detail

isSystemErrorState

public static boolean isSystemErrorState(java.lang.String sqlStateCode)

isUsageErrorState

public static boolean isUsageErrorState(java.lang.String sqlStateCode)

belongsToClass

public static boolean belongsToClass(java.lang.String sqlStateCode,
                                     SQLStates.SQLStateClass sqlStateClass)

getClass

public static SQLStates.SQLStateClass getClass(java.lang.String sqlStateCode)


Copyright © 2009. All Rights Reserved.