Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » createAssociation
createAssociation [message #726494] Sun, 18 September 2011 09:37 Go to next message
Eclipse UserFriend
Originally posted by: Emil Huseynli

Hi, here is a question about createAssociation method

Association createAssociation(boolean end1IsNavigable,
AggregationKind end1Aggregation,
java.lang.String end1Name,
int end1Lower,
int end1Upper,
Type end1Type,
boolean end2IsNavigable,
AggregationKind end2Aggregation,
java.lang.String end2Name,
int end2Lower,
int end2Upper)

What's the meaning of the end1Name and end2Name parameters? Are that
roles? Let's say, for example i have a Controls association, Department
controls Project. If i create an association with the method above, what
should i put into end1Name and end2Name? Is the following right?

departmentClass.createAssociation(false, AggregationKind.NONE_LITERAL,
"Department", 1, 1, projectClass, false, AggregationKind.NONE_LITERAL,
"Project", 0, LiteralUnlimitedNatural.UNLIMITED);

Thanks in advance
Re: createAssociation [message #735697 is a reply to message #726494] Wed, 12 October 2011 14:54 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
These are the names that will be assigned to the properties which get created as the ends of the association. You can specify whatever name make sense for your situation...

Previous Topic:Where can I download uml.ecore
Next Topic:LiteralUnlimitedNatural.UNLIMITED
Goto Forum:

Current Time: Thu Apr 19 10:04:31 GMT 2018

Powered by FUDForum. Page generated in 0.02040 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software