@Override
public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException {
if (NAMESPACE_1.equals(edmFQName.getNamespace())) {
if (ASSOCIATION_1_1.getName().equals(edmFQName.getName())) {
return new Association().setName(ASSOCIATION_1_1.getName())
.setEnd1(
new AssociationEnd().setType(ENTITY_TYPE_1_1).setRole(ROLE_1_1).setMultiplicity(EdmMultiplicity.MANY))
.setEnd2(
new AssociationEnd().setType(ENTITY_TYPE_1_4).setRole(ROLE_1_4).setMultiplicity(EdmMultiplicity.ONE));
} else if (ASSOCIATION_1_2.getName().equals(edmFQName.getName())) {
return new Association().setName(ASSOCIATION_1_2.getName())
.setEnd1(
new AssociationEnd().setType(ENTITY_TYPE_1_1).setRole(ROLE_1_1).setMultiplicity(EdmMultiplicity.MANY))
.setEnd2(
new AssociationEnd().setType(ENTITY_TYPE_1_2).setRole(ROLE_1_2).setMultiplicity(EdmMultiplicity.ONE));
} else if (ASSOCIATION_1_3.getName().equals(edmFQName.getName())) {
return new Association().setName(ASSOCIATION_1_3.getName())
.setEnd1(
new AssociationEnd().setType(ENTITY_TYPE_1_1).setRole(ROLE_1_1).setMultiplicity(EdmMultiplicity.MANY))
.setEnd2(
new AssociationEnd().setType(ENTITY_TYPE_1_3).setRole(ROLE_1_3).setMultiplicity(EdmMultiplicity.ONE));
} else if (ASSOCIATION_1_4.getName().equals(edmFQName.getName())) {
final List<PropertyRef> propertyRefsPrincipal = new ArrayList<PropertyRef>();
propertyRefsPrincipal.add(new PropertyRef().setName("Id"));
propertyRefsPrincipal.add(new PropertyRef().setName("Id2"));
final List<PropertyRef> propertyRefsDependent = new ArrayList<PropertyRef>();
propertyRefsDependent.add(new PropertyRef().setName("Id"));
propertyRefsDependent.add(new PropertyRef().setName("Id2"));
return new Association().setName(ASSOCIATION_1_4.getName())
.setEnd1(
new AssociationEnd().setType(ENTITY_TYPE_1_5).setRole(ROLE_1_5).setMultiplicity(EdmMultiplicity.ONE))
.setEnd2(
new AssociationEnd().setType(ENTITY_TYPE_1_3).setRole(ROLE_1_3).setMultiplicity(EdmMultiplicity.MANY))
.setReferentialConstraint(