com.atlassian.jira.database
Class DatabaseUtil

java.lang.Object
  extended by com.atlassian.jira.database.DatabaseUtil

public class DatabaseUtil
extends Object


Constructor Summary
DatabaseUtil()
           
 
Method Summary
static void closeQuietly(Connection con)
          Closes the given connection if any.
static void closeQuietly(ResultSet rs)
          Closes the given ResultSet if any.
static void closeQuietly(Statement stmt)
          Closes the given Statement if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseUtil

public DatabaseUtil()
Method Detail

closeQuietly

public static void closeQuietly(@Nullable
                                Connection con)
Closes the given connection if any. If null is passed, it does nothing and if SQLExceptions happen on close, they are swallowed.

Parameters:
con - a Connection to be closed, potentially null

closeQuietly

public static void closeQuietly(Statement stmt)
Closes the given Statement if any. If null is passed, it does nothing and if SQLExceptions happen on close, they are swallowed.

Parameters:
stmt - a Statement to be closed, potentially null

closeQuietly

public static void closeQuietly(ResultSet rs)
Closes the given ResultSet if any. If null is passed, it does nothing and if SQLExceptions happen on close, they are swallowed.

Parameters:
rs - a ResultSet to be closed, potentially null


Copyright © 2002-2013 Atlassian. All Rights Reserved.