@ Override public synchronized void clearParameters ( final String name ) throws DatabaseEngineException , ConnectionResetException { final PreparedStatementCapsule ps = stmts . get ( name ) ; if ( ps == null ) { throw new DatabaseEngineRuntimeException ( String . format ( "PreparedStatement named '%s' does not exist" , name ) ) ; } try { ps . ps . clearParameters ( ) ; } catch ( final SQLException ex ) { if ( checkConnection ( conn ) || ! properties . isReconnectOnLost ( ) ) { throw new DatabaseEngineException ( "Error clearing parameters" , ex ) ; } // At this point maybe it is an error with the connection, so we try to re-establish it. try { getConnection ( ) ; } catch ( final Exception e2 ) { throw new DatabaseEngineException ( "Connection is down" , e2 ) ; } throw new ConnectionResetException ( "Connection was reset." ) ; } }
Clears the prepared statement parameters .