private static Map<INaviModule,IAddress> loadImageBases(final CConnection connection,final int addressSpaceId,final List<INaviModule> list) throws CouldntLoadDataException {
  final HashMap<INaviModule,IAddress> imageBases=new HashMap<INaviModule,IAddress>();
  final String query="SELECT module_id, image_base FROM " + CTableNames.SPACE_MODULES_TABLE + " WHERE address_space_id = "+ addressSpaceId;
  try {
    final ResultSet resultSet=connection.executeQuery(query,true);
    try {
      while (resultSet.next()) {
        try {
          final INaviModule module=findModule(list,resultSet.getInt("module_id"));
          imageBases.put(module,PostgreSQLHelpers.loadAddress(resultSet,"image_base"));
        }
 catch (        final MaybeNullException exception) {
          CUtilityFunctions.logException(exception);
        }
      }
    }
  finally {
      resultSet.close();
    }
    return imageBases;
  }
 catch (  final SQLException exception) {
    throw new CouldntLoadDataException(exception);
  }
}

private static Map < INaviModule , IAddress > loadImageBases ( final CConnection connection , final int addressSpaceId , final List < INaviModule > list ) throws CouldntLoadDataException { final HashMap < INaviModule , IAddress > imageBases = new HashMap < INaviModule , IAddress > ( ) ; final String query = "SELECT module_id, image_base FROM " + CTableNames . SPACE_MODULES_TABLE + " WHERE address_space_id = " + addressSpaceId ; try { final ResultSet resultSet = connection . executeQuery ( query , true ) ; try { while ( resultSet . next ( ) ) { try { final INaviModule module = findModule ( list , resultSet . getInt ( "module_id" ) ) ; imageBases . put ( module , PostgreSQLHelpers . loadAddress ( resultSet , "image_base" ) ) ; } catch ( final MaybeNullException exception ) { CUtilityFunctions . logException ( exception ) ; } } } finally { resultSet . close ( ) ; } return imageBases ; } catch ( final SQLException exception ) { throw new CouldntLoadDataException ( exception ) ; } }
loads the image bases of the given modules within the given address space . the address space id and the modules in the module list must all reference items that are stored in the database connected to by connection argument .
