@Override public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context) throws ODataApplicationException { try { final EdmEntityType entityType = context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType(); List<Map<String, Object>> values = new ArrayList<Map<String, Object>>(); Object relatedData = null; try { relatedData = readRelatedData(context); for (final Object entryData : (List<?>) relatedData) { values.add(getStructuralTypeValueMap(entryData, entityType)); } } catch (final ODataNotFoundException e) { values.clear(); } WriteFeedCallbackResult result = new WriteFeedCallbackResult(); result.setFeedData(values); EntityProviderWriteProperties inlineProperties = EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks( getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode()) .selfLink(context.getSelfLink()).build(); result.setInlineProperties(inlineProperties); return result; } catch (final ODataException e) { throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e); } }
WriteFeedCallbackContext context = new WriteFeedCallbackContext(); context.setSourceEntitySet(eia.getEntitySet()); context.setNavigationProperty(navProp); context.setEntryData(data); ExpandSelectTreeNode subNode = properties.getExpandSelectTree().getLinks().get(navigationPropertyName); context.setCurrentExpandSelectTreeNode(subNode); context.setSelfLink(new URI(self));
throws ODataApplicationException { WriteFeedCallbackResult result = new WriteFeedCallbackResult(); HashMap<String, Object> inlinedEntry = (HashMap<String, Object>) context.getEntryData(); List<Map<String, Object>> edmEntityList = new ArrayList<Map<String, Object>>(); JPAEntityParser jpaResultParser = new JPAEntityParser(); List<EdmNavigationProperty> currentNavPropertyList = null; EdmNavigationProperty currentNavigationProperty = context.getNavigationProperty(); ExpandSelectTreeNode currentExpandTreeNode = context.getCurrentExpandSelectTreeNode(); Collection<Object> listOfItems = (Collection<Object>) inlinedEntry.get(context.getNavigationProperty().getName()); if (nextEntitySet == null) { nextEntitySet = context.getSourceEntitySet().getRelatedEntitySet(currentNavigationProperty); currentNavPropertyList = new ArrayList<EdmNavigationProperty>(); List<EdmNavigationProperty> nextNavPropertyList = getNextNavigationProperty(context.getSourceEntitySet().getEntityType(), context.getNavigationProperty()); if (nextNavPropertyList != null) { currentNavPropertyList.addAll(nextNavPropertyList);
Map<String, Object> entry = context.getEntryData(); EdmNavigationProperty navigationProperty = context.getNavigationProperty(); providerWritePropertiesBuilder.selfLink(context.getSelfLink());
final EdmEntitySet inlineEntitySet = entitySet.getRelatedEntitySet(navigationProperty); WriteCallbackContext context = isFeed ? new WriteFeedCallbackContext() : new WriteEntryCallbackContext(); context.setSourceEntitySet(entitySet); context.setNavigationProperty(navigationProperty);
final EdmEntitySet inlineEntitySet = entitySet.getRelatedEntitySet(navigationProperty); WriteCallbackContext context = isFeed ? new WriteFeedCallbackContext() : new WriteEntryCallbackContext(); context.setSourceEntitySet(entitySet); context.setNavigationProperty(navigationProperty);
@Override public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context) throws ODataApplicationException { try { final EdmEntityType entityType = context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType(); List<Map<String, Object>> values = new ArrayList<Map<String, Object>>(); Object relatedData = null; try { relatedData = readRelatedData(context); for (final Object entryData : (List<?>) relatedData) { values.add(getStructuralTypeValueMap(entryData, entityType)); } } catch (final ODataNotFoundException e) { values.clear(); } WriteFeedCallbackResult result = new WriteFeedCallbackResult(); result.setFeedData(values); EntityProviderWriteProperties inlineProperties = EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks( getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode()) .selfLink(context.getSelfLink()).build(); result.setInlineProperties(inlineProperties); return result; } catch (final ODataException e) { throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e); } }
WriteFeedCallbackContext context = new WriteFeedCallbackContext(); context.setSourceEntitySet(eia.getEntitySet()); context.setNavigationProperty(navProp); context.setEntryData(data); context.setCurrentWriteProperties(properties); ExpandSelectTreeNode subNode = properties.getExpandSelectTree().getLinks().get(navigationPropertyName); context.setCurrentExpandSelectTreeNode(subNode); context.setSelfLink(new URI(self));
throws ODataApplicationException { WriteFeedCallbackResult result = new WriteFeedCallbackResult(); HashMap<String, Object> inlinedEntry = (HashMap<String, Object>) context.getEntryData(); List<Map<String, Object>> edmEntityList = new ArrayList<Map<String, Object>>(); JPAEntityParser jpaResultParser = new JPAEntityParser(oDataJPAContext, null); List<EdmNavigationProperty> currentNavPropertyList = null; EdmNavigationProperty currentNavigationProperty = context.getNavigationProperty(); ExpandSelectTreeNode currentExpandTreeNode = context.getCurrentExpandSelectTreeNode(); Collection<Object> listOfItems = (Collection<Object>) inlinedEntry.get(context.getNavigationProperty().getName()); if (nextEntitySet == null) { nextEntitySet = context.getSourceEntitySet().getRelatedEntitySet(currentNavigationProperty); currentNavPropertyList = new ArrayList<EdmNavigationProperty>(); List<EdmNavigationProperty> nextNavPropertyList = getNextNavigationProperty(context.getSourceEntitySet().getEntityType(), context.getNavigationProperty()); if (nextNavPropertyList != null) { currentNavPropertyList.addAll(nextNavPropertyList);
final EdmEntitySet inlineEntitySet = entitySet.getRelatedEntitySet(navigationProperty); WriteCallbackContext context = isFeed ? new WriteFeedCallbackContext() : new WriteEntryCallbackContext(); context.setSourceEntitySet(entitySet); context.setNavigationProperty(navigationProperty);
@Override public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context) throws ODataApplicationException { try { final EdmEntityType entityType = context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType(); List<Map<String, Object>> values = new ArrayList<Map<String, Object>>(); Object relatedData = null; try { relatedData = readRelatedData(context); for (final Object entryData : (List<?>) relatedData) { values.add(getStructuralTypeValueMap(entryData, entityType)); } } catch (final ODataNotFoundException e) { values.clear(); } WriteFeedCallbackResult result = new WriteFeedCallbackResult(); result.setFeedData(values); EntityProviderWriteProperties inlineProperties = EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks( getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode()) .selfLink(context.getSelfLink()).build(); result.setInlineProperties(inlineProperties); return result; } catch (final ODataException e) { throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e); } }
WriteFeedCallbackContext context = new WriteFeedCallbackContext(); context.setSourceEntitySet(eia.getEntitySet()); context.setNavigationProperty(navProp); context.setEntryData(data); context.setCurrentWriteProperties(properties); ExpandSelectTreeNode subNode = properties.getExpandSelectTree().getLinks().get(navigationPropertyName); context.setCurrentExpandSelectTreeNode(subNode); context.setSelfLink(new URI(self));