question: public synchronized int fileExists ( JDBCSequentialFile file ) throws SQLException { connection . setAutoCommit ( false ) ; selectFileByFileName . setString ( 1 , file . getFileName ( ) ) ; try ( ResultSet rs = selectFileByFileName . executeQuery ( ) ) { int id = rs . next ( ) ? rs . getInt ( 1 ) : - 1 ; connection . commit ( ) ; return id ; } catch ( Exception e ) { connection . rollback ( ) ; throw e ; } }
target:  Checks to see if a file with filename and extension exists.  If so returns the ID of the file or returns -1.