Top Description Fields Constructors Methods
org.apache.derby.shared.common.error

public abstract Class ExceptionFactory

extends Object
Class Inheritance
Imports
java.sql.SQLException

An exception factory is used to create SQLExceptions of the correct type.

Field Summary

Modifier and TypeField and Description
private static final ExceptionFactory
INSTANCE

The singleton ExceptionFactory instance.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ExceptionFactory

Returns:

an ExceptionFactory instance
getInstance
()

Get the singleton exception factory instance.

public abstract SQLException

Returns:

an SQLException
getSQLException
(String
the exception message
message
,
String
the message id
messageId
,
SQLException
the next SQLException
next
,
int
the severity of the exception
severity
,
Throwable
the cause of the exception
cause
,
Object...
the message arguments
args
)

Construct an SQLException whose message and severity are specified explicitly.

public abstract SQLException

Returns:

an SQLException
getSQLException
(String
the message id
messageId
,
SQLException
the next SQLException
next
,
Throwable
the cause of the exception
cause
,
Object...
the message arguments
args
)

Construct an SQLException whose message and severity are derived from the message id.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final ExceptionFactory INSTANCE

The singleton ExceptionFactory instance.

Constructor Detail

ExceptionFactoryback to summary
public ExceptionFactory()

Method Detail

getInstanceback to summary
public static ExceptionFactory getInstance()

Get the singleton exception factory instance.

Returns:ExceptionFactory

an ExceptionFactory instance

getSQLExceptionback to summary
public abstract SQLException getSQLException(String message, String messageId, SQLException next, int severity, Throwable cause, Object... args)

Construct an SQLException whose message and severity are specified explicitly.

Parameters
message:String

the exception message

messageId:String

the message id

next:SQLException

the next SQLException

severity:int

the severity of the exception

cause:Throwable

the cause of the exception

args:Object[]

the message arguments

Returns:SQLException

an SQLException

getSQLExceptionback to summary
public abstract SQLException getSQLException(String messageId, SQLException next, Throwable cause, Object... args)

Construct an SQLException whose message and severity are derived from the message id.

Parameters
messageId:String

the message id

next:SQLException

the next SQLException

cause:Throwable

the cause of the exception

args:Object[]

the message arguments

Returns:SQLException

an SQLException