Examples of EdmAssociationSet


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

    String entitySetName = sourceEntitySet.getName();
    String entitySetFromRole = navigationProperty.getFromRole();

    String key = entitySetName + ">>" + association + ">>" + entitySetFromRole;

    EdmAssociationSet edmAssociationSet = edmAssociationSets.get(key);
    if (edmAssociationSet != null) {
      return edmAssociationSet;
    }

    AssociationSet associationSet;
View Full Code Here

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

      List<EntityContainer> containers = getEntityContainerHierachy();
      List<EdmAssociationSet> edmAssociationSets = new ArrayList<EdmAssociationSet>();
      for (EntityContainer entityContainer : containers) {
        List<AssociationSet> associationSets = entityContainer.getAssociationSets();
        for (AssociationSet associationSet : associationSets) {
          EdmAssociationSet eas = createAssociationSet(associationSet);
          edmAssociationSets.add(eas);
        }
      }

      return edmAssociationSets;
View Full Code Here

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

    edmAssociationSet = new EdmAssociationSetImplProv(edmImplProv, associationSet, edmEntityContainer);
  }

  @Test
  public void testAssociationSet() throws Exception {
    EdmAssociationSet associationSet = edmAssociationSet;

    assertEquals("associationSetName", associationSet.getName());

    assertEquals("end1Role", associationSet.getEnd("end1Role").getRole());
    assertEquals(null, associationSet.getEnd("endWrongRole"));
  }
View Full Code Here

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

    assertEquals(null, associationSet.getEnd("endWrongRole"));
  }

  @Test(expected = EdmException.class)
  public void testAssociationSetNoEntity() throws Exception {
    EdmAssociationSet associationSet = edmAssociationSet;
    associationSet.getEnd("end2Role");
  }
View Full Code Here

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

    associationSet.getEnd("end2Role");
  }

  @Test
  public void testAssociationExists() throws Exception {
    EdmAssociationSet associationSet = edmAssociationSet;
    assertNotNull(associationSet.getAssociation());
  }
View Full Code Here

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

    assertNotNull(associationSet.getAssociation());
  }

  @Test
  public void testEntityContainer() throws Exception {
    EdmAssociationSet associationSet = edmAssociationSet;
    assertNotNull(associationSet.getEntityContainer());
  }
View Full Code Here

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

    String entitySetName = sourceEntitySet.getName();
    String entitySetFromRole = navigationProperty.getFromRole();

    String key = entitySetName + ">>" + association + ">>" + entitySetFromRole;

    EdmAssociationSet edmAssociationSet = edmAssociationSets.get(key);
    if (edmAssociationSet != null) {
      return edmAssociationSet;
    }

    AssociationSet associationSet;
View Full Code Here

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

    return edmEntityType;
  }

  @Override
  public EdmEntitySet getRelatedEntitySet(final EdmNavigationProperty navigationProperty) throws EdmException {
    EdmAssociationSet associationSet =
        edmEntityContainer.getAssociationSet(edmEntityContainer.getEntitySet(entitySet.getName()), navigationProperty);
    EdmAssociationSetEnd toEnd = associationSet.getEnd(navigationProperty.getToRole());
    if (toEnd == null) {
      throw new EdmException(EdmException.COMMON);
    }
    EdmEntitySet targetEntitySet = toEnd.getEntitySet();
    if (targetEntitySet == null) {
View Full Code Here

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

    String entitySetName = sourceEntitySet.getName();
    String entitySetFromRole = navigationProperty.getFromRole();

    String key = entitySetName + ">>" + association + ">>" + entitySetFromRole;

    EdmAssociationSet edmAssociationSet = edmAssociationSets.get(key);
    if (edmAssociationSet != null) {
      return edmAssociationSet;
    }

    AssociationSet associationSet;
View Full Code Here

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

    return edmEntityType;
  }

  @Override
  public EdmEntitySet getRelatedEntitySet(final EdmNavigationProperty navigationProperty) throws EdmException {
    EdmAssociationSet associationSet =
        edmEntityContainer.getAssociationSet(edmEntityContainer.getEntitySet(entitySet.getName()), navigationProperty);
    EdmAssociationSetEnd toEnd = associationSet.getEnd(navigationProperty.getToRole());
    if (toEnd == null) {
      throw new EdmException(EdmException.COMMON);
    }
    EdmEntitySet targetEntitySet = toEnd.getEntitySet();
    if (targetEntitySet == 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.