Predicate adGroupIdPredicate =
new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
selector.setPredicates(new Predicate[] {statusPredicate, adGroupIdPredicate});
// Get all active ad group criteria.
AdGroupCriterionPage page = adGroupCriterionService.get(selector);
// Display ad group criteria.
if (page.getEntries() != null && page.getEntries().length > 0) {
for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
BiddableAdGroupCriterion biddableAdGroupCriterion =
(BiddableAdGroupCriterion) adGroupCriterion;
System.out.println("Ad group criterion with ad group id \""
+ biddableAdGroupCriterion.getAdGroupId() + "\", criterion id \""