users@glassfish.java.net

Re: Metadata from the resultlist

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 May 2007 08:10:56 PDT

Di dont know if i understood your post but if you want to get the metadata of a result set with an old school DB Connection you can get it done.

ResultSet rs = statement.executeQuery(sql);
MetaDataResultSet mt = rs.getMetaData();

And then with the mt object you can get more information about the ResultSet object, things like all the columns count, columns names, types and other stuff.. using Hibernate or Persistence i dont know... it should be a way... just look at the API to see any familiar with the old school way.. another thing but it might be kind of hard it is using the relfection API to get the class name and all of that..

hope this help..
[Message sent by forum member 'gutierrezge' (gutierrezge)]

http://forums.java.net/jive/thread.jspa?messageID=216005