EVL: How to check the aggregation kind of an association end [message #1717971] |
Fri, 18 December 2015 10:59 |
Alireza Rouhi Messages: 148 Registered: December 2015 |
Senior Member |
|
|
Hi,
I want to check the aggregation kind of an association end with the following operation:
operation Association foo() : Boolean {
for (end in self.memberEnds) {
if (end.aggregation = 'shared')
return true;
}
return false;
}
I used the end.aggregation = Aggregation #a_shared condition in the if statement earlier. The error message was Cannot find enumeration literal Aggregation#a_shared in model M! Thus, here I have replaced the end.aggregation = 'shared' in the if condition. Although, there is no error message for this code but it is not functional!
My question is that "How can I check the aggregation kind in the if statement?" (the possible values of the end.aggregation can be composite, none, or shared).
Kind regards,
Alireza
[Updated on: Fri, 18 December 2015 11:16] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02471 seconds