Dears,
Sorry for the previuose message.please consider it as a canceled one.
I want to create empty set then add specific objects to it.
I used the code below but I has some errors.
any help is highly appreciated.
Regards,
Omran
[let ss:Set(ViewColumn)= Set{}]////error1 Invalid Type:Set(ViewColumn)
[for (vc:ViewColumn|mv.columns) ]
[if (vc.oclIsTypeOf(ViewExpColumn))]
[let vec : ViewExpColumn = vc.oclAsType(ViewExpColumn)]
[if not (vec.expression.trim().toUpper().startsWith('SUM(') or
vec.expression.trim().toUpper().startsWith('AVG(') or
vec.expression.trim().toUpper().startsWith('MIN(')or
vec.expression.trim().toUpper().startsWith('MAX') or
vec.expression.trim().toUpper().startsWith('COUNT('))]
[ss->including(vec.oclAsType(ViewColumn))/]///error2 Cannot find
operation (including(ViewColumn)) for the type (Set())
[/if]
[/let]
[/if]
[if (vc.oclIsTypeOf(SimpleViewColumn))]
[ss->including(vc.oclAsType(ViewColumn))/]//error3 Cannot find operation
(including(ViewColumn)) for the type (Set())
[/if]
[/for];
[for (vc:ViewColumn|ss) separator(',')]///error4 The 'no null'
constraint is violated
[vc.name/]
[/for]
[/let]