private static final String SEARCH_STRING = "INSERT_SEARCH_CRITERIA_HERE";
public static void runExample(
DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
// Request the service.
AdvertiserGroupRemote service = dfaServices.get(session, AdvertiserGroupRemote.class);
// Create advertiser group search criteria structure.
AdvertiserGroupSearchCriteria advGroupSearchCriteria = new AdvertiserGroupSearchCriteria();
advGroupSearchCriteria.setPageSize(10);
advGroupSearchCriteria.setSearchString(searchString);
// Get advertiser group record set.
AdvertiserGroupRecordSet advertiserGroupRecordSet =
service.getAdvertiserGroups(advGroupSearchCriteria);
// Display advertiser group names, IDs and advertiser count.
if (advertiserGroupRecordSet.getRecords() != null) {
for (AdvertiserGroup result : advertiserGroupRecordSet.getRecords()) {
System.out.println("Advertiser Group with name \"" + result.getName()