Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » createAssociation
createAssociation [message #726494] Sun, 18 September 2011 05:37 Go to next message
Eclipse User
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 10:54 Go to previous message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
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...

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


Current Time: Sat Jul 26 03:08:07 EDT 2014

Powered by FUDForum. Page generated in 0.01432 seconds