@Test public void testGetFunctionImport() { String functionImportName = null; try { functionImportName = edmProvider.getFunctionImport("salesorderprocessingContainer", "SalesOrder_FunctionImport1").getName(); } catch (ODataException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } assertEquals("SalesOrder_FunctionImport1", functionImportName); try { functionImportName = edmProvider.getFunctionImport("salesorderprocessingContainer", "SalesOrder_FunctionImport1").getName(); } catch (ODataException e) { assertTrue(true); } try { assertNotNull(edmProvider.getFunctionImport("salesorderprocessingContainer", "SalesOrder_FunctionImport1")); } catch (ODataException e) { e.printStackTrace(); } }
@Override public FunctionImport getFunctionImport(final String entityContainer, final String name) throws ODataException { if (functionImports.containsKey(name)) { return functionImports.get(name); } EntityContainer container = null; if (!entityContainerInfos.containsKey(entityContainer)) { container = (EntityContainer) getEntityContainerInfo(entityContainer); } else { container = (EntityContainer) entityContainerInfos.get(entityContainer); } if (container != null && name != null) { if (container.getFunctionImports() == null) { return null; } for (FunctionImport fi : container.getFunctionImports()) { if (name.equals(fi.getName())) { functionImports.put(name, fi); return fi; } } } return null; }
ODataJPAEdmProvider extends EdmProvider { @Override public FunctionImport getFunctionImport(final String entityContainer, final String name) throws ODataException { if (functionImports.containsKey(name)) { return functionImports.get(name); } EntityContainer container = null; if (!entityContainerInfos.containsKey(entityContainer)) { container = (EntityContainer) getEntityContainerInfo(entityContainer); } else { container = (EntityContainer) entityContainerInfos.get(entityContainer); } if (container != null && name != null) { if (container.getFunctionImports() == null) { return null; } for (FunctionImport fi : container.getFunctionImports()) { if (name.equals(fi.getName())) { functionImports.put(name, fi); return fi; } } } return null; } }
ODataJPAEdmProvider extends EdmProvider { @Override public FunctionImport getFunctionImport(final String entityContainer, final String name) throws ODataException { if (functionImports.containsKey(name)) { return functionImports.get(name); } EntityContainer container = null; if (!entityContainerInfos.containsKey(entityContainer)) { container = (EntityContainer) getEntityContainerInfo(entityContainer); } else { container = (EntityContainer) entityContainerInfos.get(entityContainer); } if (container != null && name != null) { if (container.getFunctionImports() == null) { return null; } for (FunctionImport fi : container.getFunctionImports()) { if (name.equals(fi.getName())) { functionImports.put(name, fi); return fi; } } } return null; } ODataJPAEdmProvider();  ODataJPAEdmProvider(final ODataJPAContext oDataJPAContext); }
ODataJPAEdmProvider extends EdmProvider { @Override public FunctionImport getFunctionImport(final String entityContainer, final String name) throws ODataException { if (functionImports.containsKey(name)) { return functionImports.get(name); } EntityContainer container = null; if (!entityContainerInfos.containsKey(entityContainer)) { container = (EntityContainer) getEntityContainerInfo(entityContainer); } else { container = (EntityContainer) entityContainerInfos.get(entityContainer); } if (container != null && name != null) { if (container.getFunctionImports() == null) { return null; } for (FunctionImport fi : container.getFunctionImports()) { if (name.equals(fi.getName())) { functionImports.put(name, fi); return fi; } } } 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 FunctionImport getFunctionImport(final String entityContainer, final String name) throws ODataException { if (functionImports.containsKey(name)) { return functionImports.get(name); } EntityContainer container = null; if (!entityContainerInfos.containsKey(entityContainer)) { container = (EntityContainer) getEntityContainerInfo(entityContainer); } else { container = (EntityContainer) entityContainerInfos.get(entityContainer); } if (container != null && name != null) { if (container.getFunctionImports() == null) { return null; } for (FunctionImport fi : container.getFunctionImports()) { if (name.equals(fi.getName())) { functionImports.put(name, fi); return fi; } } } 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();  }