long customTargetingKeyId = Long.parseLong("INSERT_CUSTOM_TARGETING_KEY_ID_HERE");
// Create a statement to only select predefined custom targeting values
// for a given key.
Statement filterStatement =
new StatementBuilder("WHERE customTargetingKeyId = :customTargetingKeyId LIMIT 500")
.putValue("customTargetingKeyId", customTargetingKeyId).toStatement();
// Get custom targeting values by statement.
CustomTargetingValuePage page =
customTargetingService.getCustomTargetingValuesByStatement(filterStatement);