code: private static Multimap<Long, Integer> getFeedMapping(AdWordsServicesInterface adWordsServices,
        AdWordsSession session, Feed feed, long placeholderType) throws RemoteException {
      // Get the FeedMappingService.
      FeedMappingServiceInterface feedMappingService =
          adWordsServices.get(session, FeedMappingServiceInterface.class);
      String query = String.format(
          "SELECT FeedMappingId, AttributeFieldMappings WHERE FeedId = %d and PlaceholderType = %d "
          + "AND Status = 'ENABLED'", feed.getId(), placeholderType);
  
      Multimap<Long, Integer> attributeMappings = HashMultimap.create();
      int offset = 0;
      FeedMappingPage feedMappingPage;
  
      do {
        String pageQuery = String.format(query + " LIMIT %d, %d", offset, PAGE_SIZE);
        feedMappingPage = feedMappingService.query(pageQuery);
        if (feedMappingPage.getEntries() != null) {
          // Normally, a feed attribute is mapped only to one field. However, you may map it to more
          // than one field if needed.
          for (FeedMapping feedMapping : feedMappingPage.getEntries()) {
            for (AttributeFieldMapping attributeMapping : feedMapping.getAttributeFieldMappings()) {
              attributeMappings.put(attributeMapping.getFeedAttributeId(),
                  attributeMapping.getFieldId());
            }
          }
        }
        offset += PAGE_SIZE;
      } while (offset < feedMappingPage.getTotalNumEntries());
  
      return attributeMappings;
    }
docs: Gets the feed mapping for a feed.
  
  @return a multimap from feed attribute ID to the set of field IDs mapped to the attribute