public void testAddJPAEdmAssociationView() {
class LocalJPAAssociationView extends JPAEdmTestModelView {
@Override
public AssociationEnd getEdmAssociationEnd1() {
AssociationEnd associationEnd = new AssociationEnd();
associationEnd.setType(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader"));
associationEnd.setRole("SalesOrderHeader");
associationEnd.setMultiplicity(EdmMultiplicity.ONE);
return associationEnd;
}
@Override
public AssociationEnd getEdmAssociationEnd2() {
AssociationEnd associationEnd = new AssociationEnd();
associationEnd.setType(new FullQualifiedName("salesorderprocessing", "SalesOrderItem"));
associationEnd.setRole("SalesOrderItem");
associationEnd.setMultiplicity(EdmMultiplicity.MANY);
return associationEnd;
}
@Override
public Association getEdmAssociation() {
Association association = new Association();
association.setEnd1(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing",
"SalesOrderHeader")));
association.setEnd2(new AssociationEnd()
.setType(new FullQualifiedName("salesorderprocessing", "SalesOrderItem")));
return association;
}
}