public class JDBCException extends HibernateException
SQLException. Indicates that an exception occurred during a JDBC call.SQLException,
Serialized Form| Constructor and Description |
|---|
JDBCException(java.lang.String message,
java.sql.SQLException cause)
Constructs a JDBCException using the given information.
|
JDBCException(java.lang.String message,
java.sql.SQLException cause,
java.lang.String sql)
Constructs a JDBCException using the given information.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode()
Get the vendor specific error code from the underlying
SQLException. |
java.lang.String |
getSQL()
Get the actual SQL statement being executed when the exception occurred.
|
java.sql.SQLException |
getSQLException()
Get the underlying
SQLException. |
java.lang.String |
getSQLState()
Get the X/Open or ANSI SQL SQLState error code from the underlying
SQLException. |
public JDBCException(java.lang.String message,
java.sql.SQLException cause)
message - The message explaining the exception conditioncause - The underlying causepublic JDBCException(java.lang.String message,
java.sql.SQLException cause,
java.lang.String sql)
message - The message explaining the exception conditioncause - The underlying causesql - The sql being executed when the exception occurredpublic java.lang.String getSQLState()
SQLException.SQLException.getSQLState()public int getErrorCode()
SQLException.SQLException.getErrorCode()public java.sql.SQLException getSQLException()
SQLException.public java.lang.String getSQL()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.