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

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

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

WriteEntryCallbackContext.getNavigationProperty介绍

暂无

代码示例

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

EdmNavigationProperty navigationProperty = context.getNavigationProperty();

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

Map<String, ExpandSelectTreeNode> navigationLinks = null;
JPAEntityParser jpaResultParser = new JPAEntityParser();
EdmNavigationProperty currentNavigationProperty = context.getNavigationProperty();
try {
 Object inlinedEntry = entry.get(currentNavigationProperty.getName());
  currentNavPropertyList = new ArrayList<EdmNavigationProperty>();
  List<EdmNavigationProperty> nextNavProperty =
    getNextNavigationProperty(context.getSourceEntitySet().getEntityType(), context.getNavigationProperty());
  if (nextNavProperty != null) {
   currentNavPropertyList.addAll(nextNavProperty);

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

Map<String, ExpandSelectTreeNode> navigationLinks = null;
JPAEntityParser jpaResultParser = new JPAEntityParser(oDataJPAContext, null);
EdmNavigationProperty currentNavigationProperty = context.getNavigationProperty();
try {
 Object inlinedEntry = entry.get(currentNavigationProperty.getName());
  currentNavPropertyList = new ArrayList<EdmNavigationProperty>();
  List<EdmNavigationProperty> nextNavProperty =
    getNextNavigationProperty(context.getSourceEntitySet().getEntityType(), context.getNavigationProperty());
  if (nextNavProperty != null) {
   currentNavPropertyList.addAll(nextNavProperty);

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

相关文章