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

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

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

WriteEntryCallbackContext.getSourceEntitySet介绍

暂无

代码示例

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

  1. Object inlinedEntry = entry.get(currentNavigationProperty.getName());
  2. if (nextEntitySet == null) {
  3. nextEntitySet = context.getSourceEntitySet().getRelatedEntitySet(currentNavigationProperty);
  4. currentNavPropertyList = new ArrayList<EdmNavigationProperty>();
  5. List<EdmNavigationProperty> nextNavProperty =
  6. getNextNavigationProperty(context.getSourceEntitySet().getEntityType(), context.getNavigationProperty());
  7. if (nextNavProperty != null) {
  8. currentNavPropertyList.addAll(nextNavProperty);

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

  1. Object inlinedEntry = entry.get(currentNavigationProperty.getName());
  2. if (nextEntitySet == null) {
  3. nextEntitySet = context.getSourceEntitySet().getRelatedEntitySet(currentNavigationProperty);
  4. currentNavPropertyList = new ArrayList<EdmNavigationProperty>();
  5. List<EdmNavigationProperty> nextNavProperty =
  6. getNextNavigationProperty(context.getSourceEntitySet().getEntityType(), context.getNavigationProperty());
  7. if (nextNavProperty != null) {
  8. currentNavPropertyList.addAll(nextNavProperty);

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

相关文章