Protomatter Software v1.1.7

com.protomatter.util
Class DatabaseUtil

java.lang.Object
  |
  +--com.protomatter.util.DatabaseUtil

public class DatabaseUtil
extends java.lang.Object

Database-related utility class.


Method Summary
static boolean close(java.sql.Connection c)
          Close the given Connection.
static boolean close(java.sql.Connection c, java.lang.Object logger)
          Close the given Connection.
static boolean close(java.sql.ResultSet r)
          Close the given ResultSet.
static boolean close(java.sql.ResultSet r, java.lang.Object logger)
          Close the given ResultSet.
static boolean close(java.sql.Statement s)
          Close the given Statement.
static boolean close(java.sql.Statement s, java.lang.Object logger)
          Close the given Statement.
static void registerDriver(java.lang.String driverName)
          Ensure that the given driver has been registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerDriver

public static void registerDriver(java.lang.String driverName)
                           throws java.lang.Exception
Ensure that the given driver has been registered. This method makes sure that the given driver is loaded and registered with the JDBC Driver Manager. Calling this method multiple times will not result in the driver being registered twice.

close

public static boolean close(java.sql.Connection c)
Close the given Connection. Return true when there's no exception thrown, false if there was one.

close

public static boolean close(java.sql.Connection c,
                            java.lang.Object logger)
Close the given Connection. Return true when there's no exception thrown, false if there was one. The logger is passed onto a call to Syslog.log() in the event of an exception.

close

public static boolean close(java.sql.Statement s)
Close the given Statement. Return true when there's no exception thrown, false if there was one.

close

public static boolean close(java.sql.Statement s,
                            java.lang.Object logger)
Close the given Statement. Return true when there's no exception thrown, false if there was one. The logger is passed onto a call to Syslog.log() in the event of an exception.

close

public static boolean close(java.sql.ResultSet r)
Close the given ResultSet. Return true when there's no exception thrown, false if there was one.

close

public static boolean close(java.sql.ResultSet r,
                            java.lang.Object logger)
Close the given ResultSet. Return true when there's no exception thrown, false if there was one. The logger is passed onto a call to Syslog.log() in the event of an exception.

Protomatter Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7 http://protomatter.sourceforge.net/1.1.7