Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 97579 invoked from network); 25 Jan 2004 22:28:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 25 Jan 2004 22:28:38 -0000 Received: (qmail 69338 invoked by uid 500); 25 Jan 2004 22:28:20 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 69308 invoked by uid 500); 25 Jan 2004 22:28:20 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 69294 invoked from network); 25 Jan 2004 22:28:20 -0000 Received: from unknown (HELO web21410.mail.yahoo.com) (216.136.232.85) by daedalus.apache.org with SMTP; 25 Jan 2004 22:28:20 -0000 Message-ID: <20040125222826.50018.qmail@web21410.mail.yahoo.com> Received: from [24.20.221.216] by web21410.mail.yahoo.com via HTTP; Sun, 25 Jan 2004 14:28:26 PST Date: Sun, 25 Jan 2004 14:28:26 -0800 (PST) From: Paul Mitchell Subject: Re: BeanUtils Feature To: Jakarta Commons Users List In-Reply-To: <20040125222427.57459.qmail@web21401.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am a newbie to the utils and I have a similiar problem , anybody on how to handle scenarios like these ? Paul. --- Anon Myous wrote: > I am a little lost on how ConvertUtils is going to > help..perhaps I should be more clear.. > for instance > I have a Value Bean that needs to be populated from > three other beans viz.. > BeanUtils.copyProperty(valueBean, otherBean1); > BeanUtils.copyProperty(valueBean, otherBean2); > BeanUtils.copyProperty(valueBean, otherBean3); > > All of the otherBeans are quite voluminous and may > have properties overlapping. I just want to copy a > subset of properties from each otherBean1s so that I > can control and prevent any overwriting and can be > absolutely sure which properties are getting copied > over. > So what I am looking for from a API standpoint > something equivalent to > BeanUtils.copyProperty(Object > dest, Object orig, List propertyList) > where propertyList is a list of properties of the > orig > Bean that needs to be copied to the dest Bean. > > > Thanks. > > > --- __matthewHawthorne wrote: > > Anon Myous wrote: > > > I understand the properties of a an original > bean > > > can be copied over to the destination bean using > > the > > > copyProperty method, but is there a way that > only > > a > > > subset of properties specified possibly in a > > > java.util.List or something can be copied over > > from > > > the original bean to the destination bean. > > > > If you want to copy all properties, > > BeanUtils.copyProperties() should do > > the job. > > > > For a subset, you'll probably have to write your > own > > custom Converter > > and register it via: > > > > ConvertUtils.register(yourConverter, > YourBean.class) > > > > I had to do something similar to this recently. > > > > > > > If this question has been raised previously and > > > somebody has already posted an answer , could > > somebody > > > please guide me towards that snippet ? > > > > To see previously asked and answered questions, > your > > best best is > > probably the mail archives: > > > > I use http://marc.theaimsgroup.com/ > > > > but there are a few others around the web. > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > commons-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: > > commons-user-help@jakarta.apache.org > > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free web site building tool. > Try it! > http://webhosting.yahoo.com/ps/sb/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: > commons-user-help@jakarta.apache.org > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org