An exception that provides information on database access warnings. Warnings are silently chained to the object whose method caused it to be reported.
Warnings may be retrieved from Connection, Statement,
and ResultSet objects. Trying to retrieve a warning on a
connection after it has been closed will cause an exception to be thrown.
Similarly, trying to retrieve a warning on a statement after it has been
closed or on a result set after it has been closed will cause
an exception to be thrown. Note that closing a statement also
closes a result set that it might have produced.
Connection#getWarnings, Statement#getWarnings, ResultSet#getWarnings
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | SQLWarning(String
a description of the warning reason, String an XOPEN or SQL:2003 code identifying the warning SQLState, int a database vendor-specific warning code vendorCode)Constructs a |
| public | SQLWarning(String
a description of the warning reason, String an XOPEN or SQL:2003 code identifying the warning SQLState)Constructs a |
| public | SQLWarning(String
a description of the warning reason)Constructs a |
| public | |
| public | SQLWarning(Throwable
the underlying reason for this cause)SQLWarning (which is saved for later retrieval by the getCause() method); may be null indicating
the cause is non-existent or unknown.Constructs a |
| public | SQLWarning(String
a description of the warning reason, Throwable the underlying reason for this cause)SQLWarning
(which is saved for later retrieval by the getCause() method);
may be null indicating the cause is non-existent or unknown.Constructs a |
| public | SQLWarning(String
a description of the warning reason, String an XOPEN or SQL:2003 code identifying the warning SQLState, Throwable the underlying reason for this cause)SQLWarning (which is saved for later retrieval by the getCause() method); may be null indicating
the cause is non-existent or unknown.Constructs a |
| public | SQLWarning(String
a description of the warning reason, String an XOPEN or SQL:2003 code identifying the warning SQLState, int a database vendor-specific warning code vendorCode, Throwable the underlying reason for this cause)SQLWarning (which is saved for later retrieval by the getCause() method); may be null indicating
the cause is non-existent or unknown.Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public SQLWarning | Returns: the nextSQLException in the chain; null if noneRetrieves the warning chained to this |
| public void | setNextWarning(SQLWarning
the new end of the w)SQLException chainAdds a |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning(String reason, String SQLState, int vendorCode) Constructs a | |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning(String reason, String SQLState) Constructs a | |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning(String reason) Constructs a
| |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning() Constructs a | |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning(Throwable cause) Constructs a
| |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning(String reason, Throwable cause) Constructs a | |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning(String reason, String SQLState, Throwable cause) Constructs a | |
| SQLWarning | back to summary |
|---|---|
| public SQLWarning(String reason, String SQLState, int vendorCode, Throwable cause) Constructs a
| |
| getNextWarning | back to summary |
|---|---|
| public SQLWarning getNextWarning() Retrieves the warning chained to this
| |
| setNextWarning | back to summary |
|---|---|
| public void setNextWarning(SQLWarning w) Adds a
| |