com.softtech.jdbc
Class ExceptionFactory
java.lang.Object
com.softtech.jdbc.ExceptionFactory
public class ExceptionFactory
- extends java.lang.Object
Given a databaseType (e.g. DatabaseType.ORACLE), message, and SQLException, generate the
appropriate DatabaseException subclass object
- Author:
- Jeff Smith (jeff@SoftTechDesign.com, www.SoftTechDesign.com), Paolo Orru (paolo.orru@gmail.com), added PostgreSQL support
|
Method Summary |
static DatabaseException |
getException(int databaseType,
java.lang.String msg)
Generate an object of the correct exception subclass (of DatabaseException). |
static DatabaseException |
getException(int databaseType,
java.lang.String msg,
java.sql.SQLException e)
Generate the correct exception subclass (of DatabaseException). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionFactory
public ExceptionFactory()
getException
public static DatabaseException getException(int databaseType,
java.lang.String msg,
java.sql.SQLException e)
- Generate the correct exception subclass (of DatabaseException). For example, generate an
OracleException or a MySQLException.
- Parameters:
databaseType - msg - e -
- Returns:
- DatabaseException (subclass)
getException
public static DatabaseException getException(int databaseType,
java.lang.String msg)
- Generate an object of the correct exception subclass (of DatabaseException). For example,
generate an OracleException or a MySQLException.
- Parameters:
databaseType - msg -
- Returns:
- DatabaseException (subclass)