Inheritance & Relationship
Inheritance & Relationship
- Subject: Inheritance & Relationship
- From: David Avendasora <email@hidden>
- Date: Mon, 2 Jan 2006 07:17:28 +0000
Hi,
I have a object-model design question. I am writing a Direct to Java
Client app for labeling information. There are several places where
I'm not sure I've built the most efficient relationships. Here's the
main classes of one example:
Part
>>labels
RawMaterial (subclass of Part)
IntermediatePart (subclass of Part)
FinishedGood (subclass of Part)
Label
>>part
I'm trying to build the most efficient relationship possible between
the three subclasses of Part and Label. All three subclasses can have
one or more Labels associated with them which makes me feel that the
correct place for the relationship is on the superclass. This works
great when I am modifying a subclass and want to associate a Label.
The problem comes in when I want to traverse the relationship from
Label back to whatever subclass it was associated with. Of course, it
is NOT associated with the subclass, it is associated with the
superclass so I can't get the UI to show me the subclass-specific
information.
I am using Direct to Java Client and trying to minimize (or
eliminate) freezing the interfaces and modifying the UI java
directly. There doesn't seem to be any way to make Direct to Java
Client building recognize what subclass of Part the association is
with and show those fields in the UI.
I've considered getting rid of the >>part relationship from Label and
replacing it with >>rawMaterial, >>intermediatePart and
>>finishedGood relationships. This would allow me to traverse the
relationship directly back to the subclass without any custom UI
changes, but it seems a very clunky way of doing it.
Am I missing something in the Direct to Java Client functionality
that will make this easy, or is my class structure all wrong to begin
with? Any thoughts or ideas would be greatly appreciated!
Thanks,
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden