List<String> selectedPropertiesAtCustomProperties = new ArrayList<String>();
selectedPropertiesAtCustomProperties.add("Id");
EdmEntitySet buildingsSet =
roomsSet.getRelatedEntitySet((EdmNavigationProperty) roomsSet.getEntityType().getProperty("nr_Building"));
ExpandSelectTreeNode customNode =
ExpandSelectTreeNode.entitySet(buildingsSet).selectedProperties(selectedPropertiesAtCustomProperties).build();
ExpandSelectTreeNode expandSelectTree =
ExpandSelectTreeNode.entitySet(roomsSet).customExpandedLink("nr_Building", customNode).build();
Map<String, ODataCallback> callbacks = new HashMap<String, ODataCallback>();
callbacks.put("nr_Building", new LocalCallback());
EntityProviderWriteProperties properties =