public class DBUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
DBUtil() |
Modifier and Type | Method and Description |
---|---|
static DBUtil |
current()
Returns the only instance this class supports (design pattern "Singleton")
|
boolean |
isDriverRegistered(java.lang.String driverClassName)
Returns true if the database driver with the specified class name is
registered at the java.sql.DriverManager.
|
boolean |
loadAndRegisterDriver(java.lang.String driverClassName)
Loads the database driver with the given class name and registers it
at the java.sql.DriverManager.
|
public static final DBUtil DBU
public static DBUtil current()
public boolean loadAndRegisterDriver(java.lang.String driverClassName)
driverClassName
- The class name of the driver to loadpublic boolean isDriverRegistered(java.lang.String driverClassName)
driverClassName
- The class name of the driver to load