クラス SQLErrorCodes
java.lang.ObjectSE
org.springframework.jdbc.support.SQLErrorCodes
特定のデータベースの JDBC エラーコードを保持するための JavaBean。このクラスのインスタンスは、通常 Bean ファクトリを通じてロードされます。
Spring の SQLErrorCodeSQLExceptionTranslator
によって使用されます。このパッケージのファイル "sql-error-codes.xml" には、さまざまなデータベースのデフォルト SQLErrorCodes
インスタンスが含まれています。
- 作成者:
- Thomas Risberg, Juergen Hoeller
- 関連事項:
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明StringSE[]
StringSE[]
StringSE[]
StringSE[]
StringSE[]
StringSE[]
StringSE[]
StringSE[]
StringSE[]
StringSE[]
StringSE[]
boolean
void
setBadSqlGrammarCodes
(StringSE... badSqlGrammarCodes) void
setCannotAcquireLockCodes
(StringSE... cannotAcquireLockCodes) void
setCannotSerializeTransactionCodes
(StringSE... cannotSerializeTransactionCodes) void
setCustomSqlExceptionTranslator
(SQLExceptionTranslator customSqlExceptionTranslator) void
setCustomSqlExceptionTranslatorClass
(ClassSE<? extends SQLExceptionTranslator> customTranslatorClass) void
setCustomTranslations
(CustomSQLErrorCodesTranslation... customTranslations) void
setDataAccessResourceFailureCodes
(StringSE... dataAccessResourceFailureCodes) void
setDatabaseProductName
(StringSE databaseProductName) データベース名にスペースが含まれる場合、このプロパティを設定します。この場合、Bean 名を検索に使用できません。void
setDatabaseProductNames
(StringSE... databaseProductNames) このプロパティを設定して、スペースを含む複数のデータベース名を指定します。その場合、Bean 名を検索に使用できません。void
setDataIntegrityViolationCodes
(StringSE... dataIntegrityViolationCodes) void
setDeadlockLoserCodes
(StringSE... deadlockLoserCodes) void
setDuplicateKeyCodes
(StringSE... duplicateKeyCodes) void
setInvalidResultSetAccessCodes
(StringSE... invalidResultSetAccessCodes) void
setPermissionDeniedCodes
(StringSE... permissionDeniedCodes) void
setTransientDataAccessResourceCodes
(StringSE... transientDataAccessResourceCodes) void
setUseSqlStateForTranslation
(boolean useStateCodeForTranslation) エラーコードを提供しないが SQL 状態を提供するデータベース(PostgreSQL を含む)に対して、このプロパティを true に設定します。
コンストラクターの詳細
SQLErrorCodes
public SQLErrorCodes()
メソッドの詳細
setDatabaseProductName
データベース名にスペースが含まれる場合、このプロパティを設定します。この場合、Bean 名を検索に使用できません。getDatabaseProductName
setDatabaseProductNames
このプロパティを設定して、スペースを含む複数のデータベース名を指定します。その場合、Bean 名を検索に使用できません。getDatabaseProductNames
setUseSqlStateForTranslation
public void setUseSqlStateForTranslation(boolean useStateCodeForTranslation) エラーコードを提供しないが SQL 状態を提供するデータベース(PostgreSQL を含む)に対して、このプロパティを true に設定します。isUseSqlStateForTranslation
public boolean isUseSqlStateForTranslation()setBadSqlGrammarCodes
getBadSqlGrammarCodes
setInvalidResultSetAccessCodes
getInvalidResultSetAccessCodes
getDuplicateKeyCodes
setDuplicateKeyCodes
setDataIntegrityViolationCodes
getDataIntegrityViolationCodes
setPermissionDeniedCodes
getPermissionDeniedCodes
setDataAccessResourceFailureCodes
getDataAccessResourceFailureCodes
setTransientDataAccessResourceCodes
getTransientDataAccessResourceCodes
setCannotAcquireLockCodes
getCannotAcquireLockCodes
setDeadlockLoserCodes
getDeadlockLoserCodes
setCannotSerializeTransactionCodes
getCannotSerializeTransactionCodes
setCustomTranslations
getCustomTranslations
setCustomSqlExceptionTranslatorClass
public void setCustomSqlExceptionTranslatorClass(@Nullable ClassSE<? extends SQLExceptionTranslator> customTranslatorClass) setCustomSqlExceptionTranslator
public void setCustomSqlExceptionTranslator(@Nullable SQLExceptionTranslator customSqlExceptionTranslator) getCustomSqlExceptionTranslator