本文整理了Java中org.apache.olingo.odata2.api.ep.callback.WriteFeedCallbackResult.setFeedData()
方法的一些代码示例,展示了WriteFeedCallbackResult.setFeedData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteFeedCallbackResult.setFeedData()
方法的具体详情如下:
包路径:org.apache.olingo.odata2.api.ep.callback.WriteFeedCallbackResult
类名称:WriteFeedCallbackResult
方法名:setFeedData
[英]Sets the feed data as a list of maps.
[中]将提要数据设置为地图列表。
代码示例来源:origin: io.cronapp/olingo-odata2-jpa-processor-core
edmEntityList = jpaResultParser.parse2EdmEntityList(listOfItems, nextEntitySet.getEntityType());
result.setFeedData(edmEntityList);
count++;
result.setFeedData(edmEntityList);
代码示例来源:origin: org.apache.olingo/olingo-odata2-jpa-processor-core
edmEntityList = jpaResultParser.parse2EdmEntityList(listOfItems, nextEntitySet.getEntityType());
result.setFeedData(edmEntityList);
count++;
result.setFeedData(edmEntityList);
代码示例来源:origin: com.sap.cloud.servicesdk.prov/odata-core
result.setFeedData(inlinedFeed);
代码示例来源:origin: io.cronapp/olingo-odata2-annotation-processor-core
@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);
}
}
代码示例来源:origin: org.apache.olingo/olingo-odata2-annotation-processor-core-incubating
@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);
}
}
代码示例来源:origin: org.apache.olingo/olingo-odata2-annotation-processor-core
@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);
}
}
内容来源于网络,如有侵权,请联系作者删除!