org.pf.db.util
Class DBUtil

java.lang.Object
  extended by org.pf.db.util.DBUtil

public class DBUtil
extends Object

Helper and convenience methods for Java database handling.

Version:
1.0
Author:
Manfred Duchrow

Method Summary
static DBUtil current()
          Returns the only instance this class supports (design pattern "Singleton")
 boolean isDriverRegistered(String driverClassName)
          Returns true if the database driver with the specified class name is registered at the java.sql.DriverManager.
 boolean loadAndRegisterDriver(String driverClassName)
          Loads the database driver with the given class name and registers it at the java.sql.DriverManager.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

current

public static DBUtil current()
Returns the only instance this class supports (design pattern "Singleton")


loadAndRegisterDriver

public boolean loadAndRegisterDriver(String driverClassName)
Loads the database driver with the given class name and registers it at the java.sql.DriverManager.

Parameters:
driverClassName - The class name of the driver to load
Returns:
true if loading was successful, otherwise false

isDriverRegistered

public boolean isDriverRegistered(String driverClassName)
Returns true if the database driver with the specified class name is registered at the java.sql.DriverManager.

Parameters:
driverClassName - The class name of the driver to load


Copyright © 2014 Manfred Duchrow Consulting & Software. All rights reserved.