Hibernate ORM SqlExceptionHelper - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM SqlExceptionHelper class.

This code example shows how to use the following methods:
 
    @Override 
    public void release() throws SQLException {
        // we only release the connection 
        if ( connection != null ) {
            new SqlExceptionHelper().logAndClearWarnings( connection );
            if ( toggleAutoCommit ) {
                connection.setAutoCommit( false );
            } 
            provider.closeConnection( connection );
            connection = null;
        } 
    } 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:logAndClearWarnings
		return connection;
	} 
 
	public void release() throws SQLException {
		new SqlExceptionHelper().logAndClearWarnings( connection );
		if ( toggleAutoCommit ) {
			connection.setAutoCommit( false );
		} 
		connection = null;
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:logAndClearWarnings
 
	public void release() throws SQLException {
		// we only release the connection 
		if ( connection != null ) {
			new SqlExceptionHelper().logAndClearWarnings( connection );
			if ( toggleAutoCommit ) {
				connection.setAutoCommit( false );
			} 
			provider.closeConnection( connection );
			connection = null;
		} 
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:logAndClearWarnings
	public void export(String string) throws Exception { 
		statement.executeUpdate( string ); 
		try { 
			SQLWarning warnings = statement.getWarnings(); 
			if ( warnings != null) { 
				sqlExceptionHelper.logAndClearWarnings( connection ); 
			} 
		} 
		catch( SQLException e ) { 
			LOG.unableToLogSqlWarnings( e ); 
		} 
	} 
 
	@Override 
	public void release() throws Exception { 
		try { 
			statement.close(); 
		} 
		finally { 
			connectionHelper.release(); 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:convert
			if (lastQuery != null) { 
				lastQuery.cancel(); 
			} 
		} 
		catch (SQLException sqle) { 
			throw exceptionHelper.convert( 
			        sqle, 
			        "Cannot cancel query" 
				); 
		} 
		finally { 
			lastQuery = null; 
		} 
	} 
 
	public void release(Statement statement) { 
		LOG.tracev( "Releasing statement [{0}]", statement ); 
		Set<ResultSet> resultSets = xref.get( statement ); 
		if ( resultSets != null ) { 
			for ( ResultSet resultSet : resultSets ) { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, ResultSetWrapperProxy.class.getName()); 
	private static final Class[] PROXY_INTERFACES = new Class[] { ResultSet.class }; 
	private static final SqlExceptionHelper sqlExceptionHelper = new SqlExceptionHelper(); 
 
	private final ResultSet rs; 
	private final ColumnNameCache columnNameCache; 
 
	private ResultSetWrapperProxy(ResultSet rs, ColumnNameCache columnNameCache) { 
		this.rs = rs; 
		this.columnNameCache = columnNameCache; 
	} 
 
	/** 
	 * Generates a proxy wrapping the ResultSet. 
	 * 
	 * @param resultSet The resultSet to wrap. 
	 * @param columnNameCache The cache storing data for converting column names to column indexes. 
	 * @return The generated proxy. 
	 */ 
	public static ResultSet generateProxy(ResultSet resultSet, ColumnNameCache columnNameCache) { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		Properties props = new Properties(); 
		props.putAll( dialect.getDefaultProperties() ); 
		props.putAll( properties ); 
		this.connectionHelper = new ManagedProviderConnectionHelper( props ); 
 
		this.sqlExceptionHelper = new SqlExceptionHelper(); 
		this.sqlStatementLogger = new SqlStatementLogger( false, true ); 
		this.formatter = FormatStyle.DDL.getFormatter(); 
	} 
 
	public SchemaUpdate(ServiceRegistry serviceRegistry, Configuration cfg) throws HibernateException { 
		this.configuration = cfg; 
 
		final JdbcServices jdbcServices = serviceRegistry.getService( JdbcServices.class ); 
		this.dialect = jdbcServices.getDialect(); 
		this.connectionHelper = new SuppliedConnectionProviderConnectionHelper( jdbcServices.getConnectionProvider() ); 
 
		this.sqlExceptionHelper = new SqlExceptionHelper(); 
		this.sqlStatementLogger = jdbcServices.getSqlStatementLogger(); 
		this.formatter = ( sqlStatementLogger.isFormat() ? FormatStyle.DDL : FormatStyle.NONE ).getFormatter(); 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:logAndClearWarnings
See Code Examples for Hibernate ORM SqlExceptionHelper Methods: