jodd.db
Class ResultSetUtil

java.lang.Object
  extended by jodd.db.ResultSetUtil

public class ResultSetUtil
extends java.lang.Object

Various result set utilities.


Constructor Summary
ResultSetUtil()
           
 
Method Summary
static void close(java.sql.ResultSet resultSet)
          Closes provided result set without throwing an exception.
static int getFirstInt(java.sql.ResultSet resultSet)
          Returns int value of very first column in result set.
static long getFirstLong(java.sql.ResultSet resultSet)
          Returns long value of very first column in result set.
 void iterate(java.sql.ResultSet rs, RowMapper mapper)
          Invokes RowMapper for each row of the result set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetUtil

public ResultSetUtil()
Method Detail

close

public static void close(java.sql.ResultSet resultSet)
Closes provided result set without throwing an exception.


getFirstLong

public static long getFirstLong(java.sql.ResultSet resultSet)
                         throws java.sql.SQLException
Returns long value of very first column in result set.

Throws:
java.sql.SQLException

getFirstInt

public static int getFirstInt(java.sql.ResultSet resultSet)
                       throws java.sql.SQLException
Returns int value of very first column in result set.

Throws:
java.sql.SQLException

iterate

public void iterate(java.sql.ResultSet rs,
                    RowMapper mapper)
             throws java.sql.SQLException
Invokes RowMapper for each row of the result set.

Throws:
java.sql.SQLException


Copyright © 2003-2011 Jodd Team