org.apache.derby.impl.jdbc
Class EmbedSQLWarning
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLWarning
org.apache.derby.impl.jdbc.EmbedSQLWarning
- All Implemented Interfaces:
- java.io.Serializable
- public class EmbedSQLWarning
- extends java.sql.SQLWarning
This class understands the message protocol and looks up
SQLExceptions based on keys, so that the Local JDBC driver's
messages can be localized.
REMIND: May want to investigate putting some of this in the protocol
side, for the errors that any Cloudscape JDBC driver might return.
The ASSERT mechanism is a wrapper of the basic services,
to ensure that failed asserts at this level will behave
well in a JDBC environment.
- Author:
- ames
- See Also:
- Serialized Form
Fields inherited from class java.sql.SQLException |
|
Fields inherited from class java.lang.Exception |
|
Fields inherited from class java.lang.Throwable |
|
Constructor Summary |
protected |
EmbedSQLWarning(java.lang.String message,
java.lang.String sqlstate)
Because SQLWarning does not have settable fields,
the caller of the constructor must do message lookup,
and pass the appropriate values here for message and SQLState, |
Method Summary |
static java.sql.SQLWarning |
generateCsSQLWarning(StandardException se)
Generate an SQL Warning from a Standard Exception |
static java.sql.SQLWarning |
newEmbedSQLWarning(java.lang.String messageId)
|
static java.sql.SQLWarning |
newEmbedSQLWarning(java.lang.String messageId,
java.lang.Object arg)
This looks up the message and sqlstate values and generates
the appropriate exception off of them. |
java.lang.String |
toString()
Override Throwable's toString() to avoid the class name
appearing in the message. |
Methods inherited from class java.sql.SQLWarning |
getNextWarning, setNextWarning |
Methods inherited from class java.sql.SQLException |
getErrorCode, getNextException, getSQLState, setNextException |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EmbedSQLWarning
protected EmbedSQLWarning(java.lang.String message,
java.lang.String sqlstate)
- Because SQLWarning does not have settable fields,
the caller of the constructor must do message lookup,
and pass the appropriate values here for message and SQLState,
toString
public java.lang.String toString()
- Override Throwable's toString() to avoid the class name
appearing in the message.
newEmbedSQLWarning
public static java.sql.SQLWarning newEmbedSQLWarning(java.lang.String messageId)
newEmbedSQLWarning
public static java.sql.SQLWarning newEmbedSQLWarning(java.lang.String messageId,
java.lang.Object arg)
- This looks up the message and sqlstate values and generates
the appropriate exception off of them.
generateCsSQLWarning
public static java.sql.SQLWarning generateCsSQLWarning(StandardException se)
- Generate an SQL Warning from a Standard Exception
- Parameters:
se
- Exception to convert to a warning
- Returns:
- new SQLWarning with message and SQLState of the se
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.