Examples of EdmAssociationEnd


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

      String name = getAccessModifierName(navigationProperty.getName(),
          navigationProperty.getMapping(), accessModifier);

      Class<?>[] params = null;
      if (accessModifier.equals(ACCESS_MODIFIER_SET)) {
        EdmAssociationEnd end = navigationProperty.getRelationship().getEnd(navigationProperty.getToRole());
        switch (end.getMultiplicity()) {
        case MANY:
          params = new Class<?>[] { List.class };
          break;
        case ONE:
          params = new Class<?>[] { ((JPAEdmMapping) end.getEntityType().getMapping()).getJPAType() };
        default:
          break;
        }
      }
      return jpaEntity.getClass().getMethod(name,
View Full Code Here

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

  }

  public static EdmAssociationEnd mockEdmAssociatioEnd(final String navigationPropertyName, final String role)
      throws EdmException {
    EdmAssociationEnd associationEnd = EasyMock.createMock(EdmAssociationEnd.class);
    EasyMock.expect(associationEnd.getMultiplicity()).andReturn(EdmMultiplicity.ONE);
    EdmEntityType entityType = EasyMock.createMock(EdmEntityType.class);
    EasyMock.expect(entityType.getMapping()).andReturn((EdmMapping) mockEdmMapping("JPARelatedTypeMock", null, null));
    EasyMock.replay(entityType);

    EasyMock.expect(associationEnd.getEntityType()).andReturn(entityType);
    EasyMock.replay(associationEnd);
    return associationEnd;
  }
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.