Ok, let me just recap the motivation for qualifiers and what it is supposed to achieve. The goal (in the discussion that I participated in but later was absent from) was to achieve something like association classes in UML.

Example A has a collection of Bs and you need to track the date when the association was introduced. A and B are entities. Is the association from an A to a particular B an entity, no I don't think so.

Does it become an entity just because you need to know when the association was introduced, no I don't think so either.

This is why there was an attempt to further qualify the relation without introducing another entity.

Why is the qualified relation not an entity?
It has no identity, there is simply no need to track one and the same association, it suffices to know what data is attached to the unique association between a particular instance of A to a particular instance of B.

The qualifier construct is supposed to make it explicit that it is just some data being unique to an association between entities.

I think that a good api for this would enhance the understandability of the model.

/Niklas


Michael Hunger wrote:
Encapsulating the qualification in concrete Entities of the ManyAssoc makes more sense for me. It also is a better
design to have concrete types representing this qualified association.

The other way would be like cascading maps (which I don't like at all).

http://www.jexp.de/demotivators/cascading_collections.jpg

Michael


Am 03.04.2009 8:07 Uhr, schrieb Rickard Öberg:
Niclas Hedhman wrote:
On Fri, Apr 3, 2009 at 1:10 PM, Rickard Öberg <[email protected]>
wrote:

interface Movie
extends EntityComposite
{
@Aggregated
ManyAssociation<Casting> cast();
}

and then separately
interface Casting
extends EntityComposite
{
Association<Actor> actor();
Association<Role> role();
}

What say ye?

I never got my head twisted around Qualifiers, so can't really balance
in the advantages of it.
If nothing else; It is easier to;
1. Explain
2. Understand
3. Implement in Qi4j Runtime

so, I think it is a win.

Ok, so both Qualifiers and events are out. That's going to drastically
simplify things :-)

/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



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

Reply via email to