Examples of EdmException


Examples of org.apache.olingo.odata2.api.edm.EdmException

      if (edmType == null) {
        edmType = edm.getEntityType(namespace, typeName.getName());
      }

      if (edmType == null) {
        throw new EdmException(EdmException.COMMON);
      }

    }
    return edmType;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

  private String getValidatedName(final String name) throws EdmException {
    Matcher matcher = PATTERN_VALID_NAME.matcher(name);
    if (matcher.matches()) {
      return name;
    }
    throw new EdmException(EdmException.COMMON);
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

  @Override
  public EdmAssociation getAssociation() throws EdmException {
    EdmAssociation association =
        edm.getAssociation(associationSet.getAssociation().getNamespace(), associationSet.getAssociation().getName());
    if (association == null) {
      throw new EdmException(EdmException.COMMON);
    }
    return association;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

      return null;
    }

    EdmEntitySet entitySet = edmEntityContainer.getEntitySet(end.getEntitySet());
    if (entitySet == null) {
      throw new EdmException(EdmException.COMMON);
    }

    return new EdmAssociationSetEndImplProv(end, entitySet);
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

  @Override
  public EdmEntityType getEntityType() throws EdmException {
    final FullQualifiedName type = associationEnd.getType();
    EdmEntityType entityType = edm.getEntityType(type.getNamespace(), type.getName());
    if (entityType == null) {
      throw new EdmException(EdmException.COMMON);
    }
    return entityType;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

  @Override
  public EdmType getType() throws EdmException {
    if (edmType == null) {
      edmType = EdmSimpleTypeFacadeImpl.getEdmSimpleType(property.getType());
      if (edmType == null) {
        throw new EdmException(EdmException.COMMON);
      }
    }
    return edmType;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

        entitySetUri = new URI(entitySetName);
      } else {
        entitySetUri = new URI(entityContainerName + "." + entitySetName);
      }
    } catch (URISyntaxException e) {
      throw new EdmException(EdmException.COMMON, e);
    }

  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

    private void handleCustomLinks(final EdmEntityType entityType) throws EdmException {
      for (Map.Entry<String, ExpandSelectTreeNode> entry : customExpandedNavigationProperties.entrySet()) {
        EdmTyped navigationProperty = entityType.getProperty(entry.getKey());
        if (navigationProperty == null) {
          throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(entry.getKey()));
        }
        if (!(navigationProperty instanceof EdmNavigationProperty)) {
          throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(entry.getKey()));
        }
        putLink(entry.getKey(), (ExpandSelectTreeNodeImpl) entry.getValue());
      }
    }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

    private void handleLinks(final EdmEntityType entityType, final List<String> names,
        final ExpandSelectTreeNodeImpl subNode) throws EdmException {
      for (String navigationPropertyName : names) {
        EdmTyped navigationProperty = entityType.getProperty(navigationPropertyName);
        if (navigationProperty == null) {
          throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(navigationPropertyName));
        } else if (!(navigationProperty instanceof EdmNavigationProperty)) {
          throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(navigationPropertyName));
        }
        putLink(navigationPropertyName, subNode);
      }
    }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmException

    private void handleProperties(final EdmEntityType entityType) throws EdmException {
      for (String propertyName : selectedPropertyNames) {
        EdmTyped property = entityType.getProperty(propertyName);
        if (property == null) {
          throw new EdmException(EdmException.PROPERTYNOTFOUND.addContent(propertyName));
        } else if (!(property instanceof EdmProperty)) {
          throw new EdmException(EdmException.MUSTBEPROPERTY.addContent(propertyName));
        }
        addProperty((EdmProperty) property);
      }
    }
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.