org.springframework.jdbc.support
Class CustomSQLErrorCodesTranslation

java.lang.Object
  extended by org.springframework.jdbc.support.CustomSQLErrorCodesTranslation

public class CustomSQLErrorCodesTranslation
extends java.lang.Object

JavaBean for holding custom JDBC error codes translation for a particular database. The "exceptionClass" property defines which exception will be thrown for the list of error codes specified in the errorCodes property.

Since:
1.1
Author:
Thomas Risberg
See Also:
SQLErrorCodeSQLExceptionTranslator

Field Summary
private  java.lang.String[] errorCodes
           
private  java.lang.Class exceptionClass
           
 
Constructor Summary
CustomSQLErrorCodesTranslation()
           
 
Method Summary
 java.lang.String[] getErrorCodes()
          Return the SQL error codes to match.
 java.lang.Class getExceptionClass()
          Return the exception class for the specified error codes.
 void setErrorCodes(java.lang.String[] errorCodes)
          Set the SQL error codes to match.
 void setExceptionClass(java.lang.Class exceptionClass)
          Set the exception class for the specified error codes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorCodes

private java.lang.String[] errorCodes

exceptionClass

private java.lang.Class exceptionClass
Constructor Detail

CustomSQLErrorCodesTranslation

public CustomSQLErrorCodesTranslation()
Method Detail

setErrorCodes

public void setErrorCodes(java.lang.String[] errorCodes)
Set the SQL error codes to match.


getErrorCodes

public java.lang.String[] getErrorCodes()
Return the SQL error codes to match.


setExceptionClass

public void setExceptionClass(java.lang.Class exceptionClass)
Set the exception class for the specified error codes.


getExceptionClass

public java.lang.Class getExceptionClass()
Return the exception class for the specified error codes.