Top Description Fields Constructors Methods
org.springframework.jdbc.support

public Class CustomSQLErrorCodesTranslation

extends Object
Class Inheritance
Imports
org.springframework.dao.DataAccessException, org.springframework.lang.Nullable, org.springframework.util.StringUtils

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.
Author
Thomas Risberg
Since
1.1
See Also
SQLErrorCodeSQLExceptionTranslator

Field Summary

Modifier and TypeField and Description
private String[]
private Class<?>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]
getErrorCodes()

Return the SQL error codes to match.

public Class<?>
getExceptionClass()

Return the exception class for the specified error codes.

public void
setErrorCodes(String... errorCodes)

Set the SQL error codes to match.

public void
setExceptionClass(Class<?> exceptionClass)

Set the exception class for the specified error codes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

errorCodesback to summary
private String[] errorCodes
exceptionClassback to summary
private Class<?> exceptionClass
Annotations
@Nullable

Constructor Detail

CustomSQLErrorCodesTranslationback to summary
public CustomSQLErrorCodesTranslation()

Method Detail

getErrorCodesback to summary
public String[] getErrorCodes()

Return the SQL error codes to match.

getExceptionClassback to summary
public Class<?> getExceptionClass()

Return the exception class for the specified error codes.

Annotations
@Nullable
setErrorCodesback to summary
public void setErrorCodes(String... errorCodes)

Set the SQL error codes to match.

setExceptionClassback to summary
public void setExceptionClass(Class<?> exceptionClass)

Set the exception class for the specified error codes.