+ "\", name \"" + key.getName() + "\", display name \"" + key.getDisplayName()
+ "\", and type \"" + key.getType() + "\" was found.");
// Sets defaults for page and filter.
CustomTargetingValuePage valuePage = new CustomTargetingValuePage();
Statement valueFilterStatement = new Statement();
int valueOffset = 0;
do {
// Create a statement to get all custom targeting values for a
// custom targeting key (required) by its ID.
valueFilterStatement.setQuery("WHERE customTargetingKeyId = " + key.getId()
+ " LIMIT 500 OFFSET " + valueOffset);
// Get custom targeting values by statement.
valuePage =
customTargetingService.getCustomTargetingValuesByStatement(valueFilterStatement);
if (valuePage.getResults() != null) {
int j = valuePage.getStartIndex();
for (CustomTargetingValue value : valuePage.getResults()) {
System.out.println("\t" + j + ") Custom targeting value with ID \""
+ value.getId() + "\", name \"" + value.getName() + "\", and display name \""
+ value.getDisplayName() + "\" was found.");
j++;
}
}
valueOffset += 500;
} while (valuePage.getResults() != null && valuePage.getResults().length == 500);
i++;
}
}
keyOffset += 500;