navigationProperties.add(new NavigationProperty().setName("Manufacturer")
.setRelationship(ASSOCIATION_CAR_MANUFACTURER).setFromRole(ROLE_1_1).setToRole(ROLE_1_2));
// Key
List<PropertyRef> keyProperties = new ArrayList<PropertyRef>();
keyProperties.add(new PropertyRef().setName("Id"));
Key key = new Key().setKeys(keyProperties);
return new EntityType().setName(ENTITY_TYPE_1_1.getName())
.setProperties(properties)
.setKey(key)
.setNavigationProperties(navigationProperties);
} else if (ENTITY_TYPE_1_2.getName().equals(edmFQName.getName())) {
// Properties
List<Property> properties = new ArrayList<Property>();
properties.add(new SimpleProperty().setName("Id").setType(EdmSimpleTypeKind.Int32).setFacets(
new Facets().setNullable(false)));
properties.add(new SimpleProperty().setName("Name").setType(EdmSimpleTypeKind.String).setFacets(
new Facets().setNullable(false).setMaxLength(100))
.setCustomizableFeedMappings(
new CustomizableFeedMappings().setFcTargetPath(EdmTargetPath.SYNDICATION_TITLE)));
properties.add(new ComplexProperty().setName("Address").setType(new FullQualifiedName(NAMESPACE, "Address")));
properties.add(new SimpleProperty().setName("Updated").setType(EdmSimpleTypeKind.DateTime)
.setFacets(new Facets().setNullable(false).setConcurrencyMode(EdmConcurrencyMode.Fixed))
.setCustomizableFeedMappings(
new CustomizableFeedMappings().setFcTargetPath(EdmTargetPath.SYNDICATION_UPDATED)));
// Navigation Properties
List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
navigationProperties.add(new NavigationProperty().setName("Cars")
.setRelationship(ASSOCIATION_CAR_MANUFACTURER).setFromRole(ROLE_1_2).setToRole(ROLE_1_1));
// Key
List<PropertyRef> keyProperties = new ArrayList<PropertyRef>();
keyProperties.add(new PropertyRef().setName("Id"));
Key key = new Key().setKeys(keyProperties);
return new EntityType().setName(ENTITY_TYPE_1_2.getName())
.setProperties(properties)
.setKey(key)