This content has been marked as final.
Show 2 replies
-
1. Re: Generic DTO converter
nraghuram Aug 5, 2003 12:01 AM (in response to jsimone)Look up java.lang.reflect .
Given an object o , you can get its class c and its methods m[] . your dto will have the same method signatures.
then create an instance of your dto class d. if there is a relation between your entity name and dto name, then from then entity name you should be able to get the dto name.
loop through the method array
for each getter method in your bean you can call the corresponding setter method in your dto. -
2. Re: Generic DTO converter
jsimone Aug 5, 2003 9:23 AM (in response to jsimone)Thanks! I will investigate.
Joe