本文整理了Java中org.apache.olingo.odata2.api.ep.callback.WriteEntryCallbackResult
类的一些代码示例,展示了WriteEntryCallbackResult
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteEntryCallbackResult
类的具体详情如下:
包路径:org.apache.olingo.odata2.api.ep.callback.WriteEntryCallbackResult
类名称:WriteEntryCallbackResult
[英]Result of a callback. It contains the data of the entry which is to be expanded as well as the properties of this entry.
[中]回调的结果。它包含要展开的条目的数据以及该条目的属性。
代码示例来源:origin: com.sap.cloud.servicesdk.prov/odata-core
@Override
public WriteEntryCallbackResult retrieveEntryResult(WriteEntryCallbackContext context) throws ODataApplicationException{
WriteEntryCallbackResult result = new WriteEntryCallbackResult();
result.setEntryData(inlinedEntry); // no null check required
if(inlinedEntry != null){
result.setInlineProperties(getInlineEntityProviderProperties(context, inlineInfo).build());
代码示例来源:origin: org.apache.olingo/olingo-odata2-core-incubating
throw new EntityProviderException(EntityProviderException.COMMON, e);
Map<String, Object> inlineData = result.getEntryData();
if (inlineData != null && !inlineData.isEmpty()) {
EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);
代码示例来源:origin: com.sap.cloud.servicesdk/odata-v2-lib
throw new EntityProviderProducerException(EntityProviderException.COMMON, e);
Map<String, Object> inlineData = result.getEntryData();
EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);
代码示例来源:origin: io.cronapp/olingo-odata2-annotation-processor-core
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
throws ODataApplicationException {
try {
final EdmEntityType entityType =
context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType();
WriteEntryCallbackResult result = new WriteEntryCallbackResult();
Object relatedData;
try {
relatedData = readRelatedData(context);
} catch (final ODataNotFoundException e) {
relatedData = null;
}
if (relatedData == null) {
result.setEntryData(Collections.<String, Object> emptyMap());
} else {
result.setEntryData(getStructuralTypeValueMap(relatedData, entityType));
EntityProviderWriteProperties inlineProperties =
EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks(
getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
.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
throw new EntityProviderProducerException(EntityProviderException.COMMON, e);
Map<String, Object> inlineData = result.getEntryData();
EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);
代码示例来源:origin: org.apache.olingo/olingo-odata2-annotation-processor-core-incubating
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
throws ODataApplicationException {
try {
final EdmEntityType entityType =
context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType();
WriteEntryCallbackResult result = new WriteEntryCallbackResult();
Object relatedData;
try {
relatedData = readRelatedData(context);
} catch (final ODataNotFoundException e) {
relatedData = null;
}
if (relatedData == null) {
result.setEntryData(Collections.<String, Object> emptyMap());
} else {
result.setEntryData(getStructuralTypeValueMap(relatedData, entityType));
EntityProviderWriteProperties inlineProperties =
EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks(
getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
.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-incubating
final WriteEntryCallbackResult result =
((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
Map<String, Object> inlineData = result.getEntryData();
if (inlineData != null && !inlineData.isEmpty()) {
final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
final EntityInfoAggregator inlineEntityInfo =
EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
代码示例来源:origin: org.apache.olingo/olingo-odata2-annotation-processor-core
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
throws ODataApplicationException {
try {
final EdmEntityType entityType =
context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType();
WriteEntryCallbackResult result = new WriteEntryCallbackResult();
Object relatedData;
try {
relatedData = readRelatedData(context);
} catch (final ODataNotFoundException e) {
relatedData = null;
}
if (relatedData == null) {
result.setEntryData(Collections.<String, Object> emptyMap());
} else {
result.setEntryData(getStructuralTypeValueMap(relatedData, entityType));
EntityProviderWriteProperties inlineProperties =
EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks(
getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
.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
final WriteEntryCallbackResult result =
((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
Map<String, Object> inlineData = result.getEntryData();
final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
final EntityInfoAggregator inlineEntityInfo =
EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
代码示例来源:origin: org.apache.olingo/olingo-odata2-jpa-processor-core
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
throws ODataApplicationException {
WriteEntryCallbackResult result = new WriteEntryCallbackResult();
Map<String, Object> entry = context.getEntryData();
Map<String, Object> edmPropertyValueMap = null;
result.setEntryData(edmPropertyValueMap);
navigationLinks = context.getCurrentExpandSelectTreeNode().getLinks();
if (navigationLinks.size() > 0) {
edmPropertyValueMap.putAll(navigationMap);
result.setEntryData(edmPropertyValueMap);
result.setInlineProperties(getInlineEntityProviderProperties(context));
} catch (EdmException e) {
throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
代码示例来源:origin: org.apache.olingo/olingo-odata2-core
final WriteEntryCallbackResult result =
((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
Map<String, Object> inlineData = result.getEntryData();
final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
final EntityInfoAggregator inlineEntityInfo =
EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());
代码示例来源:origin: io.cronapp/olingo-odata2-jpa-processor-core
@Override
public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
throws ODataApplicationException {
WriteEntryCallbackResult result = new WriteEntryCallbackResult();
Map<String, Object> entry = context.getEntryData();
Map<String, Object> edmPropertyValueMap = null;
result.setEntryData(edmPropertyValueMap);
navigationLinks = context.getCurrentExpandSelectTreeNode().getLinks();
if (navigationLinks.size() > 0) {
edmPropertyValueMap.putAll(navigationMap);
result.setEntryData(edmPropertyValueMap);
result.setInlineProperties(getInlineEntityProviderProperties(context));
} catch (EdmException e) {
throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
内容来源于网络,如有侵权,请联系作者删除!