aspose file tools*
The moose likes JDBC and the fly likes How to pass entire row to another method for processing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to pass entire row to another method for processing" Watch "How to pass entire row to another method for processing" New topic
Author

How to pass entire row to another method for processing

Edmund Castermund
Ranch Hand

Joined: May 09, 2007
Posts: 85
Hi guys,
was searching around and I did not come up with an answer for this q. Basically my situation is that I create a db search config via xml, and in the method where I process the result set, I do not know the data type (int, string, date, etc) or db column name of the data I am pulling. I have to get that info from an object structure I have built from the xml config.

So, in a case like so:




From the searching I have done I know that you want to keep the processing of a result set kind of in one place, but with my setup now I have some inner loops with duped code I'd like to avoid if possible.
thanks,
ec
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30776
    
157

Why not pass rs to processResultRow and have it call the proper getXXX methods?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: How to pass entire row to another method for processing