if (r instanceof EntitiesResponse) {
EntitiesResponse er = (EntitiesResponse) r;
return Responses.multipleIds(er.getEntities());
}
if (r instanceof EntityResponse) {
EntityResponse er = (EntityResponse) r;
return Responses.singleId(er.getEntity());
}
throw new NotFoundException("EdmNavigationProperty " + targetNavProp + " of entity " + sourceEntity + " not found.");
}