File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where is Implementation for this method

 
vinothk khannan
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We all know that ResultSet is an Interface.And for example

ResultSet rs = st.executeQuery(.....);

Now,
We give rs.next();

Where is the implementation for next() method.
We create reference for ResultSet and call the next() method.

Regards,
Vinod
 
Mani Ram
Ranch Hand
Posts: 1140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The implementation is provided by the JDBC driver.
 
vinothk khannan
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need Some More Explanation

Or hyper links to explanatory docs
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's all the explanation you should need. Read up on JDBC in your tutorial.
 
Mani Ram
Ranch Hand
Posts: 1140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vinothk khannan:
Need Some More Explanation

Or hyper links to explanatory docs


Let me try. If you are using an Oracle driver to connect to Oracle database, the implementation for ResultSet interface is provided by the Oracle driver.

For example, if you look into the ojdbc.jar file, you can find a class called OracleResultSet(*) which implements java.sql.ResultSet.

So, when you say

what you get is is an object of type OracleResultSet, which has the implementation for all the methods defined in the java.sql.ResultSet interface.

If you are using someother database, say XYZ, the respective driver also will have a concrete implementation of all necessary interfaces.

Hope that helps.

(*) I'm not sure about the name of the class. I'm just guessing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic