|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--planetj.exception.CMException | +--planetj.dataengine.exception.DataEngineException | +--planetj.dataengine.exception.DESQLException
This exception class is used to wrapper SQLExceptions.
Field Summary |
Fields inherited from class planetj.exception.CMException |
DISPLAY_ALL, DISPLAY_CLASS_INFO, DISPLAY_DETAILED_MESSAGE, DISPLAY_MESSAGE, DISPLAY_ORIGINAL_EXCEPTION, FATAL, INFO, SHOW_EXCEPTION, WARNING |
Constructor Summary | |
DESQLException(SQLException sqle)
Creates and initializes a DESQLException object. |
|
DESQLException(SQLException sqle,
String sql)
Creates and initializes a DESQLException object. |
Method Summary | |
int |
getErrorCode()
Gets the vendor specific error code of the SQLException contained within
this DESQLException object. |
String |
getSQL()
Gets the original SQL String run that threw a SQLException . |
SQLException |
getSQLException()
Gets the SQLException wrapped inside this DESQLException . |
String |
getSQLState()
Gets the SQLState of the SQLException contained within
this DESQLException object. |
String |
getSQLStateClassCode()
Gets the SQLState's class code from the SQLException wrapped inside
this DESQLException . |
void |
setSQL(String sql)
Sets the original SQL String run that threw a SQLException . |
String |
toString()
Gets this DESQLException as a String. |
Methods inherited from class planetj.exception.CMException |
addPropertyChangeListener, firePropertyChange, getCMMessage, getDetailedMessage, getDisplayString, getDisplayType, getMessage, getNextException, getOriginalException, getType, removePropertyChangeListener, setDetailedMessage, setDisplayType, setMessage, setNextException, setOriginalException, setType |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DESQLException(SQLException sqle)
DESQLException
object.
sqle
- SQLExceptionpublic DESQLException(SQLException sqle, String sql)
DESQLException
object.
sqle
- SQLException
from running a SQL Stringsql
- SQL String run that threw the given SQLException
Method Detail |
public int getErrorCode()
SQLException
contained within
this DESQLException
object.
SQLException
public String getSQL()
SQLException
.
SQLException
public SQLException getSQLException()
SQLException
wrapped inside this DESQLException
.
SQLException
contained within this object.public String getSQLState()
SQLException
contained within
this DESQLException
object.
SQLException
public String getSQLStateClassCode()
SQLException
wrapped inside
this DESQLException
. The SQLState's class code is the first two
characters in the String. e.g. if the SQLState is "23000", then the class code
would be "23".
SQLException
public void setSQL(String sql)
SQLException
.
sql
- original SQL String run that threw a SQLException
public String toString()
DESQLException
as a String. Included in the String will
be the exception's message, detailed message, SQL String run when the wrapped
SQLException
was thrown, and original exception.
toString
in class CMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |