Code example for JDBCException

Methods: getMessagegetSQLgetSQLException

	 * @param ex Hibernate JDBCException that occured 
	 * @param translator the SQLExceptionTranslator to use 
	 * @return a corresponding DataAccessException 
	protected DataAccessException convertJdbcAccessException(JDBCException ex, SQLExceptionTranslator translator) { 
		return translator.translate("Hibernate operation: " + ex.getMessage(), ex.getSQL(), ex.getSQLException()); 
	 * Convert the given SQLException to an appropriate exception from the 
	 * {@code org.springframework.dao} hierarchy. Can be overridden in subclasses. 
	 * <p>Note that a direct SQLException can just occur when callback code 
	 * performs direct JDBC access via {@code Session.connection()}. 
	 * @param ex the SQLException 
	 * @return the corresponding DataAccessException instance 
	 * @see #setJdbcExceptionTranslator 
	protected DataAccessException convertJdbcAccessException(SQLException ex) { 
		SQLExceptionTranslator translator = getJdbcExceptionTranslator(); 
		if (translator == null) {