How to map java.sql.types to Java classes?

Dear Experts,

I'm retrieving JDBC metadata, including java.sql.types, from a ResultSet.  Based on that, I need a factory method that will return the data from each column in a separate appropriate Java class.  For instance, a java.sql.Types.DECIMAL should be returned as a java.math.BigDecimal.  

Is anyone aware of an existing method that will do this for me?  At least, is there an existing Map representing which conversions should be done?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

How would you use that btw?
McJava1967Author Commented:
It's a bit convoluted.  
I'm receiving a map of field names and values, and the name of a stored procedure.  I need to convert the map into parameters for the stored procedure.  But the values are all strings.  I need to pull the real types from the stored procedure (I have that worked out), and then cast those strings to an appropriate Java class.  Then I'll use a Spring StoredProcedure class to pass them in.
Hi, I do not know any mapping but just to help you by giving you more information about the matching types. You can have a look at the set methods in

it lists the java equivalent of sql types. And hopefully you can create you own mapping afterwards.

Good luck!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.