Package org.apache.derby.iapi.jdbc
Class ExceptionFactory
- java.lang.Object
-
- org.apache.derby.iapi.jdbc.ExceptionFactory
-
- Direct Known Subclasses:
SQLExceptionFactory
public abstract class ExceptionFactory extends java.lang.ObjectAn exception factory is used to create SQLExceptions of the correct type.
-
-
Field Summary
Fields Modifier and Type Field Description private static ExceptionFactoryINSTANCEThe singleton ExceptionFactory instance.
-
Constructor Summary
Constructors Constructor Description ExceptionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExceptionFactorygetInstance()Get the singleton exception factory instance.abstract java.sql.SQLExceptiongetSQLException(java.lang.String message, java.lang.String messageId, java.sql.SQLException next, int severity, java.lang.Throwable cause, java.lang.Object... args)Construct an SQLException whose message and severity are specified explicitly.abstract java.sql.SQLExceptiongetSQLException(java.lang.String messageId, java.sql.SQLException next, java.lang.Throwable cause, java.lang.Object... args)Construct an SQLException whose message and severity are derived from the message id.
-
-
-
Field Detail
-
INSTANCE
private static final ExceptionFactory INSTANCE
The singleton ExceptionFactory instance.
-
-
Method Detail
-
getInstance
public static ExceptionFactory getInstance()
Get the singleton exception factory instance.- Returns:
- an
ExceptionFactoryinstance
-
getSQLException
public abstract java.sql.SQLException getSQLException(java.lang.String message, java.lang.String messageId, java.sql.SQLException next, int severity, java.lang.Throwable cause, java.lang.Object... args)Construct an SQLException whose message and severity are specified explicitly.- Parameters:
message- the exception messagemessageId- the message idnext- the next SQLExceptionseverity- the severity of the exceptioncause- the cause of the exceptionargs- the message arguments- Returns:
- an SQLException
-
getSQLException
public abstract java.sql.SQLException getSQLException(java.lang.String messageId, java.sql.SQLException next, java.lang.Throwable cause, java.lang.Object... args)Construct an SQLException whose message and severity are derived from the message id.- Parameters:
messageId- the message idnext- the next SQLExceptioncause- the cause of the exceptionargs- the message arguments- Returns:
- an SQLException
-
-