File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate" Watch "Hibernate" New topic
Author

Hibernate

Devaki Nihar
Greenhorn

Joined: Apr 30, 2005
Posts: 20
How i can get the resultsetmetadata using Hibernate Query Language.
Suppose I want to do some processing on the resultset metadata?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Perhaps you could tell us why you need access to the methods defined in the ResultSetMetaData interface? In Hibernate you never deal with ResultSets. So you have no access to the methods of ResultSetMetaData. Hibernate is designed to allow you to access relational data as Objects not relations, so what would you do with this info anyway? Pretty much everything that can be retrieved via ResultSetMetaData can be defined in a mapping file.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Devaki Nihar
Greenhorn

Joined: Apr 30, 2005
Posts: 20
I want to deal with the resultsetmetadata
e.g to know the column count where my query is dynamic,
or to know the column name type
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

With Hibernate there is no ResultSet, and therefore no ResultSetMetaData. And you deal with properties and Objects, never columns.

If your HQL returns an array of Objects representing the properties of each Object in your results Collection you know that each entry in that array is an Object or one of its sub-types. So you no longer need an int value to represent its type.
[ May 16, 2005: Message edited by: Paul Sturrock ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate