public Revision getRevision ( final int articleID , final int revisionCounter ) throws WikiApiException { try { if ( articleID < 1 || revisionCounter < 1 ) { throw new IllegalArgumentException ( ) ; } int revisionIndex = checkMapping ( articleID , revisionCounter ) ; String fullRevisions , revCounters ; PreparedStatement statement = null ; ResultSet result = null ; try { statement = this . connection . prepareStatement ( "SELECT FullRevisionPKs, RevisionCounter FROM index_articleID_rc_ts WHERE ArticleID=? LIMIT 1" ) ; statement . setInt ( 1 , articleID ) ; result = statement . executeQuery ( ) ; if ( result . next ( ) ) { fullRevisions = result . getString ( 1 ) ; revCounters = result . getString ( 2 ) ; } else { throw new WikiPageNotFoundException ( "The article with the ID " + articleID + " was not found." ) ; } } finally { if ( statement != null ) { statement . close ( ) ; } if ( result != null ) { result . close ( ) ; } } return getReferencedRevision ( articleID , revisionIndex , fullRevisions , revCounters ) ; } catch ( WikiPageNotFoundException e ) { throw e ; } catch ( Exception e ) { throw new WikiApiException ( e ) ; } }
Returns the by the article ID and revisionCounter specified revision . Note that this method returns the revision in chronological order .