Examples of EdmNavigationProperty


Examples of org.odata4j.edm.EdmNavigationProperty

  @Override
  public BaseResponse getNavProperty(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo) {
    final EdmEntitySet ees = metadata.getEdmEntitySet(entitySetName);
    EdmEntityType eet = ees.getType();
    EdmNavigationProperty enp = eet.findNavigationProperty(navProp);
    if (enp == null) {
      throw new NotFoundException("EdmNavigationProperty " + navProp + " not found.");
    }
    final EdmEntitySet eesNavProp = metadata.getEdmEntitySet(enp.getToRole().getRole());
    EdmMultiplicity relMultiplicity = enp.getRelationship().getEnd2().getMultiplicity();

    Entity entity = findEntity(entitySetName, entityKey);
    Object navPropValue = entity.getProperties().get(navProp);
    if (navPropValue == null) {
      return Responses.entities(new ArrayList<OEntity>(), eesNavProp, 0, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.