Code example for Set

Methods: contains

0
		if (sqlState != null && sqlState.length() >= 2) { 
			String classCode = sqlState.substring(0, 2); 
			if (logger.isDebugEnabled()) { 
				logger.debug("Extracted SQL state class '" + classCode + "' from value '" + sqlState + "'"); 
			} 
			if (BAD_SQL_GRAMMAR_CODES.contains(classCode)) { 
				return new BadSqlGrammarException(task, sql, ex); 
			} 
			else if (DATA_INTEGRITY_VIOLATION_CODES.contains(classCode)) { 
				return new DataIntegrityViolationException(buildMessage(task, sql, ex), ex); 
			} 
			else if (DATA_ACCESS_RESOURCE_FAILURE_CODES.contains(classCode)) { 
				return new DataAccessResourceFailureException(buildMessage(task, sql, ex), ex); 
			} 
			else if (TRANSIENT_DATA_ACCESS_RESOURCE_CODES.contains(classCode)) { 
				return new TransientDataAccessResourceException(buildMessage(task, sql, ex), ex); 
			} 
			else if (CONCURRENCY_FAILURE_CODES.contains(classCode)) { 
				return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex); 
			}