Rickard Öberg wrote:
> Niklas Uhrberg wrote:
>   
>> Hi, I discussed this briefly with Rickard last week before it entered 
>> the mailing list.
>>
>> It started with the possibility of implementing the association class in 
>> UML which has no counterpart in "plain java".
>>
>> So, it's just a matter of putting data on an association between 
>> entities, an example is startDate on things like employment (just an 
>> example, maybe not a good one).
>>
>> I'm a but concerned about the term "role" in the discussion because 
>> roles are used for something else in modelling.
>> Drawing on the example with the spouse relation, a person has an 
>> associated person which is his or her spouse , the other person entity 
>> plays the role of being the spouse.
>>     
>
> So the "role" is really the association name in Qi4j, i.e.
>
> interface Person
> {
>    Association<Person> spouse(); // "spouse" is the role
> }
>   

  Yes.

>   
>> Possibly one would like to put start- and end dates on this association 
>> and this would motivate an association class between them as opposed to 
>> just a regular association.
>>
>> I write this just to see to that we mean the same things with "role" and 
>> "association class" and to motivate that "AssociationRole" is IMHO a bit 
>> misleading.
>> Note that the data we put on an association *can* be another entity in 
>> the strict meaning that it's not just a way of implementing it in Qi4J.
>>
>> Example: A person har the spouse association to another person. This 
>> association is qualified be the "introduced by" association which is yet 
>> another Person entity.
>>     
>
> Exactly. In RDF this is called "reification", but I'm not sure I want to 
> use that term here. Any other terms which are better than "role"? The 
> concept is valid (and extremely useful I think), but the term needs to 
> be refined, just as we changed EntitySession to UnitOfWork, and I'm 
> about to replace LoadingPolicy with Usecase.
>
>   
 I think "QualifiedAssociation" is adequate, I have to taste it a bit 
more to see if I like it ...

Generally, XXXAssociation sounds better to me than AssociationXXX . To 
me it says that it's a sort of association, not a part of, or something 
related to the association.
In both of the designs we're talking about, it's the association itself 
that we obtain from e.g. Person.
Terms on the from AssociationXXX indiactes (to me) that it's a property 
of the association, not the association itself.


/Niklas

> /Rickard
>
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>
>   


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to