@Test(expected = EdmException.class) public void testAssociationSetNoEntity() throws Exception { EdmAssociationSet associationSet = edmAssociationSet; associationSet.getEnd("end2Role"); }
@Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEntitySet entitySet = edmEntityContainer.getEntitySet(end.getEntitySet()); if (entitySet == null) { throw new EdmException(EdmException.COMMON); } return new EdmAssociationSetEndImplProv(end, entitySet); }
EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEntitySet entitySet = edmEntityContainer.getEntitySet(end.getEntitySet()); if (entitySet == null) { throw new EdmException(EdmException.COMMON); } return new EdmAssociationSetEndImplProv(end, entitySet); } }
EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEntitySet entitySet = edmEntityContainer.getEntitySet(end.getEntitySet()); if (entitySet == null) { throw new EdmException(EdmException.COMMON); } return new EdmAssociationSetEndImplProv(end, entitySet); } EdmAssociationSetImplProv(final EdmImplProv edm, final AssociationSet associationSet,
      final EdmEntityContainer edmEntityContainer); }
EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEntitySet entitySet = edmEntityContainer.getEntitySet(end.getEntitySet()); if (entitySet == null) { throw new EdmException(EdmException.COMMON); } return new EdmAssociationSetEndImplProv(end, entitySet); } EdmAssociationSetImplProv(final EdmImplProv edm, final AssociationSet associationSet,
      final EdmEntityContainer edmEntityContainer); @Override EdmAssociation getAssociation(); @Override EdmAssociationSetEnd getEnd(final String role); @Override EdmEntityContainer getEntityContainer(); @Override EdmAnnotations getAnnotations(); }
EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEntitySet entitySet = edmEntityContainer.getEntitySet(end.getEntitySet()); if (entitySet == null) { throw new EdmException(EdmException.COMMON); } return new EdmAssociationSetEndImplProv(end, entitySet); } EdmAssociationSetImplProv(final EdmImplProv edm, final AssociationSet associationSet,
      final EdmEntityContainer edmEntityContainer); @Override EdmAssociation getAssociation(); @Override EdmAssociationSetEnd getEnd(final String role); @Override EdmEntityContainer getEntityContainer(); @Override EdmAnnotations getAnnotations();  }