Fields Summary |
---|
protected SQLException | exception |
protected transient Call | call |
protected transient DatabaseQuery | query |
protected transient AbstractRecord | queryArguments |
protected transient Accessor | accessor |
public static final int | SQL_EXCEPTION |
public static final int | CONFIGURATION_ERROR_CLASS_NOT_FOUND |
public static final int | DATABASE_ACCESSOR_NOT_CONNECTED |
public static final int | ERROR_READING_BLOB_DATA |
public static final int | COULD_NOT_CONVERT_OBJECT_TYPE |
public static final int | LOGOUT_WHILE_TRANSACTION_IN_PROGRESS |
public static final int | SEQUENCE_TABLE_INFORMATION_NOT_COMPLETE |
public static final int | ERROR_PREALLOCATING_SEQUENCE_NUMBERS |
public static final int | CANNOT_REGISTER_SYNCHRONIZATIONLISTENER_FOR_UNITOFWORK |
public static final int | SYNCHRONIZED_UNITOFWORK_DOES_NOT_SUPPORT_COMMITANDRESUME |
public static final int | CONFIGURATION_ERROR_NEW_INSTANCE_INSTANTIATION_EXCEPTION |
public static final int | CONFIGURATION_ERROR_NEW_INSTANCE_ILLEGAL_ACCESS_EXCEPTION |
public static final int | TRANSACTION_MANAGER_NOT_SET_FOR_JTS_DRIVER |
public static final int | ERROR_RETRIEVE_DB_METADATA_THROUGH_JDBC_CONNECTION |
Methods Summary |
---|
public static oracle.toplink.essentials.exceptions.DatabaseException | cannotRegisterSynchronizatonListenerForUnitOfWork(java.lang.Exception e)
Object[] args = { e };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, CANNOT_REGISTER_SYNCHRONIZATIONLISTENER_FOR_UNITOFWORK, args));
databaseException.setErrorCode(CANNOT_REGISTER_SYNCHRONIZATIONLISTENER_FOR_UNITOFWORK);
databaseException.setInternalException(e);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | configurationErrorClassNotFound(java.lang.String className)
Object[] args = { className };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, CONFIGURATION_ERROR_CLASS_NOT_FOUND, args));
databaseException.setErrorCode(CONFIGURATION_ERROR_CLASS_NOT_FOUND);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | configurationErrorNewInstanceIllegalAccessException(java.lang.IllegalAccessException exception, java.lang.Class javaClass)
Object[] args = { javaClass };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, CONFIGURATION_ERROR_NEW_INSTANCE_ILLEGAL_ACCESS_EXCEPTION, args));
databaseException.setErrorCode(CONFIGURATION_ERROR_NEW_INSTANCE_ILLEGAL_ACCESS_EXCEPTION);
databaseException.setInternalException(exception);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | configurationErrorNewInstanceInstantiationException(java.lang.InstantiationException exception, java.lang.Class javaClass)
Object[] args = { javaClass };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, CONFIGURATION_ERROR_NEW_INSTANCE_INSTANTIATION_EXCEPTION, args));
databaseException.setErrorCode(CONFIGURATION_ERROR_NEW_INSTANCE_INSTANTIATION_EXCEPTION);
databaseException.setInternalException(exception);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | couldNotConvertObjectType(int type)
Object[] args = { CR, new Integer(type) };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, COULD_NOT_CONVERT_OBJECT_TYPE, args));
databaseException.setErrorCode(COULD_NOT_CONVERT_OBJECT_TYPE);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | databaseAccessorNotConnected()
Object[] args = { };
String message = oracle.toplink.essentials.exceptions.i18n.ExceptionMessageGenerator.buildMessage(DatabaseException.class, DATABASE_ACCESSOR_NOT_CONNECTED, args);
DatabaseException databaseException = new DatabaseException(message);
databaseException.setErrorCode(DATABASE_ACCESSOR_NOT_CONNECTED);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | databaseAccessorNotConnected(oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor databaseAccessor)
Object[] args = { };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, DATABASE_ACCESSOR_NOT_CONNECTED, args));
databaseException.setErrorCode(DATABASE_ACCESSOR_NOT_CONNECTED);
databaseException.setAccessor(databaseAccessor);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | errorPreallocatingSequenceNumbers()
Object[] args = { };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, ERROR_PREALLOCATING_SEQUENCE_NUMBERS, args));
databaseException.setErrorCode(ERROR_PREALLOCATING_SEQUENCE_NUMBERS);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | errorReadingBlobData()
Object[] args = { };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, ERROR_READING_BLOB_DATA, args));
databaseException.setErrorCode(ERROR_READING_BLOB_DATA);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | errorRetrieveDbMetadataThroughJDBCConnection()
Object[] args = { };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, ERROR_RETRIEVE_DB_METADATA_THROUGH_JDBC_CONNECTION, args));
databaseException.setErrorCode(ERROR_RETRIEVE_DB_METADATA_THROUGH_JDBC_CONNECTION);
return databaseException;
|
public oracle.toplink.essentials.internal.databaseaccess.Accessor | getAccessor()PUBLIC:
Return the accessor.
return accessor;
|
public oracle.toplink.essentials.queryframework.Call | getCall()PUBLIC:
Return the call that caused the exception.
return call;
|
public int | getDatabaseErrorCode()PUBLIC:
This is the database error number.
Since it is possible to have no internal exception the errorCode will be zero in this case.
if (getInternalException() == null) {
return super.getErrorCode();
}
return ((SQLException)getInternalException()).getErrorCode();
|
public java.lang.String | getMessage()PUBLIC:
This is the database error message.
if (getInternalException() == null) {
return super.getMessage();
} else {
StringWriter writer = new StringWriter();
writer.write(super.getMessage());
writer.write(cr());
writer.write(getIndentationString());
writer.write(ExceptionMessageGenerator.getHeader("ErrorCodeHeader"));
if (getInternalException() instanceof SQLException) {
writer.write(Integer.toString(((SQLException)getInternalException()).getErrorCode()));
} else {
writer.write("000");
}
if (getCall() != null) {
writer.write(cr());
writer.write(getIndentationString());
writer.write(ExceptionMessageGenerator.getHeader("CallHeader"));
if (getAccessor() != null) {
writer.write(getCall().getLogString(getAccessor()));
} else {
writer.write(getCall().toString());
}
}
if (getQuery() != null) {
writer.write(cr());
writer.write(getIndentationString());
writer.write(ExceptionMessageGenerator.getHeader("QueryHeader"));
try {
writer.write(getQuery().toString());
} catch (RuntimeException badTooString) {
}
}
return writer.toString();
}
|
public oracle.toplink.essentials.queryframework.DatabaseQuery | getQuery()PUBLIC:
This method returns the databaseQuery.
DatabaseQuery is a visible class to the TopLink user.
Users create an appropriate query by creating an instance
of a concrete subclasses of DatabaseQuery.
return query;
|
public oracle.toplink.essentials.sessions.Record | getQueryArgumentsRecord()PUBLIC:
Return the query argements used in the original query when exception is thrown
return queryArguments;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | logoutWhileTransactionInProgress()
Object[] args = { };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, LOGOUT_WHILE_TRANSACTION_IN_PROGRESS, args));
databaseException.setErrorCode(LOGOUT_WHILE_TRANSACTION_IN_PROGRESS);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | sequenceTableInformationNotComplete()
Object[] args = { };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, SEQUENCE_TABLE_INFORMATION_NOT_COMPLETE, args));
databaseException.setErrorCode(SEQUENCE_TABLE_INFORMATION_NOT_COMPLETE);
return databaseException;
|
public void | setAccessor(oracle.toplink.essentials.internal.databaseaccess.Accessor accessor)INTERNAL:
Set the Accessor.
this.accessor = accessor;
|
public void | setCall(oracle.toplink.essentials.queryframework.Call call)INTERNAL:
Set the call that caused the exception.
this.call = call;
|
public void | setQuery(oracle.toplink.essentials.queryframework.DatabaseQuery query)PUBLIC:
This method set the databaseQuery.
DatabaseQuery is a visible class to the TopLink user.
Users create an appropriate query by creating an instance
of a concrete subclasses of DatabaseQuery.
this.query = query;
|
public void | setQueryArguments(oracle.toplink.essentials.internal.sessions.AbstractRecord queryArguments)PUBLIC:
Set the query argements used in the original query when exception is thrown
this.queryArguments = queryArguments;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | sqlException(java.sql.SQLException exception)
DatabaseException databaseException = new DatabaseException(exception);
databaseException.setErrorCode(SQL_EXCEPTION);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | sqlException(java.sql.SQLException exception, oracle.toplink.essentials.internal.databaseaccess.Accessor accessor, oracle.toplink.essentials.internal.sessions.AbstractSession session)
DatabaseException databaseException = new DatabaseException(exception);
databaseException.setErrorCode(SQL_EXCEPTION);
databaseException.setAccessor(accessor);
databaseException.setSession(session);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | sqlException(java.sql.SQLException exception, oracle.toplink.essentials.queryframework.Call call, oracle.toplink.essentials.internal.databaseaccess.Accessor accessor, oracle.toplink.essentials.internal.sessions.AbstractSession session)
DatabaseException databaseException = new DatabaseException(exception);
databaseException.setErrorCode(SQL_EXCEPTION);
databaseException.setAccessor(accessor);
databaseException.setCall(call);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | synchronizedUnitOfWorkDoesNotSupportCommitAndResume()
Object[] args = { };
String message = oracle.toplink.essentials.exceptions.i18n.ExceptionMessageGenerator.buildMessage(DatabaseException.class, SYNCHRONIZED_UNITOFWORK_DOES_NOT_SUPPORT_COMMITANDRESUME, args);
DatabaseException databaseException = new DatabaseException(message);
databaseException.setErrorCode(SYNCHRONIZED_UNITOFWORK_DOES_NOT_SUPPORT_COMMITANDRESUME);
return databaseException;
|
public static oracle.toplink.essentials.exceptions.DatabaseException | transactionManagerNotSetForJTSDriver()
Object[] args = { };
DatabaseException databaseException = new DatabaseException(ExceptionMessageGenerator.buildMessage(DatabaseException.class, TRANSACTION_MANAGER_NOT_SET_FOR_JTS_DRIVER, args));
databaseException.setErrorCode(TRANSACTION_MANAGER_NOT_SET_FOR_JTS_DRIVER);
return databaseException;
|