org.apache.olingo.odata2.api.ep.callback.WriteEntryCallbackResult类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.3k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中org.apache.olingo.odata2.api.ep.callback.WriteEntryCallbackResult类的一些代码示例,展示了WriteEntryCallbackResult类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteEntryCallbackResult类的具体详情如下:
包路径:org.apache.olingo.odata2.api.ep.callback.WriteEntryCallbackResult
类名称: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

  1. @Override
  2. public WriteEntryCallbackResult retrieveEntryResult(WriteEntryCallbackContext context) throws ODataApplicationException{
  3. WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  4. result.setEntryData(inlinedEntry); // no null check required
  5. if(inlinedEntry != null){
  6. result.setInlineProperties(getInlineEntityProviderProperties(context, inlineInfo).build());

代码示例来源:origin: org.apache.olingo/olingo-odata2-core-incubating

  1. throw new EntityProviderException(EntityProviderException.COMMON, e);
  2. Map<String, Object> inlineData = result.getEntryData();
  3. if (inlineData != null && !inlineData.isEmpty()) {
  4. EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
  5. EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
  6. AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);

代码示例来源:origin: com.sap.cloud.servicesdk/odata-v2-lib

  1. throw new EntityProviderProducerException(EntityProviderException.COMMON, e);
  2. Map<String, Object> inlineData = result.getEntryData();
  3. EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
  4. EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
  5. AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);

代码示例来源:origin: io.cronapp/olingo-odata2-annotation-processor-core

  1. @Override
  2. public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
  3. throws ODataApplicationException {
  4. try {
  5. final EdmEntityType entityType =
  6. context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType();
  7. WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  8. Object relatedData;
  9. try {
  10. relatedData = readRelatedData(context);
  11. } catch (final ODataNotFoundException e) {
  12. relatedData = null;
  13. }
  14. if (relatedData == null) {
  15. result.setEntryData(Collections.<String, Object> emptyMap());
  16. } else {
  17. result.setEntryData(getStructuralTypeValueMap(relatedData, entityType));
  18. EntityProviderWriteProperties inlineProperties =
  19. EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks(
  20. getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
  21. .build();
  22. result.setInlineProperties(inlineProperties);
  23. }
  24. return result;
  25. } catch (final ODataException e) {
  26. throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e);
  27. }
  28. }

代码示例来源:origin: org.apache.olingo/olingo-odata2-core

  1. throw new EntityProviderProducerException(EntityProviderException.COMMON, e);
  2. Map<String, Object> inlineData = result.getEntryData();
  3. EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
  4. EdmEntitySet inlineEntitySet = eia.getEntitySet().getRelatedEntitySet(navProp);
  5. AtomEntryEntityProducer inlineProducer = new AtomEntryEntityProducer(inlineProperties);

代码示例来源:origin: org.apache.olingo/olingo-odata2-annotation-processor-core-incubating

  1. @Override
  2. public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
  3. throws ODataApplicationException {
  4. try {
  5. final EdmEntityType entityType =
  6. context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType();
  7. WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  8. Object relatedData;
  9. try {
  10. relatedData = readRelatedData(context);
  11. } catch (final ODataNotFoundException e) {
  12. relatedData = null;
  13. }
  14. if (relatedData == null) {
  15. result.setEntryData(Collections.<String, Object> emptyMap());
  16. } else {
  17. result.setEntryData(getStructuralTypeValueMap(relatedData, entityType));
  18. EntityProviderWriteProperties inlineProperties =
  19. EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks(
  20. getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
  21. .build();
  22. result.setInlineProperties(inlineProperties);
  23. }
  24. return result;
  25. } catch (final ODataException e) {
  26. throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e);
  27. }
  28. }

代码示例来源:origin: org.apache.olingo/olingo-odata2-core-incubating

  1. final WriteEntryCallbackResult result =
  2. ((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
  3. Map<String, Object> inlineData = result.getEntryData();
  4. if (inlineData != null && !inlineData.isEmpty()) {
  5. final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
  6. final EntityInfoAggregator inlineEntityInfo =
  7. EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());

代码示例来源:origin: org.apache.olingo/olingo-odata2-annotation-processor-core

  1. @Override
  2. public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
  3. throws ODataApplicationException {
  4. try {
  5. final EdmEntityType entityType =
  6. context.getSourceEntitySet().getRelatedEntitySet(context.getNavigationProperty()).getEntityType();
  7. WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  8. Object relatedData;
  9. try {
  10. relatedData = readRelatedData(context);
  11. } catch (final ODataNotFoundException e) {
  12. relatedData = null;
  13. }
  14. if (relatedData == null) {
  15. result.setEntryData(Collections.<String, Object> emptyMap());
  16. } else {
  17. result.setEntryData(getStructuralTypeValueMap(relatedData, entityType));
  18. EntityProviderWriteProperties inlineProperties =
  19. EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).callbacks(
  20. getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
  21. .build();
  22. result.setInlineProperties(inlineProperties);
  23. }
  24. return result;
  25. } catch (final ODataException e) {
  26. throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e);
  27. }
  28. }

代码示例来源:origin: com.sap.cloud.servicesdk/odata-v2-lib

  1. final WriteEntryCallbackResult result =
  2. ((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
  3. Map<String, Object> inlineData = result.getEntryData();
  4. final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
  5. final EntityInfoAggregator inlineEntityInfo =
  6. EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());

代码示例来源:origin: org.apache.olingo/olingo-odata2-jpa-processor-core

  1. @Override
  2. public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
  3. throws ODataApplicationException {
  4. WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  5. Map<String, Object> entry = context.getEntryData();
  6. Map<String, Object> edmPropertyValueMap = null;
  7. result.setEntryData(edmPropertyValueMap);
  8. navigationLinks = context.getCurrentExpandSelectTreeNode().getLinks();
  9. if (navigationLinks.size() > 0) {
  10. edmPropertyValueMap.putAll(navigationMap);
  11. result.setEntryData(edmPropertyValueMap);
  12. result.setInlineProperties(getInlineEntityProviderProperties(context));
  13. } catch (EdmException e) {
  14. throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);

代码示例来源:origin: org.apache.olingo/olingo-odata2-core

  1. final WriteEntryCallbackResult result =
  2. ((OnWriteEntryContent) callback).retrieveEntryResult((WriteEntryCallbackContext) context);
  3. Map<String, Object> inlineData = result.getEntryData();
  4. final EntityProviderWriteProperties inlineProperties = result.getInlineProperties();
  5. final EntityInfoAggregator inlineEntityInfo =
  6. EntityInfoAggregator.create(inlineEntitySet, inlineProperties.getExpandSelectTree());

代码示例来源:origin: io.cronapp/olingo-odata2-jpa-processor-core

  1. @Override
  2. public WriteEntryCallbackResult retrieveEntryResult(final WriteEntryCallbackContext context)
  3. throws ODataApplicationException {
  4. WriteEntryCallbackResult result = new WriteEntryCallbackResult();
  5. Map<String, Object> entry = context.getEntryData();
  6. Map<String, Object> edmPropertyValueMap = null;
  7. result.setEntryData(edmPropertyValueMap);
  8. navigationLinks = context.getCurrentExpandSelectTreeNode().getLinks();
  9. if (navigationLinks.size() > 0) {
  10. edmPropertyValueMap.putAll(navigationMap);
  11. result.setEntryData(edmPropertyValueMap);
  12. result.setInlineProperties(getInlineEntityProviderProperties(context));
  13. } catch (EdmException e) {
  14. throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);

相关文章