本文整理了Java中org.apache.olingo.odata2.api.ep.callback.WriteFeedCallbackResult
类的一些代码示例,展示了WriteFeedCallbackResult
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteFeedCallbackResult
类的具体详情如下:
包路径:org.apache.olingo.odata2.api.ep.callback.WriteFeedCallbackResult
类名称:WriteFeedCallbackResult
[英]Result of a callback. It contains the data of the feed which is to be expanded as well as the BaseUri of the feed. Further callbacks for this feed can also be set.
[中]回调的结果。它包含要扩展的提要的数据以及提要的BaseUri。还可以设置此提要的进一步回调。
代码示例来源:origin: com.sap.cloud.servicesdk.prov/odata-core
result = new WriteFeedCallbackResult();
result.setFeedData(inlinedFeed);
providerWritePropertiesBuilder.selfLink(context.getSelfLink());
result.setInlineProperties(providerWritePropertiesBuilder.build());
代码示例来源:origin: org.apache.olingo/olingo-odata2-core-incubating
throw new EntityProviderException(EntityProviderException.COMMON, e);
List<Map<String, Object>> inlineData = result.getFeedData();
if (inlineData == null) {
inlineData = new ArrayList<Map<String, Object>>();
EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
AtomFeedProducer inlineFeedProducer = new AtomFeedProducer(inlineProperties);
代码示例来源:origin: org.apache.olingo/olingo-odata2-core
throw new EntityProviderProducerException(EntityProviderException.COMMON, e);
List<Map<String, Object>> inlineData = result.getFeedData();
if (inlineData == null) {
inlineData = new ArrayList<Map<String, Object>>();
EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
AtomFeedProducer inlineFeedProducer = new AtomFeedProducer(inlineProperties);
代码示例来源: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: com.sap.cloud.servicesdk/odata-v2-lib
throw new EntityProviderProducerException(EntityProviderException.COMMON, e);
List<Map<String, Object>> inlineData = result.getFeedData();
if (inlineData == null) {
inlineData = new ArrayList<Map<String, Object>>();
EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
AtomFeedProducer inlineFeedProducer = new AtomFeedProducer(inlineProperties);
代码示例来源:origin: org.apache.olingo/olingo-odata2-jpa-processor-core
@Override
public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context)
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>>();
edmEntityList = jpaResultParser.parse2EdmEntityList(listOfItems, nextEntitySet.getEntityType());
result.setFeedData(edmEntityList);
count++;
result.setFeedData(edmEntityList);
result.setInlineProperties(getInlineEntityProviderProperties(context));
} catch (EdmException e) {
throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
代码示例来源:origin: org.apache.olingo/olingo-odata2-core-incubating
final WriteFeedCallbackResult result =
((OnWriteFeedContent) callback).retrieveFeedResult((WriteFeedCallbackContext) context);
List<Map<String, Object>> inlineData = result.getFeedData();
if (inlineData == null) {
inlineData = new ArrayList<Map<String, Object>>();
final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
final EntityInfoAggregator inlineEntityInfo =
EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
代码示例来源:origin: io.cronapp/olingo-odata2-jpa-processor-core
@Override
public WriteFeedCallbackResult retrieveFeedResult(final WriteFeedCallbackContext context)
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>>();
edmEntityList = jpaResultParser.parse2EdmEntityList(listOfItems, nextEntitySet.getEntityType());
result.setFeedData(edmEntityList);
count++;
result.setFeedData(edmEntityList);
result.setInlineProperties(getInlineEntityProviderProperties(context));
} catch (EdmException e) {
throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
代码示例来源:origin: com.sap.cloud.servicesdk/odata-v2-lib
final WriteFeedCallbackResult result =
((OnWriteFeedContent) callback).retrieveFeedResult((WriteFeedCallbackContext) context);
List<Map<String, Object>> inlineData = result.getFeedData();
if (inlineData == null) {
inlineData = new ArrayList<Map<String, Object>>();
final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
final EntityInfoAggregator inlineEntityInfo =
EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
代码示例来源: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);
}
}
代码示例来源:origin: org.apache.olingo/olingo-odata2-core
final WriteFeedCallbackResult result =
((OnWriteFeedContent) callback).retrieveFeedResult((WriteFeedCallbackContext) context);
List<Map<String, Object>> inlineData = result.getFeedData();
if (inlineData == null) {
inlineData = new ArrayList<Map<String, Object>>();
final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
final EntityInfoAggregator inlineEntityInfo =
EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
代码示例来源: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!