RE: Design Best Practice Question
RE: Design Best Practice Question
- Subject: RE: Design Best Practice Question
- From: <email@hidden>
- Date: Tue, 22 Mar 2005 17:23:06 +0100
- Thread-topic: Design Best Practice Question
James,
I would cache the type to value mapping in a dictionary held as instance variable of Project.
this.valuesForTypes = new NSDictionary(meytricTypeValues(), (NSArray) metricTypeValues().valueForKey(MetricTypeValues.METRIC_TYPE));
Display code may loop over a Portfolio's type list and query the Project's dictionary:
project.valueForTypes().objectForKey(type)
Pierre Bernard
http://homepage.mac.com/I_love_my
-----Original Message-----
From: webobjects-dev-bounces+pierre.bernard=email@hidden
[mailto:webobjects-dev-bounces+pierre.bernard=email@hidden]On
Behalf Of James Cicenia
Sent: Tuesday, March 22, 2005 3:46 PM
To: WOdev List
Subject: Design Best Practice Question
Hello -
I have the following scenario.
Portfolio -->> MetricTypes
Project -->> MetricTypeValues --> MetricType
However, a project doesn't have to have a value for each metric type,
however, it needs to display the list of metric types.
What is the appropriate best practice to handle this type of
relationship?
Do I create an array in project from the Portfolio's Metric Types and
then see if it has a MetricTypeValue?
Thanks,
James Cicenia
_______________________________________________
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
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
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