Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958484

Pages: 1
Anonymous
Unregistered




Have to use 'set'?
      #2101 - 09/18/03 11:55 AM

Hi Alan,

I am working as part of a team , who are developing a GUI front-end for a database.

Now, we have created many business objects: Customer, Part, Product code, etc. These objects all know how to render themselves on the screen, as well as retrieve the data they depend on from the server. All's well and good.

When we have complex business objects, eg Order, we make this object out of the many simpler ones we already have:

Class Order {
Customer cust;
Part[] parts;
(etc)
}

The only problem we have , is that some of the data for the customer object, within the order object, isn't actually where the customer object thinks it is. In the case of an order, some of the customer information is stored on the order file, instead of the customer file.

Unfortunately, when we display the order, the customer info is shown from the customer file, not the order file........

The only way around this, We can think of, is by providing 'set' methods on the customer object, that will allow the order object to specify the correct values that need to be shown. This would strongly couple the order and customer objects together. Any ideas how to get around this?

Thanks.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4955

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5