Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Use of beans in my design possible? Date: Fri, 4 Nov 2011 12:46:37 -0700 (PDT) Organization: http://groups.google.com Lines: 31 Message-ID: <22613314.193.1320435997088.JavaMail.geo-discussion-forums@vbct14> References: Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 2620:0:1000:2404:224:d7ff:fe69:5838 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1320436105 32098 127.0.0.1 (4 Nov 2011 19:48:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 4 Nov 2011 19:48:25 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:2404:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9525 mike wrote: > I am considering using java [sic] beans ( and it was a while since I used > it) to store/update data. "Bean" just means "class that adheres to certain conventions". > I use a series of commands to access a 3:rd party system. I parse the > data ( output from command) and generate an Activity object with > getters/setters. It's already a bean! > I am considering using beans since I remember that updates/new objects > can be done easier using beans. Is that correct? No. > How will beans be updated if new data for an object is generated when > commands are executed? By a caller setting properties of the bean. > What do I have to do in order to use beans? ( I am using jdk 1.5 .... > yes I know it is old ). Have your classes adhere to the JavaBean conventions, at minimum exposing properties strictly through accessors ("getters") and mutators ("setters"). JDK 5 is old but modern in its sensibilities. If I may ask, why aren't you using Java 6? -- Lew