@Test public void testGetAssociationFullQualifiedName() { Association association = null; try { association = edmProvider.getAssociation(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader_SalesOrderItem")); } catch (ODataException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } assertNotNull(association); assertEquals("SalesOrderHeader_SalesOrderItem", association.getName()); }
@Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for (Schema schema : schemas) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { if (schema.getAssociations() == null) { return null; } for (Association association : schema.getAssociations()) { if (association.getName().equals(edmFQName.getName())) { associations.put(edmFQName.toString(), association); return association; } } } } } return null; }
ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for (Schema schema : schemas) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { if (schema.getAssociations() == null) { return null; } for (Association association : schema.getAssociations()) { if (association.getName().equals(edmFQName.getName())) { associations.put(edmFQName.toString(), association); return association; } } } } } return null; } }
ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for (Schema schema : schemas) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { if (schema.getAssociations() == null) { return null; } for (Association association : schema.getAssociations()) { if (association.getName().equals(edmFQName.getName())) { associations.put(edmFQName.toString(), association); return association; } } } } } return null; } ODataJPAEdmProvider();  ODataJPAEdmProvider(final ODataJPAContext oDataJPAContext); }
ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for (Schema schema : schemas) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { if (schema.getAssociations() == null) { return null; } for (Association association : schema.getAssociations()) { if (association.getName().equals(edmFQName.getName())) { associations.put(edmFQName.toString(), association); return association; } } } } } return null; } ODataJPAEdmProvider();  ODataJPAEdmProvider(final ODataJPAContext oDataJPAContext); ODataJPAContext getODataJPAContext(); void setODataJPAContext(final ODataJPAContext jpaContext); @Override EntityContainerInfo getEntityContainerInfo(final String name); @Override EntityType getEntityType(final FullQualifiedName edmFQName); @Override ComplexType getComplexType(final FullQualifiedName edmFQName); @Override Association getAssociation(final FullQualifiedName edmFQName); @Override EntitySet getEntitySet(final String entityContainer, final String name); @Override AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,
      final String sourceEntitySetName, final String sourceEntitySetRole); @Override FunctionImport getFunctionImport(final String entityContainer, final String name); @Override List<Schema> getSchemas(); }
ODataJPAEdmProvider extends EdmProvider { @Override public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException { if (edmFQName != null) { if (associations.containsKey(edmFQName.toString())) { return associations.get(edmFQName.toString()); } else if (schemas == null) { getSchemas(); } for (Schema schema : schemas) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { if (schema.getAssociations() == null) { return null; } for (Association association : schema.getAssociations()) { if (association.getName().equals(edmFQName.getName())) { associations.put(edmFQName.toString(), association); return association; } } } } } return null; } ODataJPAEdmProvider();  ODataJPAEdmProvider(final ODataJPAContext oDataJPAContext); ODataJPAContext getODataJPAContext(); void setODataJPAContext(final ODataJPAContext jpaContext); @Override EntityContainerInfo getEntityContainerInfo(final String name); @Override EntityType getEntityType(final FullQualifiedName edmFQName); @Override ComplexType getComplexType(final FullQualifiedName edmFQName); @Override Association getAssociation(final FullQualifiedName edmFQName); @Override EntitySet getEntitySet(final String entityContainer, final String name); @Override AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,
      final String sourceEntitySetName, final String sourceEntitySetRole); @Override FunctionImport getFunctionImport(final String entityContainer, final String name); @Override List<Schema> getSchemas();  }