@Test public void testEntityType() throws Exception { Edm edm = createEdm(); assertNotNull(edm); FullQualifiedName fqNameEmployee = new FullQualifiedName("RefScenario", "Employee"); EdmProvider testProvider = new EdmTestProvider(); EdmImplProv edmImpl = (EdmImplProv) edm; EntityType employee = edmImpl.getEdmProvider().getEntityType(fqNameEmployee); EntityType testEmployee = testProvider.getEntityType(fqNameEmployee); assertEquals(testEmployee.getName(), employee.getName()); assertEquals(testEmployee.isHasStream(), employee.isHasStream()); assertEquals(testEmployee.getProperties().size(), employee.getProperties().size()); assertEquals(testEmployee.getNavigationProperties().size(), employee.getNavigationProperties().size()); }
@Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { for (Schema schema : dataServices.getSchemas()) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { for (EntityType entityType : schema.getEntityTypes()) { if (entityType.getName().equals(edmFQName.getName())) { return entityType; } } } } return null; }
EdmxProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { for (Schema schema : dataServices.getSchemas()) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { for (EntityType entityType : schema.getEntityTypes()) { if (entityType.getName().equals(edmFQName.getName())) { return entityType; } } } } return null; } }
EdmxProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { for (Schema schema : dataServices.getSchemas()) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { for (EntityType entityType : schema.getEntityTypes()) { if (entityType.getName().equals(edmFQName.getName())) { return entityType; } } } } return null; }  }
EdmxProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { for (Schema schema : dataServices.getSchemas()) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { for (EntityType entityType : schema.getEntityTypes()) { if (entityType.getName().equals(edmFQName.getName())) { return entityType; } } } } return null; }  EdmxProvider parse(final InputStream in, final boolean validate); @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(); @Override List<AliasInfo> getAliasInfos(); }
EdmxProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { for (Schema schema : dataServices.getSchemas()) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { for (EntityType entityType : schema.getEntityTypes()) { if (entityType.getName().equals(edmFQName.getName())) { return entityType; } } } } return null; }  EdmxProvider parse(final InputStream in, final boolean validate); @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(); @Override List<AliasInfo> getAliasInfos();  }