Implementing Qualifiers

As we elaborate our design model, associations that start off as 1-to-many, often turn out to be 1 -to 1 when qualified by some index. If we take our Person-to-Car example, we could refine the model to get the following:

As mentioned in the mapping, a qualifier becomes an index when traversing the association. If we are using property procedures, then the qualifier will become a parameter of that procedure. So, to access a single Car that the Person owns, we must provide a registration number. Clients wishing to access an individual car would supply the registration number of the car of interest:

Dim aCar As Car

Set aCar = aPerson.Transport("R9 9 9 ICH") 'get a particular car

Was this article helpful?

0 0
365 Days Of Motivation

365 Days Of Motivation

Stop Wasting Time And Learn How To Stay Motivated. Finally! Discover How To Stop Your Mind From Wandering, And Upgrade Your Motivation. You Can Hack Your Motivation Levels, Allowing You To Take Your Life To The Next Level.

Get My Free Ebook

Post a comment