/** * Standard (legacy) behavior for logging warnings associated with a JDBC {@link Connection} and clearing them. * <p/> * Calls {@link #handleAndClearWarnings(Connection, WarningHandler)} using {@link #STANDARD_WARNING_HANDLER} * * @param connection The JDBC connection potentially containing warnings */ public void logAndClearWarnings(Connection connection) { handleAndClearWarnings( connection, STANDARD_WARNING_HANDLER ); }
public void logAndClearWarnings(Statement statement) { handleAndClearWarnings( statement, STANDARD_WARNING_HANDLER ); }
@Override public void execute(Connection connection) { try { Statement statement = connection.createStatement(); try { statement.executeUpdate( logStatement(factory, idTableInfo.getIdTableCreationStatement()) ); factory.getServiceRegistry() .getService( JdbcServices.class ) .getSqlExceptionHelper() .handleAndClearWarnings( statement, WARNING_HANDLER ); } finally { try { statement.close(); } catch( Throwable ignore ) { // ignore } } } catch( Exception e ) { log.debug( "unable to create temporary id table [" + e.getMessage() + "]" ); } } }
@Override public void execute(Connection connection) { try { Statement statement = connection.createStatement(); try { statement.executeUpdate( logStatement( factory, idTableInfo.getIdTableDropStatement() ) ); factory.getServiceRegistry() .getService( JdbcServices.class ) .getSqlExceptionHelper() .handleAndClearWarnings( statement, WARNING_HANDLER ); } finally { try { statement.close(); } catch( Throwable ignore ) { // ignore } } } catch( Exception e ) { log.warn( "unable to drop temporary id table after use [" + e.getMessage() + "]" ); } } }
/** * Standard (legacy) behavior for logging warnings associated with a JDBC {@link Connection} and clearing them. * <p/> * Calls {@link #handleAndClearWarnings(Connection, WarningHandler)} using {@link #STANDARD_WARNING_HANDLER} * * @param connection The JDBC connection potentially containing warnings */ public void logAndClearWarnings( Connection connection ) { handleAndClearWarnings(connection, STANDARD_WARNING_HANDLER); }
/** * Standard (legacy) behavior for logging warnings associated with a JDBC {@link Connection} and clearing them. * <p/> * Calls {@link #handleAndClearWarnings(Connection, WarningHandler)} using {@link #STANDARD_WARNING_HANDLER} * * @param connection The JDBC connection potentially containing warnings */ public void logAndClearWarnings(Connection connection) { handleAndClearWarnings( connection, STANDARD_WARNING_HANDLER ); }
/** * Standard (legacy) behavior for logging warnings associated with a JDBC {@link Connection} and clearing them. * <p/> * Calls {@link #handleAndClearWarnings(Connection, WarningHandler)} using {@link #STANDARD_WARNING_HANDLER} * * @param connection The JDBC connection potentially containing warnings */ public void logAndClearWarnings( Connection connection ) { handleAndClearWarnings(connection, STANDARD_WARNING_HANDLER); }
public void logAndClearWarnings(Statement statement) { handleAndClearWarnings( statement, STANDARD_WARNING_HANDLER ); }
@Override public void execute(Connection connection) { try { final Statement statement = connection.createStatement(); for ( String dropCommand : dropCommands ) { try { logStatement( dropCommand ); statement.executeUpdate( dropCommand ); jdbcServices.getSqlExceptionHelper() .handleAndClearWarnings( statement, WARNING_HANDLER ); } finally { try { statement.close(); } catch( Throwable ignore ) { // ignore } } } } catch( Exception e ) { log.warn( "unable to drop temporary id table afterQuery use [" + e.getMessage() + "]" ); } } }
statement.executeUpdate( creationCommand ); jdbcServices.getSqlExceptionHelper() .handleAndClearWarnings( statement, WARNING_HANDLER );
@Override public void execute(Connection connection) { try { Statement statement = connection.createStatement(); try { statement.executeUpdate( persister.getTemporaryIdTableDDL() ); persister.getFactory() .getServiceRegistry() .getService( JdbcServices.class ) .getSqlExceptionHelper() .handleAndClearWarnings( statement, CREATION_WARNING_HANDLER ); } finally { try { statement.close(); } catch( Throwable ignore ) { // ignore } } } catch( Exception e ) { LOG.debug( "unable to create temporary id table [" + e.getMessage() + "]" ); } } }
@Override public void execute(Connection connection) { try { Statement statement = connection.createStatement(); try { statement.executeUpdate( persister.getTemporaryIdTableDDL() ); persister.getFactory() .getServiceRegistry() .getService( JdbcServices.class ) .getSqlExceptionHelper() .handleAndClearWarnings( statement, CREATION_WARNING_HANDLER ); } finally { try { statement.close(); } catch( Throwable ignore ) { // ignore } } } catch( Exception e ) { LOG.debug( "unable to create temporary id table [" + e.getMessage() + "]" ); } } }