@Test public void testGetAssociationSets() throws EdmException { List<EdmAssociationSet> associationSets = edmEntityContainer.getAssociationSets(); assertNotNull(associationSets); assertEquals(2, associationSets.size()); for (EdmAssociationSet assoSet : associationSets) { String name = assoSet.getName(); boolean expectedName = "Name4711".equals(name) || "Name42".equals(name); assertTrue("Found not expected name: " + name, expectedName); } }
@Override public List<EdmAssociationSet> getAssociationSets() throws EdmException { try { List<EntityContainer> containers = getEntityContainerHierachy(); List<EdmAssociationSet> edmAssociationSetsList = new ArrayList<EdmAssociationSet>(); for (EntityContainer entityContainer : containers) { List<AssociationSet> associationSets = entityContainer.getAssociationSets(); for (AssociationSet associationSet : associationSets) { EdmAssociationSet eas = createAssociationSet(associationSet); edmAssociationSetsList.add(eas); } } return edmAssociationSetsList; } catch (ODataException e) { throw new EdmException(EdmException.PROVIDERPROBLEM, e); } }
EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public List<EdmAssociationSet> getAssociationSets() throws EdmException { try { List<EntityContainer> containers = getEntityContainerHierachy(); List<EdmAssociationSet> edmAssociationSetsList = new ArrayList<EdmAssociationSet>(); for (EntityContainer entityContainer : containers) { List<AssociationSet> associationSets = entityContainer.getAssociationSets(); for (AssociationSet associationSet : associationSets) { EdmAssociationSet eas = createAssociationSet(associationSet); edmAssociationSetsList.add(eas); } } return edmAssociationSetsList; } catch (ODataException e) { throw new EdmException(EdmException.PROVIDERPROBLEM, e); } } }
EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public List<EdmAssociationSet> getAssociationSets() throws EdmException { try { List<EntityContainer> containers = getEntityContainerHierachy(); List<EdmAssociationSet> edmAssociationSetsList = new ArrayList<EdmAssociationSet>(); for (EntityContainer entityContainer : containers) { List<AssociationSet> associationSets = entityContainer.getAssociationSets(); for (AssociationSet associationSet : associationSets) { EdmAssociationSet eas = createAssociationSet(associationSet); edmAssociationSetsList.add(eas); } } return edmAssociationSetsList; } catch (ODataException e) { throw new EdmException(EdmException.PROVIDERPROBLEM, e); } } EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainerInfo); }
EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public List<EdmAssociationSet> getAssociationSets() throws EdmException { try { List<EntityContainer> containers = getEntityContainerHierachy(); List<EdmAssociationSet> edmAssociationSetsList = new ArrayList<EdmAssociationSet>(); for (EntityContainer entityContainer : containers) { List<AssociationSet> associationSets = entityContainer.getAssociationSets(); for (AssociationSet associationSet : associationSets) { EdmAssociationSet eas = createAssociationSet(associationSet); edmAssociationSetsList.add(eas); } } return edmAssociationSetsList; } catch (ODataException e) { throw new EdmException(EdmException.PROVIDERPROBLEM, e); } } EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainerInfo); @Override String getName(); @Override EdmEntitySet getEntitySet(final String name); @Override EdmFunctionImport getFunctionImport(final String name); @Override EdmAssociationSet getAssociationSet(final EdmEntitySet sourceEntitySet,
      final EdmNavigationProperty navigationProperty); @Override boolean isDefaultEntityContainer(); @Override EdmAnnotations getAnnotations(); @Override List<EdmEntitySet> getEntitySets(); @Override List<EdmAssociationSet> getAssociationSets(); @Override String getNamespace(); }
EdmEntityContainerImplProv implements EdmEntityContainer, EdmAnnotatable { @Override public List<EdmAssociationSet> getAssociationSets() throws EdmException { try { List<EntityContainer> containers = getEntityContainerHierachy(); List<EdmAssociationSet> edmAssociationSetsList = new ArrayList<EdmAssociationSet>(); for (EntityContainer entityContainer : containers) { List<AssociationSet> associationSets = entityContainer.getAssociationSets(); for (AssociationSet associationSet : associationSets) { EdmAssociationSet eas = createAssociationSet(associationSet); edmAssociationSetsList.add(eas); } } return edmAssociationSetsList; } catch (ODataException e) { throw new EdmException(EdmException.PROVIDERPROBLEM, e); } } EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainerInfo); @Override String getName(); @Override EdmEntitySet getEntitySet(final String name); @Override EdmFunctionImport getFunctionImport(final String name); @Override EdmAssociationSet getAssociationSet(final EdmEntitySet sourceEntitySet,
      final EdmNavigationProperty navigationProperty); @Override boolean isDefaultEntityContainer(); @Override EdmAnnotations getAnnotations(); @Override List<EdmEntitySet> getEntitySets(); @Override List<EdmAssociationSet> getAssociationSets(); @Override String getNamespace();  }