Examples of EdmException


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

    isDefaultContainer = entityContainerInfo.isDefaultEntityContainer();

    if (entityContainerInfo.getExtendz() != null) {
      edmExtendedEntityContainer = edm.getEntityContainer(entityContainerInfo.getExtendz());
      if (edmExtendedEntityContainer == null) {
        throw new EdmException(EdmException.COMMON);
      }
    }
  }
View Full Code Here

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

    EntitySet entitySet;
    try {
      entitySet = edm.edmProvider.getEntitySet(entityContainerInfo.getName(), name);
    } catch (ODataException e) {
      throw new EdmException(EdmException.PROVIDERPROBLEM, e);
    }

    if (entitySet != null) {
      edmEntitySet = createEntitySet(entitySet);
    } else if (edmExtendedEntityContainer != null) {
View Full Code Here

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

    FunctionImport functionImport;
    try {
      functionImport = edm.edmProvider.getFunctionImport(entityContainerInfo.getName(), name);
    } catch (ODataException e) {
      throw new EdmException(EdmException.PROVIDERPROBLEM, e);
    }

    if (functionImport != null) {
      edmFunctionImport = createFunctionImport(functionImport);
      edmFunctionImports.put(name, edmFunctionImport);
View Full Code Here

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

    try {
      associationSet =
          edm.edmProvider.getAssociationSet(entityContainerInfo.getName(), associationFQName, entitySetName,
              entitySetFromRole);
    } catch (ODataException e) {
      throw new EdmException(EdmException.PROVIDERPROBLEM, e);
    }

    if (associationSet != null) {
      edmAssociationSet = createAssociationSet(associationSet);
      edmAssociationSets.put(key, edmAssociationSet);
      return edmAssociationSet;
    } else if (edmExtendedEntityContainer != null) {
      edmAssociationSet = edmExtendedEntityContainer.getAssociationSet(sourceEntitySet, navigationProperty);
      edmAssociationSets.put(key, edmAssociationSet);
      return edmAssociationSet;
    } else {
      throw new EdmException(EdmException.COMMON);
    }
  }
View Full Code Here

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

          edmEntitySets.add(ees);
        }
      }
      return edmEntitySets;
    } catch (ODataException e) {
      throw new EdmException(EdmException.PROVIDERPROBLEM, e);
    }
  }
View Full Code Here

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

        }
      }

      return edmAssociationSets;
    } catch (ODataException e) {
      throw new EdmException(EdmException.PROVIDERPROBLEM, e);
    }
  }
View Full Code Here

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

      entityContainerHierachy.add(currentContainer);
      currentName = currentContainer.getExtendz();
    }

    if (entityContainerHierachy.isEmpty()) {
      throw new EdmException(EdmException.PROVIDERPROBLEM, "No container at all found.");
    }
    return entityContainerHierachy;
  }
View Full Code Here

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

      EasyMock.expect(edmType.getName()).andReturn("identifier");
      EasyMock.replay(edmType);
      EasyMock.expect(edmMapping.getInternalName()).andStubReturn("id");
      EasyMock.replay(edmMapping);
      EasyMock.expect(edmTyped.getType()).andStubThrow(
          new EdmException(null));
      EasyMock.expect(edmTyped.getMapping()).andStubReturn(edmMapping);
      EasyMock.expect(edmTyped.getName()).andReturn("identifier").anyTimes();
      EasyMock.replay(edmTyped);
      EasyMock.expect(structuralType.getProperty("identifier"))
          .andStubReturn(edmTyped);
View Full Code Here

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

  public void testGetGetterEdmException() {
    JPAEntityParser resultParser = new JPAEntityParser();
    Object jpaEntity = new demoItem("abc", 10);
    EdmStructuralType structuralType = EasyMock.createMock(EdmStructuralType.class);
    try {
      EasyMock.expect(structuralType.getPropertyNames()).andStubThrow(new EdmException(null));
      EasyMock.replay(structuralType);
      Method getGetters =
          resultParser.getClass().getDeclaredMethod("getGetters", Object.class, EdmStructuralType.class);
      getGetters.setAccessible(true);
      try {
View Full Code Here

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

    EasyMock.expect(edmMapping.getInternalName()).andStubReturn("soid");
    EasyMock.expect(edmProperty.getMapping()).andStubReturn(edmMapping);
    EasyMock.expect(edmProperty.getName()).andStubReturn("soid");
    EdmSimpleType edmType = EasyMock.createMock(EdmSimpleType.class);
    if (toThrowException) {
      EasyMock.expect(edmProperty.getType()).andStubThrow(new EdmException(null));
    } else {
      EasyMock.expect(edmProperty.getType()).andStubReturn(edmType);
    }
    EasyMock.expect(keyPredicate.getProperty()).andStubReturn(edmProperty);
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.