Think of passing the Address object a context on which to write the
address. The context object would have methods that accept address
lines. The Address object would know how to write lines to an interface
implemented by the context object. So the method might be
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of James Perkins
Sent: Tuesday, February 03, 2009 6:48 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: Java Accessors Are They Evil?
First off I would thank you all for taking the time to read the article.
It looks like I've got some re-training to do in my mind. I think I
understand the concept that is happening now, but I need to figure out
how this all works in an application.
I have an application that get's customer data from a database and then
writes it to an XML file so I can process it with the GoogleMaps API.
I am currently building a list of customers and passing it the class
that creates the XML. This class uses a method getShipToAddress() which
returns an Address, but the Address class has getters for address lines,
city, state, etc. So I'm trying to figure out how you show that.
I guess, which I know is talked about a bit in the article, I don't
understand how you can use an object for a UI without at least read-only
I guess it's back to the drawing board.
James R. Perkins
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/java400-l
As an Amazon Associate we earn from qualifying purchases.