/** * Check the {@link CustomSQLExceptionTranslatorRegistry} for any entries. */ private void checkCustomTranslatorRegistry(String databaseName, SQLErrorCodes errorCodes) { SQLExceptionTranslator customTranslator = CustomSQLExceptionTranslatorRegistry.getInstance().findTranslatorForDatabase(databaseName); if (customTranslator != null) { if (errorCodes.getCustomSqlExceptionTranslator() != null && logger.isDebugEnabled()) { logger.debug("Overriding already defined custom translator '" + errorCodes.getCustomSqlExceptionTranslator().getClass().getSimpleName() + " with '" + customTranslator.getClass().getSimpleName() + "' found in the CustomSQLExceptionTranslatorRegistry for database '" + databaseName + "'"); } else if (logger.isTraceEnabled()) { logger.trace("Using custom translator '" + customTranslator.getClass().getSimpleName() + "' found in the CustomSQLExceptionTranslatorRegistry for database '" + databaseName + "'"); } errorCodes.setCustomSqlExceptionTranslator(customTranslator); } }
SQLExceptionTranslator customTranslator = this.sqlErrorCodes.getCustomSqlExceptionTranslator(); if (customTranslator != null) { DataAccessException customDex = customTranslator.translate(task, sql, sqlEx);
/** * Check the {@link CustomSQLExceptionTranslatorRegistry} for any entries. */ private void checkCustomTranslatorRegistry(String databaseName, SQLErrorCodes errorCodes) { SQLExceptionTranslator customTranslator = CustomSQLExceptionTranslatorRegistry.getInstance().findTranslatorForDatabase(databaseName); if (customTranslator != null) { if (errorCodes.getCustomSqlExceptionTranslator() != null && logger.isDebugEnabled()) { logger.debug("Overriding already defined custom translator '" + errorCodes.getCustomSqlExceptionTranslator().getClass().getSimpleName() + " with '" + customTranslator.getClass().getSimpleName() + "' found in the CustomSQLExceptionTranslatorRegistry for database '" + databaseName + "'"); } else if (logger.isTraceEnabled()) { logger.trace("Using custom translator '" + customTranslator.getClass().getSimpleName() + "' found in the CustomSQLExceptionTranslatorRegistry for database '" + databaseName + "'"); } errorCodes.setCustomSqlExceptionTranslator(customTranslator); } }
/** * Check the {@link CustomSQLExceptionTranslatorRegistry} for any entries. */ private void checkCustomTranslatorRegistry(String dbName, SQLErrorCodes dbCodes) { SQLExceptionTranslator customTranslator = CustomSQLExceptionTranslatorRegistry.getInstance().findTranslatorForDatabase(dbName); if (customTranslator != null) { if (dbCodes.getCustomSqlExceptionTranslator() != null) { logger.warn("Overriding already defined custom translator '" + dbCodes.getCustomSqlExceptionTranslator().getClass().getSimpleName() + " with '" + customTranslator.getClass().getSimpleName() + "' found in the CustomSQLExceptionTranslatorRegistry for database " + dbName); } else { logger.info("Using custom translator '" + customTranslator.getClass().getSimpleName() + "' found in the CustomSQLExceptionTranslatorRegistry for database " + dbName); } dbCodes.setCustomSqlExceptionTranslator(customTranslator); } }
SQLExceptionTranslator customTranslator = this.sqlErrorCodes.getCustomSqlExceptionTranslator(); if (customTranslator != null) { DataAccessException customDex = customTranslator.translate(task, sql, sqlEx);
SQLExceptionTranslator customTranslator = this.sqlErrorCodes.getCustomSqlExceptionTranslator(); if (customTranslator != null) { DataAccessException customDex = customTranslator.translate(task, sql, sqlEx);
SQLExceptionTranslator customTranslator = this.sqlErrorCodes.getCustomSqlExceptionTranslator(); if (customTranslator != null) { DataAccessException customDex = customTranslator.translate(task, sql,
SQLExceptionTranslator customTranslator = this.sqlErrorCodes.getCustomSqlExceptionTranslator(); if (customTranslator != null) { DataAccessException customDex = customTranslator.translate(task, sql,