• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass entire row to another method for processing

 
Edmund Castermund
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34870
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not pass rs to processResultRow and have it call the proper getXXX methods?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic