private static List < CampaignFeed > getCampaignFeeds ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Feed feed , int placeholderType ) throws RemoteException { // Get the CampaignFeedService. CampaignFeedServiceInterface campaignFeedService = adWordsServices . get ( session , CampaignFeedServiceInterface . class ) ; String query = String . format ( "SELECT CampaignId, MatchingFunction, PlaceholderTypes WHERE Status = 'ENABLED' " + "AND FeedId = %d AND PlaceholderTypes CONTAINS_ANY [%d]" , feed . getId ( ) , placeholderType ) ; List < CampaignFeed > campaignFeeds = new ArrayList <> ( ) ; int offset = 0 ; CampaignFeedPage campaignFeedPage ; do { String pageQuery = String . format ( query + " LIMIT %d, %d" , offset , PAGE_SIZE ) ; campaignFeedPage = campaignFeedService . query ( pageQuery ) ; if ( campaignFeedPage . getEntries ( ) != null ) { campaignFeeds . addAll ( Arrays . asList ( campaignFeedPage . getEntries ( ) ) ) ; } offset += PAGE_SIZE ; } while ( offset < campaignFeedPage . getTotalNumEntries ( ) ) ; return campaignFeeds ; }
Returns the campaign feeds that use a particular feed for a particular placeholder type .