@Test public void entityTypePhotoWithTwoKeyProperties() throws Exception { EntityType photo = aep.getEntityType(new FullQualifiedName(ModelSharedConstants.NAMESPACE_1, "Photo")); assertEquals("Photo", photo.getName()); final List<Property> properties = photo.getProperties(); assertEquals(5, properties.size()); assertTrue(containsProperty(properties, "Name")); assertTrue(containsProperty(properties, "ImageFormat")); assertTrue(containsProperty(properties, "MimeType")); assertTrue(containsProperty(properties, "ImageUrl")); assertTrue(containsProperty(properties, "Image")); assertFalse(photo.isAbstract()); assertTrue(photo.isHasStream()); assertEquals("MimeType",photo.getMapping().getMediaResourceMimeTypeKey()); assertEquals("ImageUrl",photo.getMapping().getMediaResourceSourceKey()); Key photoKey = photo.getKey(); List<PropertyRef> keyReferences = photoKey.getKeys(); assertEquals(2, keyReferences.size()); PropertyRef name = getPropertyRef(keyReferences, "Name"); assertEquals("Name", name.getName()); PropertyRef imageFormat = getPropertyRef(keyReferences, "ImageFormat"); assertEquals("ImageFormat", imageFormat.getName()); assertNull(photo.getNavigationProperties()); }
@Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } AnnotationEdmProvider(final Collection<Class<?>> annotatedClasses);  AnnotationEdmProvider(final String packageToScan); }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } AnnotationEdmProvider(final Collection<Class<?>> annotatedClasses);  AnnotationEdmProvider(final String packageToScan); @Override Association getAssociation(final FullQualifiedName edmFQName); @Override AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,
      final String sourceEntitySetName, final String sourceEntitySetRole); @Override ComplexType getComplexType(final FullQualifiedName edmFQName); @Override EntityContainerInfo getEntityContainerInfo(final String name); @Override EntitySet getEntitySet(final String entityContainer, final String name); @Override EntityType getEntityType(final FullQualifiedName edmFQName); @Override FunctionImport getFunctionImport(final String entityContainer, final String name); @Override List<Schema> getSchemas(); }
AnnotationEdmProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { Schema schema = namespace2Schema.get(edmFQName.getNamespace()); if (schema != null) { List<EntityType> complexTypes = schema.getEntityTypes(); for (EntityType complexType : complexTypes) { if (complexType.getName().equals(edmFQName.getName())) { return complexType; } } } return null; } AnnotationEdmProvider(final Collection<Class<?>> annotatedClasses);  AnnotationEdmProvider(final String packageToScan); @Override Association getAssociation(final FullQualifiedName edmFQName); @Override AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,
      final String sourceEntitySetName, final String sourceEntitySetRole); @Override ComplexType getComplexType(final FullQualifiedName edmFQName); @Override EntityContainerInfo getEntityContainerInfo(final String name); @Override EntitySet getEntitySet(final String entityContainer, final String name); @Override EntityType getEntityType(final FullQualifiedName edmFQName); @Override FunctionImport getFunctionImport(final String entityContainer, final String name); @Override List<Schema> getSchemas();  }