org.jtheque.utils
Class DatabaseUtils

java.lang.Object
  extended by org.jtheque.utils.DatabaseUtils

public final class DatabaseUtils
extends Object

An utility class for database use.

Author:
Baptiste Wicht

Method Summary
static void close(Connection connection)
          Close the connection.
static void close(ResultSet rs)
          Close the result set.
static void close(Statement statement)
          Close the statement.
static Collection<Integer> getAllIntResults(ResultSet rs, String column)
          Return all the results of the specified column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public static void close(ResultSet rs)
Close the result set.

Parameters:
rs - The result set to close.

close

public static void close(Statement statement)
Close the statement.

Parameters:
statement - The statement to close.

close

public static void close(Connection connection)
Close the connection.

Parameters:
connection - The connection to close.

getAllIntResults

public static Collection<Integer> getAllIntResults(ResultSet rs,
                                                   String column)
Return all the results of the specified column.

Parameters:
rs - The result set.
column - The column to get the data from.
Returns:
A collection of Integer containing all the results of the specified column.


Copyright © 2010 JTheque. All Rights Reserved.