tags:

views:

3544

answers:

5

Does anyone know if there is a DataSet class in Java like there is in .Net? I am familiar with EJB3 and the "java way" of doing data. However, I really still miss the seamless integration between database queries, xml and objects provided by the DataSet class. Has anyone found a Java implementation of DataSet (including DataTable, DataRow, etc)?

Edit: Also if anyone has tutorials for the java flavor of DataSet, please share a link.

+1  A: 

Have you looked at javax.sql.rowset.WebRowSet?

From the Javadocs:

The WebRowSetImpl provides the standard reference implementation, which may be extended if required.

The standard WebRowSet XML Schema definition is available at the following URI:

   http://java.sun.com/xml/ns/jdbc/webrowset.xsd

It describes the standard XML document format required when describing a RowSet object in XML and must be used be all standard implementations of the WebRowSet interface to ensure interoperability. In addition, the WebRowSet schema uses specific SQL/XML Schema annotations, thus ensuring greater cross platform inter-operability. This is an effort currently under way at the ISO organization. The SQL/XML definition is available at the following URI:

   http://standards.iso.org/iso/9075/2002/12/sqlxml
Nick Holt
A: 

ResultSet like rexem commented above. Would you like to elaborate on what you consider the Java way of doing data and how it differs from the C# way?

Markus Koivisto
ResultSet is much more like .NETs DataReader, which are very different things compared to DataSets/DataTables
nos
A: 

I know what you mean by the "dataset way" maybe you can find something similar, however are you sure you want to go that way? Java has many options but if you want something more cooked, why don't explore hibernate, it's the very popular in the industry and will give you more power that the one you are asking for.

MexicanHacker
A: 

You might be looking for LINQ implementation in Java. IMHO better than the DataSet/DataTable route.

http://code.google.com/p/jaque/

http://quaere.codehaus.org/

Disclaimer: I haven't used either of these.

Axl
A: 

MetaData

http://java.sun.com/products/jmi/index.jsp