deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.utils
Class JDBCUtils

java.lang.Object
  extended by org.deegree.commons.utils.JDBCUtils

public final class JDBCUtils
extends Object

This class contains static utility methods for working with JDBC.

Version:
$Revision: 19823 $, $Date: 2009-09-28 18:04:25 +0200 (Mo, 28 Sep 2009) $
Author:
Oliver Tonnhofer, last edited by: $Author: mschneider $

Constructor Summary
JDBCUtils()
           
 
Method Summary
static void close(Connection conn)
          Close the object, suppress all errors/exceptions.
static void close(PreparedStatement stmt)
          Close the object, suppress all errors/exceptions.
static void close(ResultSet resultSet)
          Close the object, suppress all errors/exceptions.
static void close(ResultSet rs, Statement stmt, Connection conn, org.slf4j.Logger log)
          Tries to close each object from a ResultSet, Statement, Connection triple.
static void close(Statement stmt)
          Close the object, suppress all errors/exceptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCUtils

public JDBCUtils()
Method Detail

close

public static void close(Connection conn)
Close the object, suppress all errors/exceptions. Useful for finally clauses.

Parameters:
conn -

close

public static void close(ResultSet resultSet)
Close the object, suppress all errors/exceptions. Useful for finally clauses.

Parameters:
resultSet -

close

public static void close(Statement stmt)
Close the object, suppress all errors/exceptions. Useful for finally clauses.

Parameters:
stmt -

close

public static void close(PreparedStatement stmt)
Close the object, suppress all errors/exceptions. Useful for finally clauses.

Parameters:
stmt -

close

public static void close(ResultSet rs,
                         Statement stmt,
                         Connection conn,
                         org.slf4j.Logger log)
Tries to close each object from a ResultSet, Statement, Connection triple. Useful for cleaning up in finally clauses.

Parameters:
rs - ResultSet to be closed
stmt - Statement to be closed
conn - Connection to be closed
log - used to log error messages, may be null

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>