[Beanutils]How to copy beans with different property type

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Beanutils]How to copy beans with different property type

Gao Di
I have 2 javabeans, they have same property name, but
the property type are different, such as:
String starttime;
another is TimeStamp startime
so i want to know if i can use Beanutils to do the
copy thing?
I have tried PropertyUtils.copyProperties method, but
i got argument type mismatch error, anyone tell me how
to do, thanks.


               
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [Beanutils]How to copy beans with different property type

David Durham, Jr.
> I have tried PropertyUtils.copyProperties method, but
> i got argument type mismatch error, anyone tell me how
> to do, thanks.

http://jakarta.apache.org/commons/beanutils/commons-beanutils-1.7.0/docs/api/org/apache/commons/beanutils/package-summary.html#conversion

HTH,

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]