protected int checkMapping ( final int articleID , final int revisionCounter ) throws SQLException { PreparedStatement statement = null ; ResultSet result = null ; // Check for the correct revisionCounter mapping try { statement = this . connection . prepareStatement ( "SELECT Mapping " + "FROM index_chronological " + "WHERE ArticleID=? LIMIT 1" ) ; statement . setInt ( 1 , articleID ) ; result = statement . executeQuery ( ) ; if ( result . next ( ) ) { String mapping = result . getString ( 1 ) ; return getMapping ( mapping , revisionCounter ) ; } } finally { if ( statement != null ) { statement . close ( ) ; } if ( result != null ) { result . close ( ) ; } } return revisionCounter ; }
This method maps the chronological order to the revisionCounter .