Advertisement

05.28.2008 at 05:53AM PDT, ID: 23437865
[x]
Attachment Details

jakarta Beanutils - exlude methods while copy

Asked by S_B in Java Programming Language

Tags: Java

I'm using jakarta Beanutils(1.6) for copying values from one to another bean.
As the beanutils use reflections for copying the stuff every getter/setter(origin, destination) pair is called if existing.

An example to make i clearer:
Origin bean:
getStuff()
getDate()
getName()

Destination bean:
setStuff(xx)
setDate(xx)
setName(xx)

Beanutils calls getStuff and sets it on the destination bean via setStuff(xx) while invoking BeanUtils.copyProperties(java.lang.Object dest, java.lang.Object orig)
How do i configure beanutils to exclude some getters to get called, so that in the example above only setDate get's called??
Start Free Trial
[+][-]05.28.2008 at 06:00AM PDT, ID: 21659929

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 06:55AM PDT, ID: 21660401

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 07:16AM PDT, ID: 21660601

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2008 at 09:29AM PDT, ID: 21661912

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: Java
Sign Up Now!
Solution Provided By: CEHJ
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.30.2008 at 05:21AM PDT, ID: 21677018

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 05:24AM PDT, ID: 21677035

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 05:25AM PDT, ID: 21677046

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628