org.apache.olingo.odata2.api.ep.callback.WriteEntryCallbackResult.setInlineProperties()方法的使用及代码示例

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

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

WriteEntryCallbackResult.setInlineProperties介绍

[英]Sets the inline properties for this entry
[中]设置此项的内联属性

代码示例

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

  1. result.setInlineProperties(getInlineEntityProviderProperties(context, inlineInfo).build());

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

  1. result.setInlineProperties(getInlineEntityProviderProperties(context));
  2. } catch (EdmException e) {
  3. throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);

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

  1. result.setInlineProperties(getInlineEntityProviderProperties(context));
  2. } catch (EdmException e) {
  3. throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);

代码示例来源: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: 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-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. }

相关文章