Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.support
Class SQLErrorCodes

    java.lang.Object
      org.springframework.jdbc.support.SQLErrorCodes

    public class SQLErrorCodes

extends java.lang.Object

JavaBean for holding JDBC error codes for a particular database. Instances of this class are normally loaded through a bean factory.

Used by Spring's `SQLErrorCodeSQLExceptionTranslator`. The file "sql-error-codes.xml" in this package contains default `SQLErrorCodes` instances for various databases.

Author:
  Thomas Risberg, Juergen Hoeller
See Also:
  `SQLErrorCodesFactory`, `SQLErrorCodeSQLExceptionTranslator`

Constructor Summary
`SQLErrorCodes()`

Method Summary
`java.lang.String[]` | `getBadSqlGrammarCodes()`
`java.lang.String[]` | `getCannotAcquireLockCodes()`
`java.lang.String[]` | `getCannotSerializeTransactionCodes()`
`SQLExceptionTranslator` | `getCustomSqlExceptionTranslator()`
`CustomSQLErrorCodesTranslation[]` | `getCustomTranslations()`
`java.lang.String[]` | `getDataAccessResourceFailureCodes()`
`java.lang.String` | `getDatabaseProductName()`
`java.lang.String[]` | `getDatabaseProductNames()`
`java.lang.String[]` | `getDataIntegrityViolationCodes()`
`java.lang.String[]` | `getDeadlockLoserCodes()`
`java.lang.String[]` | `getDuplicateKeyCodes()`
`java.lang.String[]` | `getInvalidResultSetAccessCodes()`
`java.lang.String[]` | `getPermissionDeniedCodes()`
`java.lang.String[]` | `getTransientDataAccessResourceCodes()`
`boolean` | `isUseSqlStateForTranslation()`
`void` | `setBadSqlGrammarCodes(java.lang.String[] badSqlGrammarCodes)`
`void` | `setCannotAcquireLockCodes(java.lang.String[] cannotAcquireLockCodes)`
`void` | `setCannotSerializeTransactionCodes(java.lang.String[] cannotSerializeTransactionCodes)`
`void` | `setCustomSqlExceptionTranslator(SQLExceptionTranslator customSqlExceptionTranslator)`
`void` | `setCustomSqlExceptionTranslatorClass(java.lang.Class<? extends SQLExceptionTranslator> customTranslatorClass)`
`void` | `setCustomTranslations(CustomSQLErrorCodesTranslation[] customTranslations)`
`void` | `setDataAccessResourceFailureCodes(java.lang.String[] dataAccessResourceFailureCodes)`
`void` | `setDatabaseProductName(java.lang.String databaseProductName)` Set this property if the database name contains spaces, in which case we can not use the bean name for lookup.
`void` | `setDatabaseProductNames(java.lang.String[] databaseProductNames)` Set this property to specify multiple database names that contains spaces, in which case we can not use bean names for lookup.
`void` | `setDataIntegrityViolationCodes(java.lang.String[] dataIntegrityViolationCodes)`
`void` | `setDeadlockLoserCodes(java.lang.String[] deadlockLoserCodes)`
`void` | `setDuplicateKeyCodes(java.lang.String[] duplicateKeyCodes)`
`void` | `setInvalidResultSetAccessCodes(java.lang.String[] invalidResultSetAccessCodes)`
`void` | `setPermissionDeniedCodes(java.lang.String[] permissionDeniedCodes)`
`void` | `setTransientDataAccessResourceCodes(java.lang.String[] transientDataAccessResourceCodes)`
`void` | `setUseSqlStateForTranslation(boolean useStateCodeForTranslation)` Set this property to true for databases that do not provide an error code but that do provide SQL State (this includes PostgreSQL).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLErrorCodes

    public SQLErrorCodes()

Method Detail

### setDatabaseProductName

    public void setDatabaseProductName(java.lang.String databaseProductName)

  Set this property if the database name contains spaces, in which case we can not use the bean name for lookup.

### getDatabaseProductName

    public java.lang.String getDatabaseProductName()

### setDatabaseProductNames

    public void setDatabaseProductNames(java.lang.String[] databaseProductNames)

  Set this property to specify multiple database names that contains spaces, in which case we can not use bean names for lookup.

### getDatabaseProductNames

    public java.lang.String[] getDatabaseProductNames()

### setUseSqlStateForTranslation

    public void setUseSqlStateForTranslation(boolean useStateCodeForTranslation)

  Set this property to true for databases that do not provide an error code but that do provide SQL State (this includes PostgreSQL).

### isUseSqlStateForTranslation

    public boolean isUseSqlStateForTranslation()

### setBadSqlGrammarCodes

    public void setBadSqlGrammarCodes(java.lang.String[] badSqlGrammarCodes)

### getBadSqlGrammarCodes

    public java.lang.String[] getBadSqlGrammarCodes()

### setInvalidResultSetAccessCodes

    public void setInvalidResultSetAccessCodes(java.lang.String[] invalidResultSetAccessCodes)

### getInvalidResultSetAccessCodes

    public java.lang.String[] getInvalidResultSetAccessCodes()

### getDuplicateKeyCodes

    public java.lang.String[] getDuplicateKeyCodes()

### setDuplicateKeyCodes

    public void setDuplicateKeyCodes(java.lang.String[] duplicateKeyCodes)

### setDataIntegrityViolationCodes

    public void setDataIntegrityViolationCodes(java.lang.String[] dataIntegrityViolationCodes)

### getDataIntegrityViolationCodes

    public java.lang.String[] getDataIntegrityViolationCodes()

### setPermissionDeniedCodes

    public void setPermissionDeniedCodes(java.lang.String[] permissionDeniedCodes)

### getPermissionDeniedCodes

    public java.lang.String[] getPermissionDeniedCodes()

### setDataAccessResourceFailureCodes

    public void setDataAccessResourceFailureCodes(java.lang.String[] dataAccessResourceFailureCodes)

### getDataAccessResourceFailureCodes

    public java.lang.String[] getDataAccessResourceFailureCodes()

### setTransientDataAccessResourceCodes

    public void setTransientDataAccessResourceCodes(java.lang.String[] transientDataAccessResourceCodes)

### getTransientDataAccessResourceCodes

    public java.lang.String[] getTransientDataAccessResourceCodes()

### setCannotAcquireLockCodes

    public void setCannotAcquireLockCodes(java.lang.String[] cannotAcquireLockCodes)

### getCannotAcquireLockCodes

    public java.lang.String[] getCannotAcquireLockCodes()

### setDeadlockLoserCodes

    public void setDeadlockLoserCodes(java.lang.String[] deadlockLoserCodes)

### getDeadlockLoserCodes

    public java.lang.String[] getDeadlockLoserCodes()

### setCannotSerializeTransactionCodes

    public void setCannotSerializeTransactionCodes(java.lang.String[] cannotSerializeTransactionCodes)

### getCannotSerializeTransactionCodes

    public java.lang.String[] getCannotSerializeTransactionCodes()

### setCustomTranslations

    public void setCustomTranslations(CustomSQLErrorCodesTranslation[] customTranslations)

### getCustomTranslations

    public CustomSQLErrorCodesTranslation[] getCustomTranslations()

### setCustomSqlExceptionTranslatorClass

    public void setCustomSqlExceptionTranslatorClass(java.lang.Class<? extends SQLExceptionTranslator> customTranslatorClass)

### setCustomSqlExceptionTranslator

    public void setCustomSqlExceptionTranslator(SQLExceptionTranslator customSqlExceptionTranslator)

### getCustomSqlExceptionTranslator

    public SQLExceptionTranslator getCustomSqlExceptionTranslator()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD