Package org.apache.olingo.odata2.api.edm

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


    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

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

        }
      }

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

      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

      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

  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

    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

    EdmEntitySet entitySet = EasyMock.createMock(EdmEntitySet.class);
    EdmEntityType entityType = EasyMock.createMock(EdmEntityType.class);

    try {
      EasyMock.expect(entityType.getName()).andStubThrow(new EdmException(null));
      EasyMock.expect(entitySet.getEntityType()).andStubThrow(new EdmException(null));
    } catch (EdmException e1) {
      // throw new ODataException();
    }

    EasyMock.replay(entityType);
View Full Code Here

        } else {
          edmEntityContainers.put(name, edmEntityContainer);
        }
      }
    } catch (ODataException e) {
      throw new EdmException(EdmException.COMMON, e);
    }

    return edmEntityContainer;
  }
View Full Code Here

TOP

Related Classes of org.apache.olingo.odata2.api.edm.EdmException

Copyright © 2018 www.massapicom. 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.