Qualified associations are many-ends of associations that can be reduced to 1 result of the many by sending in qualifier in the brackets at the end of the many-end:
SomeObject.SomeManyObjectsAssociation[someQualifier1,someQualifier2] : OneObject of type element type of the ManyAssociation.
The Qualification is done by locating a method following the pattern Qualify_<SomeManyObjectsAssociation>(someQualifier1,someQualifier2):ObjectType
If no such method is found a generic operator accepting integer as qualifier is used - and the result is corresponding to the <a href="/Documentation:OCLOperators_at0" title="Documentation:OCLOperators at0" data-bs-title="Documentation:OCLOperators_at0">at0 operator</a>
Example[<a href="/index.php?title=Documentation:QualifiedAssociations&veaction=edit§ion=1" class="mw-editsection-visualeditor" title="Edit section: Example" data-bs-title="Documentation:QualifiedAssociations">edit</a> | <a href="/index.php?title=Documentation:QualifiedAssociations&action=edit§ion=1" title="Edit section: Example" data-bs-title="Documentation:QualifiedAssociations">edit source</a>]
If I have this:
I can introduce a method on NewClassAddedNow:
Qualify_ThingWithQualifyTest(someQualifier:String):Thing
And I can define the body in EAL (or in c# if I want) to something like this:
self.ThingWithQualifyTest->select(a|a.Attribute1=someQualifier)->first
And if this in place, you can use the qualifier operator like this:
Gotchas: Remember to mark your Qualify_<> method as IsQuery=true
if you want to use the the qualifier operator in OCL and not only EAL.