@Override public IDataProviderResponse readExpandedEntitySet(GetEntitySetUriInfo uriInfo, ODataContext context) throws ODataException { logger.debug("Entering CXSDataProvider >> {readExpandedEntitySet}"); if (uriInfo.getExpand() != null) { expanding = true; } BaseDataProviderResponse response = (BaseDataProviderResponse) super.readExpandedEntitySet(uriInfo, context); logger.debug("Exiting CXSDataProvider >> {readExpandedEntitySet}"); return response; }
if(uriInfo.getFunctionImport() != null || !uriInfo.getExpand().isEmpty() || context.isInBatchMode()){ throw new ODataNotAcceptableException(ODataNotAcceptableException.NOT_SUPPORTED_CONTENT_TYPE .addContent(contentType));
@Override public IDataProviderResponse readExpandedEntitySet(GetEntitySetUriInfo uriInfo, ODataContext context) throws ODataException { GWUriInfo gwUriInfo = new GWUriInfo((UriInfo) uriInfo, uriInfo.getStartEntitySet(), uriInfo.getKeyPredicates(), uriInfo.getNavigationSegments(), uriInfo.getFilter()); gwUriInfo.setExpand(new ArrayList<ArrayList<NavigationPropertySegment>>()); gwUriInfo.setSelect(new ArrayList<SelectItem>()); IDataProviderResponse response = readEntitySet(gwUriInfo, context); ArrayList<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>(); ExpandSelectTreeNode expandSelectTreeNode = UriParser.createExpandSelectTree(uriInfo.getSelect(), uriInfo.getExpand()); Map<String, ExpandSelectTreeNode> links = expandSelectTreeNode.getLinks(); for (Map<String, Object> responseEntity : response.getResultEntities()) { HashMap<String, Object> resultMap = new HashMap<String, Object>(); resultMap.putAll(responseEntity); EdmEntitySet entitySet = uriInfo.getTargetEntitySet(); List<KeyPredicate> keyPredicates = getKeyPredicates(entitySet.getEntityType(), resultMap); GWUriInfo singleUriInfo = new GWUriInfo((UriInfo) uriInfo, uriInfo.getStartEntitySet(), keyPredicates, uriInfo.getNavigationSegments(), uriInfo.getFilter()); for (Entry<String, ExpandSelectTreeNode> expandNodeEntry : links.entrySet()) { Object singleResult = getSingleNavigationPathResult(expandNodeEntry, entitySet, resultMap, singleUriInfo, context); resultMap.put(expandNodeEntry.getKey(), singleResult); } resultList.add(resultMap); } BaseDataProviderResponse baseResponse = new BaseDataProviderResponse(); baseResponse.setResultEntities(resultList); return baseResponse; }
entityFeedPropertiesBuilder.inlineCountType(resultsView.getInlineCount()); ExpandSelectTreeNode expandSelectTree = UriParser.createExpandSelectTree(resultsView.getSelect(), resultsView.getExpand()); JPAExpandCallBack.getCallbacks(odataJPAContext, serviceRoot, expandSelectTree, resultsView.getExpand());
edmEntityList = jpaResultParser.parse2EdmEntityList(jpaEntities, edmEntityType); expandList = resultsView.getExpand(); if (expandList != null && !expandList.isEmpty()) { int count = 0;
edmEntityList = jpaResultParser.parse2EdmEntityList(jpaEntities, edmEntityType); expandList = resultsView.getExpand(); if (expandList != null && !expandList.isEmpty()) { int count = 0;
.inlineCountType(inlineCountType) .inlineCount(count) .expandSelectTree(UriParser.createExpandSelectTree(uriInfo.getSelect(), uriInfo.getExpand())) .callbacks(getCallbacks(data, entityType)) .nextLink(nextLink)
.inlineCountType(inlineCountType) .inlineCount(count) .expandSelectTree(UriParser.createExpandSelectTree(uriInfo.getSelect(), uriInfo.getExpand())) .callbacks(getCallbacks(data, entityType)) .nextLink(nextLink)
.callback(uriInfo.getCallback()) .clientCallbacks(uriInfo.getClientCallbacks()) .expandSelectTree(UriParser.createExpandSelectTree(uriInfo.getSelect(), uriInfo.getExpand())) .callbacks(getCallbacks(data, entityType)) .nextLink(nextLink)
+ (contentType == null ? "<null>" : contentType)); if(uriInfo.getFunctionImport() != null && !uriInfo.getExpand().isEmpty() && getContext().isInBatchMode()){ throw new ODataNotAcceptableException(ODataNotAcceptableException.NOT_SUPPORTED_CONTENT_TYPE .addContent(contentType));
if (uriInfo.getExpand().isEmpty()) { if (getContext().isInBatchMode()) { IReadEntitySetParameter parameter = new ReadEntitySetParameter(