relatedToUrlSearchParameter.setUrls(new String[] {url});
relatedToUrlSearchParameter.setIncludeSubUrls(false);
selector.setSearchParameters(new SearchParameter[] {relatedToUrlSearchParameter});
// Get related placements.
TargetingIdeaPage page = targetingIdeaService.get(selector);
// Display related placements.
if (page.getEntries() != null && page.getEntries().length > 0) {
for (TargetingIdea targetingIdea : page.getEntries()) {
Map<AttributeType, Attribute> data = Maps.toMap(targetingIdea.getData());
Placement placement =
(Placement) ((CriterionAttribute) data.get(AttributeType.CRITERION)).getValue();
SiteConstantsPlacementType placementType =
((PlacementTypeAttribute) data.get(AttributeType.PLACEMENT_TYPE)).getValue();