protected boolean hasAllTables() throws CouldntLoadDataException, InvalidDatabaseException {
  NaviLogger.info("Checking the existence of the BinNavi database tables");
  final int counter=PostgreSQLHelpers.getTableCount(getConnection(),Lists.newArrayList(TABLES));
  if (counter == 0) {
    return false;
  }
 else   if (counter == TABLES.length) {
    return true;
  }
 else {
    throw new InvalidDatabaseException(String.format("Invalid database state (%d of %d tables found)",counter,TABLES.length));
  }
}

protected boolean hasAllTables ( ) throws CouldntLoadDataException , InvalidDatabaseException { NaviLogger . info ( "Checking the existence of the BinNavi database tables" ) ; final int counter = PostgreSQLHelpers . getTableCount ( getConnection ( ) , Lists . newArrayList ( TABLES ) ) ; if ( counter == 0 ) { return false ; } else if ( counter == TABLES . length ) { return true ; } else { throw new InvalidDatabaseException ( String . format ( "Invalid database state (%d of %d tables found)" , counter , TABLES . length ) ) ; } }
makes sure that all required binnavi database tables exist . this method tries to find out whether the database is empty or already initialized ( or inconsistent ) .
