ProgramixGenericLib v5.0.1

com.programix.sql
Class JDBCTools

java.lang.Object
  extended by com.programix.sql.JDBCTools

public class JDBCTools
extends Object


Method Summary
static void closeQuietly(Connection con)
          Closes the specified Connection and suppresses any SQLException's that may be thrown.
static void closeQuietly(Connection con, Statement stmt)
          Closes the Statement and Connection [in that order].
static void closeQuietly(Connection con, Statement stmt, ResultSet rs)
          Closes the ResultSet, Statement, and Connection [in that order].
static void closeQuietly(ResultSet rs)
          Closes the specified ResultSet and suppresses any SQLException's that may be thrown.
static void closeQuietly(Statement stmt)
          Closes the specified Statement and suppresses any SQLException's that may be thrown.
static void closeQuietly(Statement stmt, ResultSet rs)
          Closes the ResultSet and Statement [in that order].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

closeQuietly

public static void closeQuietly(Connection con)
Closes the specified Connection and suppresses any SQLException's that may be thrown. There is no need to avoid passing a null reference because if a null reference is passed to this method, the request to close is silently ignored.


closeQuietly

public static void closeQuietly(Statement stmt)
Closes the specified Statement and suppresses any SQLException's that may be thrown. There is no need to avoid passing a null reference because if a null reference is passed to this method, the request to close is silently ignored. This method works for Statement, PreparedStatement, and CallableStatement.


closeQuietly

public static void closeQuietly(ResultSet rs)
Closes the specified ResultSet and suppresses any SQLException's that may be thrown. There is no need to avoid passing a null reference because if a null reference is passed to this method, the request to close is silently ignored.


closeQuietly

public static void closeQuietly(Connection con,
                                Statement stmt,
                                ResultSet rs)
Closes the ResultSet, Statement, and Connection [in that order]. Any SQLException's that may be thrown are silently suppressed. There is no need to avoid passing null references because if any null reference is passed to this method, the request to close that particular item is silently ignored. Equivalent to:
 closeQuietly(rs);
 closeQuietly(stmt);
 closeQuietly(con);
 


closeQuietly

public static void closeQuietly(Connection con,
                                Statement stmt)
Closes the Statement and Connection [in that order]. Any SQLException's that may be thrown are silently suppressed. There is no need to avoid passing null references because if any null reference is passed to this method, the request to close that particular item is silently ignored. Equivalent to:
 closeQuietly(stmt);
 closeQuietly(con);
 


closeQuietly

public static void closeQuietly(Statement stmt,
                                ResultSet rs)
Closes the ResultSet and Statement [in that order]. Any SQLException's that may be thrown are silently suppressed. There is no need to avoid passing null references because if any null reference is passed to this method, the request to close that particular item is silently ignored. Equivalent to:
 closeQuietly(rs);
 closeQuietly(stmt);
 


ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.