[ 
https://issues.apache.org/jira/browse/DBUTILS-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676687#action_12676687
 ] 

Dan Fabulich commented on DBUTILS-30:
-------------------------------------

The use case for this is described in DBUTILS-28:

bq. I had a web app that was used to query for data, and the data logically 
belonged in the same object. However some of the data was in a tradtionally 
RDBMS while the rest of the data was in stored in Mainframe ISAM files. There 
was a COBOL program that contained years of business logic that they did not 
what to re write, so they made a COBOL stored procedure in DB2 on the mainframe 
that would call the program to retreive the data. So I could've had two objects 
and written a routine to merge the data, but after looking at the DBUtils code 
it was very easy to write it just reuse the existing object.

Fortunately, Kyle doesn't have to write a routine to merge the data: he can 
just use BeanUtils.copyProperties, which does the right thing.  I think we 
should just close this issue out.

> [dbutils] New ResultSetHandler - ObjectHandler
> ----------------------------------------------
>
>                 Key: DBUTILS-30
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-30
>             Project: Commons DbUtils
>          Issue Type: Improvement
>         Environment: Operating System: other
> Platform: All
>            Reporter: Joe Zulli
>            Priority: Minor
>             Fix For: 1.2
>
>
> It would be great to see a ResultSetHandler that populates an existing object 
> (as opposed to the BeanHandler which instantiates a new one, given a class). 
> This woud be useful for implementing simple and easy object relational 
> mapping. 
> For instance, an object that loads it self from the database could use the 
> ObjectHandler and pass in "this" as the object.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to