}
public static void runExample(
AdWordsServices adWordsServices, AdWordsSession session) throws Exception {
// Get the CampaignService.
CampaignCriterionServiceInterface campaignCriterionService =
adWordsServices.get(session, CampaignCriterionServiceInterface.class);
int offset = 0;
// Create selector.
Selector selector = new Selector();
selector.setFields(new String[] {"CampaignId", "Id", "CriteriaType", "PlatformName",
"LanguageName", "LocationName", "KeywordText"});
selector.setPredicates(new Predicate[] {new Predicate("CriteriaType", PredicateOperator.IN,
new String[] {"KEYWORD", "LANGUAGE", "LOCATION", "PLATFORM"})});
selector.setPaging(new Paging(offset, PAGE_SIZE));
CampaignCriterionPage page = null;
do {
page = campaignCriterionService.get(selector);
if (page.getEntries() != null) {
// Display campaigns.
for (CampaignCriterion campaignCriterion : page.getEntries()) {
System.out.printf("Campaign criterion with campaign id '%s', criterion id '%s', "